CN112214408A - Dependency conflict detection method and device, electronic equipment and computer readable medium - Google Patents

Dependency conflict detection method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN112214408A
CN112214408A CN202011086778.0A CN202011086778A CN112214408A CN 112214408 A CN112214408 A CN 112214408A CN 202011086778 A CN202011086778 A CN 202011086778A CN 112214408 A CN112214408 A CN 112214408A
Authority
CN
China
Prior art keywords
sdk
dependent
target
dependency
version
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
CN202011086778.0A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202011086778.0A priority Critical patent/CN112214408A/en
Publication of CN112214408A publication Critical patent/CN112214408A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • 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

Abstract

The disclosure provides a dependency conflict detection method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of application installation. The method comprises the following steps: if the version of the target software development kit SDK is detected to be updated, determining a target application program applying the target SDK; acquiring a direct dependent SDK of a target application program; acquiring an associated dependent SDK with a dependent relation with the directly dependent SDK from a preset dependent relation database; detecting a dependency conflict of the target SDK based on the association dependent SDK and the direct dependent SDK. The dependency conflict detection method provided by the disclosure can determine whether the dependency conflict exists in the application program applying the target SDK when the target SDK version is updated, and effectively avoid APP collapse caused by updating the target SDK version.

Description

Dependency conflict detection method and device, electronic equipment and computer readable medium
Technical Field
The present disclosure relates to the field of application installation technologies, and in particular, to a dependency conflict detection method and apparatus, an electronic device, and a computer-readable medium.
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 one piece of Software runs, a plurality of Software Development tools (SDK) packages are used for technical support, and dependency relationships often exist among different SDKs.
At present, to avoid dependency conflicts among multiple SDKs used by an application, SDKs of existing versions of the application are detected, and once any SDK is updated, only detecting an SDK of an existing version may cause a crash of the application during running.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, a dependency conflict detection method is provided, where the method includes:
if the version of the target software development kit SDK is detected to be updated, determining a target application program applying the target SDK;
acquiring a direct dependent SDK of a target application program;
acquiring an associated dependent SDK with a dependent relation with the directly dependent SDK from a preset dependent relation database;
detecting a dependency conflict of the target SDK based on the association dependent SDK and the direct dependent SDK.
In a second aspect, a dependency conflict detection apparatus is provided, the apparatus comprising:
the determining module is used for determining a target application program applying the target SDK if the version update of the target software development kit SDK is detected;
the first acquisition module is used for acquiring the direct dependence SDK of the target application program;
the second acquisition module is used for acquiring the associated dependent SDK with the dependent relation with the directly dependent SDK from a preset dependent relation database;
and the detection module is used for detecting the dependency conflict of the target SDK based on the correlation dependent SDK and the direct dependent SDK.
In a third aspect, an electronic device is provided, which includes:
one or more processors;
a memory;
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: a method of implementing the dependency conflict detection illustrated in the first aspect of the present disclosure is performed.
In a fourth aspect, a computer-readable medium is provided, on which a computer program is stored, wherein the program is configured to implement the dependency conflict detection method shown in the first aspect of the present disclosure when executed by a processor.
The technical scheme provided by the disclosure has the following beneficial effects:
if the target SDK version is detected to be updated, determining a target application program applying the target SDK, obtaining a direct dependence SDK and an association dependence SDK of the target application program, detecting dependence conflict of the target SDK based on the association dependence SDK and the direct dependence SDK, determining whether the dependence conflict exists in the application program applying the target SDK when the target SDK version is updated, and effectively avoiding APP crash caused by updating the target SDK version.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flowchart of a method for detecting a dependency conflict according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of dependencies provided in one example of the present disclosure;
fig. 3 is a schematic flowchart of a method for detecting a dependency conflict according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a direct dependency SDK provided in one example of the present disclosure;
FIG. 5 is a schematic diagram of an association dependent SDK provided in one example of the present disclosure;
FIG. 6 is a schematic diagram of a dependency tree provided in one example of the present disclosure;
FIG. 7 is a schematic diagram of a scheme for marking dependency conflicts provided in one example of the present disclosure;
FIG. 8 is a flow chart diagram of a method of dependency collision detection provided in an example of the present disclosure;
fig. 9 is a schematic structural diagram of a dependency conflict detection apparatus according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device relying on collision detection according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and also for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure provides a dependency conflict detection method, apparatus, electronic device and computer readable medium, which aim to solve the above technical problems of the prior art.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
The dependency conflict detection method provided by the embodiment of the disclosure can be applied to a terminal and can also be applied to a server. Those skilled in the art will understand that the "terminal" used herein may be a Mobile phone, a tablet computer, a PDA (Personal Digital Assistant), an MID (Mobile Internet Device), etc.; a "server" may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
The embodiment of the present disclosure provides a method for detecting a dependency conflict, which may be applied to a terminal described in the foregoing application scenario, as shown in fig. 1, the method includes:
step S101, if the version update of the target software development kit SDK is detected, determining a target application program applying the target SDK.
The terminal or the server for performing the dependency conflict detection may receive the version update prompt for the target SDK, or may receive the target SDK of the updated version sent by the development terminal.
Specifically, the target Application program that applies the target SDK is a host APP (Application) corresponding to the target SDK.
Step S102, acquiring the direct dependence SDK of the target application program.
The direct dependent SDK is a first-level dependent SDK of the target application, i.e., an SDK having a direct dependency relationship.
Specifically, the direct dependency SDK of the target application may be obtained by pulling the dependency data of the latest build package of the target application.
And step S103, acquiring the associated dependent SDK with the dependent relation with the directly dependent SDK from a preset dependent relation database.
The preset dependency relationship database may pre-store dependency relationships among a plurality of different SDKs, that is, the preset dependency relationship database includes directly dependent SDKs and indirectly dependent SDKs of each SDK.
Specifically, the association-dependent SDK includes an SDK on which the direct-dependent SDK directly depends and an SDK on which the indirect dependent SDK indirectly depends.
As shown in fig. 2, for the APP in fig. 2, B and C belong to the APP direct dependency SDK; d and E belong to the SDK directly dependent on B and to the SDK indirectly dependent on APP.
In particular, the dependency database may be a Maven repository, which in Maven terminology is a location (place). The Maven warehouse is a third-party warehouse which depends on the project, and the position of the warehouse is called a warehouse, namely the Maven warehouse can comprise the dependency relationship among a plurality of different SDKs.
And step S104, detecting the dependency conflict of the target SDK based on the correlation dependent SDK and the direct dependent SDK.
Specifically, it may be determined whether a dependency conflict for the target SDK exists according to different versions of the target SDK in the association dependent SDK and the direct dependent SDK, and a process of specifically detecting the dependency conflict of the target SDK will be described in detail below.
In the above embodiment, if it is detected that the target SDK version is updated, the target application applying the target SDK is determined, the direct dependent SDK and the associated dependent SDK of the target application are obtained, and the dependency conflict of the target SDK is detected based on the associated dependent SDK and the direct dependent SDK.
The specific process of detecting the dependency conflict of the target SDK will be further explained in the following with reference to the drawings and the embodiments.
As shown in fig. 3, the detecting a dependency conflict of a target SDK based on an association dependent SDK and a direct dependent SDK in step S104 may include:
in step S410, it is determined whether the target SDK belongs to a direct dependent SDK of the target application.
Specifically, the direct dependent SDK of the target application may be obtained, and a packet name or an identifier corresponding to the target SDK is compared with a packet name or an identifier directly dependent on the SDK, so as to determine whether the target SDK belongs to the direct dependent SDK of the target application.
And step S420, if yes, detecting the dependency conflict of the target SDK based on the associated dependency SDK.
Specifically, only when the target SDK belongs to the direct dependent SDK of the target application, i.e., the first-level dependent SDK, the situation that the new version of the SDK accesses the target application can be simulated.
In the specific implementation process, if the target SDK belongs to the direct dependent SDK of the target application, it is only necessary to determine whether the associated dependent SDK further includes another version for the target SDK.
Specifically, the detecting the dependency conflict of the target SDK based on the associated dependency SDK in step S420 may include:
and inquiring whether the association depends on whether at least one target SDK different from other versions of the versions to be updated exists in the SDKs.
The following describes the method of detecting a collision dependency in the present embodiment with reference to an example.
In one example, the identification of the SDK is represented by a letter, the version number of the one SDK is represented by a number, and the same letter is the same SDK. If the target SDK C version update is detected, determining a target application program, i.e., the APP shown in fig. 4, to which the target SDK applies; acquiring the direct dependent SDK of the target application, namely acquiring B1, F1 and C1 shown in fig. 4; acquiring an association dependent SDK having a dependency relationship with a direct dependent SDK, namely acquiring SDKs having an association relationship with B1, F1 and C1 respectively, acquiring B1 direct dependent C2 and C2 direct dependent D1 and E2 shown in FIG. 5, and acquiring F1 direct dependent E1; it is determined whether there are other versions of C in C2, D1, E2, and E1, i.e., there is confirmation of C2, and thus there is a dependency conflict.
The embodiment of the present disclosure provides a possible implementation manner, and the method for detecting a dependency conflict may further include:
(1) if at least one target SDK different from other versions of the version to be updated exists in the associated dependent SDKs, determining that the target SDKs have a dependent conflict;
(2) and sending out a prompt that the dependency conflict exists for the target SDK.
Specifically, if at least one package name or an SDK with the same identifier as the target SDK is found in the associated dependent SDK, the version number of the found SDK is determined, and if the version number of the SDK is different from the version number to be updated, the target SDK is determined to have a dependency conflict.
As shown in fig. 5, if C is queried from the associated dependent SDK in fig. 5, and the version number of C is 2, and the version to be updated is C3, then there is a dependency conflict.
In the specific implementation process, the existence of the dependency conflict may be prompted in different forms, such as a message reminding manner, a voice prompting manner, and the like, and the specific prompting form is not limited herein.
The embodiment of the present disclosure provides a possible implementation manner, and the method for detecting a dependency conflict may further include:
(1) if the target SDK of the version different from the version to be updated exists in the associated dependent SDK, determining the version number of the target SDK of the version different from the version to be updated;
(2) and if the determined version number is not compatible with the version to be updated, determining that the target SDK has dependency conflict.
Specifically, it is possible that the version to be updated and the existing version may be compatible, and therefore it is necessary to determine whether there is another version for the target SDK in the associated dependent SDK, and determine whether the version number is compatible with the version number to be updated, so as to determine the dependency conflict.
The embodiment of the present disclosure provides a possible implementation manner, and the method for detecting a dependency conflict may further include:
(1) constructing a dependency relationship tree aiming at the target application program based on the association dependent SDK and the direct dependent SDK;
(2) and marking the target SDK of the other version different from the version to be updated in the dependency relationship tree.
Specifically, a dependency tree of the target application may be formed according to the association dependent SDK and the direct dependent SDK, and the dependency tree may include all SDKs having a dependency relationship with the application.
As shown in FIG. 6, in one example, in conjunction with the direct dependent SDK shown in FIG. 4 and the associated dependent SDK shown in FIG. 5, a dependency tree may be formed as shown in FIG. 6, wherein the direct dependent SDK of APP comprises B1, F1, and C1; b1 is directly dependent on C2, C2 is directly dependent on D1 and E2, F1 is directly dependent on E1; as shown in fig. 7, if it is detected whether there are other versions of C among C2, D1, E2, and E1, i.e., if it is confirmed that there is C2, C2 and C1 may be marked.
To more clearly illustrate the method of relying on collision detection of the present application, further description will be made below with reference to examples.
As shown in fig. 8, in an example, the method for relying on conflict of the present application may include the following steps:
1) detecting that the target SDK releases a new version, and acquiring the dependency data of a target application program applying the target SDK; namely acquiring the dependency data of host APP; the dependency data comprises a direct dependency SDK and an associated dependency SDK of the target application;
2) judging whether the non-primary dependence of the host APP has SDK dependence of other versions; judging whether the correlation dependent SDK has SDKs of other versions or not;
3) and if so, determining that the dependency conflict exists, sending a dependency conflict prompt, and informing the developer of the occurrence of the dependency conflict.
According to the dependency conflict detection method, if the target SDK version is detected to be updated, the target application program applying the target SDK is determined, the direct dependency SDK and the associated dependency SDK of the target application program are obtained, the dependency conflict of the target SDK is detected based on the associated dependency SDK and the direct dependency SDK, whether the dependency conflict exists in the application program applying the target SDK can be determined when the target SDK version is updated, and APP collapse caused by updating of the target SDK version is effectively avoided.
The embodiment of the present disclosure provides a dependency conflict detection apparatus, and as shown in fig. 9, the dependency conflict detection apparatus 90 may include: a determination module 901, a first acquisition module 902, a second acquisition module 903, and a detection module 904, wherein,
a determining module 901, configured to determine a target application program that applies a target SDK if it is detected that the version of the target software development kit SDK is updated;
a first obtaining module 902, configured to obtain a direct dependent SDK of a target application;
a second obtaining module 903, configured to obtain, from a preset dependency relationship database, an association dependency SDK having a dependency relationship with the direct dependency SDK;
a detecting module 904, configured to detect a dependency conflict of the target SDK based on the association dependent SDK and the direct dependent SDK.
A possible implementation manner is provided in the embodiments of the present disclosure, and the association-dependent SDK includes an SDK directly dependent on the direct-dependent SDK and an SDK indirectly dependent on the direct-dependent SDK.
The embodiment of the present disclosure provides a possible implementation manner, and when detecting a dependency conflict of a target SDK based on an association dependent SDK and a direct dependent SDK, the detecting module is specifically configured to:
determining whether the target SDK belongs to a direct dependent SDK of the target application;
and if so, detecting the dependency conflict of the target SDK based on the correlation dependency SDK.
The embodiment of the present disclosure provides a possible implementation manner, and when detecting a dependency conflict of a target SDK based on an association dependency SDK, the detecting module is specifically configured to:
and inquiring whether the association depends on whether at least one target SDK different from other versions of the versions to be updated exists in the SDKs.
The embodiment of the present disclosure provides a possible implementation manner, further including a prompt module, configured to:
if at least one target SDK different from other versions of the version to be updated exists in the associated dependent SDKs, determining that the target SDKs have a dependent conflict;
and sending out a prompt that the dependency conflict exists for the target SDK.
In this embodiment, a possible implementation manner is provided, and if it is found that at least one target SDK different from another version of the version to be updated exists in the association dependent SDKs, the prompt module is specifically configured to:
if the target SDK of the version different from the version to be updated exists in the associated dependent SDK, determining the version number of the target SDK of the version different from the version to be updated;
and if the determined version number is not compatible with the version to be updated, determining that the target SDK has dependency conflict.
The embodiment of the present disclosure provides a possible implementation manner, further including a marking module, configured to:
constructing a dependency relationship tree aiming at the target application program based on the association dependent SDK and the direct dependent SDK;
and marking the target SDK of the other version different from the version to be updated in the dependency relationship tree.
According to the dependency conflict detection device, if the target SDK version is detected to be updated, the target application program applying the target SDK is determined, the direct dependency SDK and the associated dependency SDK of the target application program are obtained, the dependency conflict of the target SDK is detected based on the associated dependency SDK and the direct dependency SDK, whether the dependency conflict exists in the application program applying the target SDK can be determined when the target SDK version is updated, and APP collapse caused by updating of the target SDK version is effectively avoided.
The image dependency conflict detection apparatus according to the embodiment of the present disclosure may execute the image dependency conflict detection method provided by the embodiment of the present disclosure, and the implementation principle is similar, the actions performed by each module in the image dependency conflict detection apparatus according to each embodiment of the present disclosure correspond to the steps in the image dependency conflict detection method according to each embodiment of the present disclosure, and for the detailed function description of each module of the image dependency conflict detection apparatus, reference may be specifically made to the description in the corresponding image dependency conflict detection method shown in the foregoing, and details are not repeated here.
Referring now to FIG. 10, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as the processing device 601 hereinafter, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603 and a storage device 608 hereinafter, which are specifically shown as follows:
as shown in fig. 10, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 10 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
if the version of the target software development kit SDK is detected to be updated, determining a target application program applying the target SDK;
acquiring a direct dependent SDK of a target application program;
acquiring an associated dependent SDK with a dependent relation with the directly dependent SDK from a preset dependent relation database;
detecting a dependency conflict of the target SDK based on the association dependent SDK and the direct dependent SDK.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a module or unit does not in some cases constitute a limitation on the unit itself, for example, a detection module may also be described as a "module for detecting dependency conflicts".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a dependency conflict detection method including:
if the version of the target software development kit SDK is detected to be updated, determining a target application program applying the target SDK;
acquiring a direct dependent SDK of a target application program;
acquiring an associated dependent SDK with a dependent relation with the directly dependent SDK from a preset dependent relation database;
detecting a dependency conflict of the target SDK based on the association dependent SDK and the direct dependent SDK.
In accordance with one or more embodiments of the present disclosure, the association dependent SDK includes an SDK on which the direct dependent SDK directly depends and an SDK on which the indirect dependent SDK indirectly depends.
According to one or more embodiments of the present disclosure, detecting a dependency conflict of a target SDK based on an association dependent SDK and a direct dependent SDK includes:
determining whether the target SDK belongs to a direct dependent SDK of the target application;
and if so, detecting the dependency conflict of the target SDK based on the correlation dependency SDK.
According to one or more embodiments of the present disclosure, detecting a dependency conflict of a target SDK based on an association dependent SDK includes:
and inquiring whether the association depends on whether at least one target SDK different from other versions of the versions to be updated exists in the SDKs.
According to one or more embodiments of the present disclosure, further comprising:
if at least one target SDK different from other versions of the version to be updated exists in the associated dependent SDKs, determining that the target SDKs have a dependent conflict;
and sending out a prompt that the dependency conflict exists for the target SDK.
According to one or more embodiments of the present disclosure, if it is queried that there is at least one target SDK different from other versions of the to-be-updated version in the association dependent SDKs, determining that there is a dependency conflict in the target SDK includes:
if the target SDK of the version different from the version to be updated exists in the associated dependent SDK, determining the version number of the target SDK of the version different from the version to be updated;
and if the determined version number is not compatible with the version to be updated, determining that the target SDK has dependency conflict.
According to one or more embodiments of the present disclosure, further comprising:
constructing a dependency relationship tree aiming at the target application program based on the association dependent SDK and the direct dependent SDK;
and marking the target SDK of the other version different from the version to be updated in the dependency relationship tree.
According to one or more embodiments of the present disclosure, there is provided a dependency conflict detection apparatus including:
the determining module is used for determining a target application program applying the target SDK if the version update of the target software development kit SDK is detected;
the first acquisition module is used for acquiring the direct dependence SDK of the target application program;
the second acquisition module is used for acquiring the associated dependent SDK with the dependent relation with the directly dependent SDK from a preset dependent relation database;
and the detection module is used for detecting the dependency conflict of the target SDK based on the correlation dependent SDK and the direct dependent SDK.
According to one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory;
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: a dependency collision detection method according to any of the above embodiments is performed.
According to one or more embodiments of the present disclosure, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the dependency collision detection method of any of the above-described embodiments.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A dependency collision detection method, comprising:
if the version update of the target software development kit SDK is detected, determining a target application program applying the target SDK;
acquiring a direct dependent SDK of the target application program;
acquiring an associated dependent SDK with a dependent relation with the directly dependent SDK from a preset dependent relation database;
detecting a dependency conflict of the target SDK based on the associated dependent SDK and the directly dependent SDK.
2. The dependency conflict detection method of claim 1, wherein the association-dependent SDKs comprise SDKs that are directly dependent on the direct-dependent SDK and SDKs that are indirectly dependent on the direct-dependent SDK.
3. The method according to claim 1, wherein the detecting the dependency conflict of the target SDK based on the associated dependent SDK and the directly dependent SDK comprises:
determining whether the target SDK belongs to a direct dependent SDK of the target application;
and if so, detecting the dependency conflict of the target SDK based on the associated dependency SDK.
4. The method according to claim 3, wherein the detecting the dependency conflict of the target SDK based on the associated dependency SDK comprises:
and inquiring whether at least one target SDK different from the other versions of the versions to be updated exists in the association dependent SDKs.
5. The dependency collision detection method of claim 4, further comprising:
if at least one target SDK different from other versions of the version to be updated exists in the associated dependent SDKs, determining that the target SDKs have a dependent conflict;
and sending out a prompt that the dependency conflict aiming at the target SDK exists.
6. The method according to claim 4, wherein if it is found that there is at least one target SDK different from the other version to be updated in the associated dependent SDKs, determining that there is a dependency conflict in the target SDK comprises:
if the target SDK of the version different from the version to be updated exists in the associated dependent SDK, determining the version number of the target SDK of the version different from the version to be updated;
and if the determined version number is not compatible with the version to be updated, determining that the target SDK has dependency conflict.
7. The dependency collision detection method according to claim 5 or 6, further comprising:
constructing a dependency relationship tree for the target application program based on the association dependent SDK and the direct dependent SDK;
and marking the target SDKs of other versions different from the version to be updated in the dependency relationship tree.
8. A dependency collision detection apparatus, comprising:
the determining module is used for determining a target application program applying the target SDK if the version update of the target software development kit SDK is detected;
the first acquisition module is used for acquiring the direct dependence SDK of the target application program;
the second acquisition module is used for acquiring the associated dependent SDK with the dependent relation with the directly dependent SDK from a preset dependent relation database;
a detection module for detecting a dependency conflict of the target SDK based on the associated dependent SDK and the direct dependent SDK.
9. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: performing the dependency conflict detection method of any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the dependency collision detection method of any one of claims 1 to 7.
CN202011086778.0A 2020-10-12 2020-10-12 Dependency conflict detection method and device, electronic equipment and computer readable medium Pending CN112214408A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011086778.0A CN112214408A (en) 2020-10-12 2020-10-12 Dependency conflict detection method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011086778.0A CN112214408A (en) 2020-10-12 2020-10-12 Dependency conflict detection method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN112214408A true CN112214408A (en) 2021-01-12

Family

ID=74053577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011086778.0A Pending CN112214408A (en) 2020-10-12 2020-10-12 Dependency conflict detection method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112214408A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799937A (en) * 2021-01-13 2021-05-14 东北大学 Method for automatically detecting dependency conflict problem in Maven project based on GitHub
CN113793063A (en) * 2021-09-28 2021-12-14 广东电网有限责任公司 Method and device for detecting conflict of power distribution network planning project schemes
CN114328270A (en) * 2022-01-20 2022-04-12 重庆长安汽车股份有限公司 OTA upgrade detection method based on SOA (service oriented architecture) service and readable storage medium
WO2022199160A1 (en) * 2021-03-25 2022-09-29 京东科技控股股份有限公司 Method for resolving component version conflict, device, and storage medium
CN115373824A (en) * 2022-10-24 2022-11-22 恒生电子股份有限公司 Conflict detection method, device, computing equipment and computer readable storage medium
CN114328270B (en) * 2022-01-20 2024-05-03 重庆长安汽车股份有限公司 OTA upgrade detection method based on SOA service and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130227542A1 (en) * 2012-02-28 2013-08-29 International Business Machines Corporation Version conflict checking to installable unit
CN106371838A (en) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 Method and system for maintaining software package dependence relationship
CN109343841A (en) * 2018-10-15 2019-02-15 上海理工大学 Semantic conflict digestion procedure under real-time collaborative programmed environment
CN110377311A (en) * 2019-07-19 2019-10-25 上海擎感智能科技有限公司 OTA terminal staging method, system, medium and OTA terminal based on software dependence
CN111061643A (en) * 2019-12-24 2020-04-24 五八同城信息技术有限公司 SDK cluster compatibility detection method and device, electronic equipment and storage medium
CN111241823A (en) * 2020-01-07 2020-06-05 北京字节跳动网络技术有限公司 Dependency configuration management method and device, electronic equipment and storage medium
CN111679852A (en) * 2020-05-29 2020-09-18 北京五八信息技术有限公司 Detection method and device for conflict dependency library

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130227542A1 (en) * 2012-02-28 2013-08-29 International Business Machines Corporation Version conflict checking to installable unit
CN106371838A (en) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 Method and system for maintaining software package dependence relationship
CN109343841A (en) * 2018-10-15 2019-02-15 上海理工大学 Semantic conflict digestion procedure under real-time collaborative programmed environment
CN110377311A (en) * 2019-07-19 2019-10-25 上海擎感智能科技有限公司 OTA terminal staging method, system, medium and OTA terminal based on software dependence
CN111061643A (en) * 2019-12-24 2020-04-24 五八同城信息技术有限公司 SDK cluster compatibility detection method and device, electronic equipment and storage medium
CN111241823A (en) * 2020-01-07 2020-06-05 北京字节跳动网络技术有限公司 Dependency configuration management method and device, electronic equipment and storage medium
CN111679852A (en) * 2020-05-29 2020-09-18 北京五八信息技术有限公司 Detection method and device for conflict dependency library

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799937A (en) * 2021-01-13 2021-05-14 东北大学 Method for automatically detecting dependency conflict problem in Maven project based on GitHub
CN112799937B (en) * 2021-01-13 2023-09-26 东北大学 Method for automatically detecting dependence conflict problem in Maven project based on Github
WO2022199160A1 (en) * 2021-03-25 2022-09-29 京东科技控股股份有限公司 Method for resolving component version conflict, device, and storage medium
CN113793063A (en) * 2021-09-28 2021-12-14 广东电网有限责任公司 Method and device for detecting conflict of power distribution network planning project schemes
CN114328270A (en) * 2022-01-20 2022-04-12 重庆长安汽车股份有限公司 OTA upgrade detection method based on SOA (service oriented architecture) service and readable storage medium
CN114328270B (en) * 2022-01-20 2024-05-03 重庆长安汽车股份有限公司 OTA upgrade detection method based on SOA service and readable storage medium
CN115373824A (en) * 2022-10-24 2022-11-22 恒生电子股份有限公司 Conflict detection method, device, computing equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN112214408A (en) Dependency conflict detection method and device, electronic equipment and computer readable medium
CN110851139B (en) Method and device for checking codes and electronic equipment
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN110865846B (en) Application management method, device, terminal, system and storage medium
CN111273830A (en) Data display method and device, electronic equipment and computer readable medium
CN112714042B (en) Pressure testing method and device, electronic equipment and storage medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN113220281A (en) Information generation method and device, terminal equipment and storage medium
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN112306685A (en) Task isolation method and device, electronic equipment and computer readable medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN110888773A (en) Method, device, medium and electronic equipment for obtaining thread identification
CN116302271A (en) Page display method and device and electronic equipment
CN111625326B (en) Task pipeline execution method and device and electronic equipment
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN111782895B (en) Retrieval processing method and device, readable medium and electronic equipment
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable medium
CN111581305B (en) Feature processing method, device, electronic equipment and medium
CN111694679B (en) Message processing method and device and electronic equipment
CN111562913B (en) Method, device and equipment for pre-creating view component and computer readable medium
CN113448550B (en) Method and device for realizing collection management of classes, electronic equipment and computer medium
CN111625707B (en) Recommendation response method, device, medium and equipment
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN116680316A (en) Method, device, medium and electronic equipment for acquiring dimension data

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
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information