CN117608639A - Method and device for processing dependence conflict of software development kit version - Google Patents

Method and device for processing dependence conflict of software development kit version Download PDF

Info

Publication number
CN117608639A
CN117608639A CN202311605284.2A CN202311605284A CN117608639A CN 117608639 A CN117608639 A CN 117608639A CN 202311605284 A CN202311605284 A CN 202311605284A CN 117608639 A CN117608639 A CN 117608639A
Authority
CN
China
Prior art keywords
software development
development kit
version
processed
kits
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
CN202311605284.2A
Other languages
Chinese (zh)
Inventor
李可
罗涛
张新明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311605284.2A priority Critical patent/CN117608639A/en
Publication of CN117608639A publication Critical patent/CN117608639A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for processing dependence conflicts of software development kit versions, relates to the technical field of data processing, and can be used in the financial field or other technical fields. The method comprises the following steps: acquiring a software development kit and a dependency relationship thereof; identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts; traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship; version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result. The apparatus performs the above method. The method and the device provided by the embodiment of the invention can solve the problem of dependence conflict.

Description

Method and device for processing dependence conflict of software development kit version
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a device for processing dependence conflicts of software development kit versions.
Background
Along with the continuous increase of the code volume of the client, the direct dependence and the indirect dependence of each functional module are complex, and the dependence conflict of each software development kit version occurs.
In the prior art, the version abnormality of the software development kit is detected through the IDE, then the problem of dependence conflict is manually solved by a developer, the labor cost is high, and the compatibility problem of application engineering codes is easily caused due to manual modification of the developer.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a method and a device for processing dependence conflicts of software development kit versions, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides a method for processing a dependency conflict of a software development kit version, including:
analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structures and the dependency relationship among the software development kits;
Identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts;
traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
The identifying the software development kit identifications of all the software development kits to obtain the software development kit types with dependency conflicts comprises the following steps:
the software development kit identification is subjected to type identification to obtain the type of the software development kit;
and carrying out version character recognition on the software development kit identification, and taking the software development kit type with inconsistent version characters as the software development kit type with dependence conflict.
The determining the category of the software development kit to be processed at the current hierarchical position in the tree structure according to the dependency relationship comprises the following steps:
And acquiring the type of the software development kit at the current hierarchical position, and if the type of the software development kit is determined to be not unique, sequentially taking the type of the software development kit with higher dependency relationship as the type of the software development kit to be processed.
The method for processing the dependence conflict of the software development kit version further comprises the following steps:
if the software development kit type is determined to be unique, the unique software development kit type is directly used as the software development kit type to be processed.
The method comprises the steps of carrying out version unified processing on the types of the software development kits to be processed, and carrying out compatibility testing on all the software development kits in sequence, wherein the method comprises the following steps:
and respectively replacing the types of the software development kits to be processed with versions represented by unified version characters, and sequentially carrying out compatibility test on all the software development kits through the versions represented by the unified version characters.
The compatibility test result comprises the number of errors in the compatibility test; correspondingly, the determining the target version of the type of the software development kit to be processed according to the compatibility test result comprises the following steps:
acquiring the number of the compatibility test errors respectively corresponding to the types of the software development kits to be processed of different versions;
And determining the version with the least error number of the compatibility test as the target version.
The method for processing the dependence conflict of the software development kit version further comprises the following steps:
if the version with the least number of the error reporting of the compatibility test is determined to be not unique, the version grade of the version with the least number of the error reporting of the compatibility test is obtained, and the version with the higher version grade and the least number of the error reporting of the compatibility test is taken as the target version.
In one aspect, the present invention provides a device for processing a dependency conflict of a software development kit version, including:
the analysis unit is used for analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structure and the dependency relationship among the software development kits;
the identification unit is used for identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependence conflicts;
the determining unit is used for traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
The processing unit is used for carrying out version unified processing on the types of the software development kits to be processed, carrying out compatibility test on all the software development kits in sequence, and determining the target version of the types of the software development kits to be processed according to the compatibility test result.
In still another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein,
the processor and the memory complete communication with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions capable of performing the method of:
analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structures and the dependency relationship among the software development kits;
identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts;
traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
Version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
Embodiments of the present invention provide a non-transitory computer readable storage medium comprising:
the non-transitory computer readable storage medium stores computer instructions that cause the computer to perform the method of:
analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structures and the dependency relationship among the software development kits;
identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts;
traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
According to the method and the device for processing the dependency conflict of the software development kit version, the application project codes are analyzed and processed to obtain the software development kits respectively corresponding to the functional modules represented by the tree structure and the dependency relations among the software development kits; identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts; traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship; version unified processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result, so that the problem of dependence conflict of the versions of the software development kits can be efficiently solved, and the compatibility problem of application engineering codes is relieved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of a method for handling dependency conflicts for a software development kit version according to an embodiment of the present invention.
Fig. 2 is a schematic diagram illustrating a tree structure according to an embodiment of the present invention.
FIG. 3 is a schematic diagram of a device for handling a conflict depending on a version of a software development kit according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of an entity structure of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be arbitrarily combined with each other.
Fig. 1 is a flowchart of a method for processing a dependency conflict of a software development kit version according to an embodiment of the present invention, where as shown in fig. 1, the method for processing a dependency conflict of a software development kit version according to an embodiment of the present invention includes:
step S1: and analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structure and the dependency relationship among the software development kits.
Step S2: and identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts.
Step S3: traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current hierarchical position in the tree structure according to the dependency relationship.
Step S4: version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
In the step S1, the device analyzes and processes the application engineering code to obtain a software development kit corresponding to each functional module represented by the tree structure, and a dependency relationship between the software development kits. The apparatus may be a computer device performing the method, for example, a server, which may be connected to a client storing the application code, and perform analysis processing and subsequent steps on the application code. It should be noted that, the data acquisition and analysis according to the embodiments of the present invention are authorized by the user.
The IDE can be utilized to analyze and process the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structure and the dependency relationship among the software development kits. As shown in fig. 2, the application engineering code is an engineering code corresponding to an application, and the application engineering code includes modules 1 to 4, wherein:
the module 1 corresponds to a software development kit SDK B2.1, a software development kit SDK C2.2 and a software development kit SDK A2.3, wherein the SDK B2.1 and the SDK C2.2 depend on the module 1, and the SDK A2.3 depends on the SDK B2.1.
The module 2 corresponds to the software development kit SDK B2.2 and the software development kit SDK a2.4, and the SDK a2.4 depends on the SDK B2.2.
Module 3 corresponds to software development kit SDK a 2.1.
Module 4 corresponds to software development kit SDK C2.2.
The dependency relationship can be identified by recursively analyzing the dependency items configured in the configuration file build. Gradle file of each android module and the dependency information configured in the pon file of the maven library.
In the step S2, the device identifies the software development kit identifiers of all the software development kits, and obtains the software development kit types with dependency conflicts. As shown in fig. 2, the software development kit identifier may include SDK B2.1 and SDK C2.2, where A, B and C are used to represent software development kit types, 2.1 and 2.2 are used to represent version characters, and if there are different version characters in the same type of software development kit, it indicates that there is a dependency conflict in the software development kit of the type, for example, there are three different version characters in the software development kit SDK a, 2.1, 2.3 and 2.4, and it indicates that there is a dependency conflict in the software development kit type a.
Similarly, there is a dependency conflict for software development kit class B. There is no dependency conflict for software development kit class C.
In summary, there are conflicting software development kit categories including software development kit category A and software development kit category B.
The identifying the software development kit identifications of all the software development kits to obtain the software development kit types with dependency conflicts comprises the following steps:
the software development kit identification is subjected to type identification to obtain the type of the software development kit; as shown in fig. 2, by recognizing letters A, B and C and the like therein, a software development kit category a, a software development kit category B, and a software development kit category C can be obtained.
And carrying out version character recognition on the software development kit identification, and taking the software development kit type with inconsistent version characters as the software development kit type with dependence conflict. As shown in fig. 2, the software development kit class a may be determined to be the software development kit class for which there is a dependency conflict, for example, by identifying 2.1, 2.3, and 2.4 in the SDK a.
In the step S3, the device traverses the tree structure layer by layer according to the order of the dependency relationship from high to low, and determines the type of the software development kit to be processed at the current hierarchical position in the tree structure according to the dependency relationship. With reference to the above description about the tree structure, it is possible to determine the order of the dependency relationship from high to low as an application, each module, each SDK directly connected to each module, each SDK indirectly connected to each module.
The tree structure is traversed layer by layer, i.e. according to the order of L1 to L4 as shown in fig. 2.
Because the L1 layer is an application layer and the L2 layer is a module layer, the software development kit is not contained, and therefore, the type of the software development kit to be processed can be determined directly from the L3 layer.
The determining the category of the software development kit to be processed at the current hierarchical position in the tree structure according to the dependency relationship comprises the following steps:
and acquiring the type of the software development kit at the current hierarchical position, and if the type of the software development kit is determined to be not unique, sequentially taking the type of the software development kit with higher dependency relationship as the type of the software development kit to be processed. As shown in fig. 2, the software development kit types at the current hierarchical position L3 include a software development kit type a, a software development kit type B, and a software development kit type C, wherein the software development kit type C is a software development kit type for which there is no dependency conflict, and thus, the first-performed software development kit type to be processed can be determined from the software development kit type a and the software development kit type B.
Since the SDK a 2.3 depends on the SDK B2.1, the SDK a 2.4 depends on the SDK B2.2, and the SDK a 2.1 does not depend on the software development kit type thereof, the dependency of the SDK B is higher than that of the SDK a, the SDK B is used as the type of the software development kit to be processed, the subsequent step S4 can be performed on the type of the software development kit to be processed B, the SDK a is used as the type of the software development kit to be processed after the target version of the type of the software development kit to be processed is obtained, the subsequent step S4 can be performed on the type of the software development kit to be processed, and all the dependency conflicts of the software development kit versions are resolved after the target version of the type of the software development kit to be processed is obtained.
By sequentially taking the software development kit types with higher dependency relationships as the software development kit types to be processed, the method can realize that the type of the software development kit to be processed which is firstly carried out can not influence the type of the software development kit to be processed which is carried out later, thereby improving the accuracy of the follow-up determination of the target version.
The method for processing the dependence conflict of the software development kit version further comprises the following steps:
if the software development kit type is determined to be unique, the unique software development kit type is directly used as the software development kit type to be processed. As shown in fig. 2, if the SDK a 2.1 therein is replaced with the SDK B2.3 therein, the software development kit type is unique at the current hierarchical position L3, i.e., the software development kit type B is regarded as the software development kit type to be processed.
In the step S4, the device performs version unified processing on the types of the software development kits to be processed, sequentially performs compatibility test on all the software development kits, and determines the target version of the type of the software development kit to be processed according to the compatibility test result. Version unification processing is carried out on the types of the software development kits to be processed, and compatibility testing is carried out on all the software development kits in sequence, wherein the method comprises the following steps:
and respectively replacing the types of the software development kits to be processed with versions represented by unified version characters, and sequentially carrying out compatibility test on all the software development kits through the versions represented by the unified version characters. Taking the type B of the software development kit to be processed as an example (taking the case of reserving the SDK A2.1 as an example, and the case of replacing the SDK A2.1 is not repeated), the type B of the software development kit to be processed can be replaced by the SDK B2.1, and all software development kits in the application are subjected to compatibility test, and the compatibility test result is recorded as TB2.1.
And the type B of the software development kit to be processed can be replaced by SDK B2.2, and compatibility test is carried out on all the software development kits in the application, wherein the compatibility test result is recorded as TB2.2.
The sequence of the version unified processing of the types of the software development kits to be processed is not particularly limited, and the types B of the software development kits to be processed can be replaced by SDK B2.2 at first, or the types B of the software development kits to be processed can be replaced by SDK B2.1 at first.
The compatibility test result comprises the number of errors in the compatibility test; correspondingly, the determining the target version of the type of the software development kit to be processed according to the compatibility test result comprises the following steps:
acquiring the number of the compatibility test errors respectively corresponding to the types of the software development kits to be processed of different versions;
and determining the version with the least error number of the compatibility test as the target version. If the number of the compatibility test errors corresponding to the TB2.1 is smaller than the number of the compatibility test errors corresponding to the TB2.2, the SDK B2.1 is used as the version of the SDK B, namely, all the versions of the SDK B are updated to be the SDK B2.1 as shown in figure 2.
The method for processing the dependence conflict of the software development kit version further comprises the following steps:
if the version with the least number of the error reporting of the compatibility test is determined to be not unique, the version grade of the version with the least number of the error reporting of the compatibility test is obtained, and the version with the higher version grade and the least number of the error reporting of the compatibility test is taken as the target version. If the number of the compatibility test errors corresponding to the TB2.1 is equal to the number of the compatibility test errors corresponding to the TB2.2, since the version level of the SDK B2.2 is higher than that of the SDK B2.1, the SDK B2.2 is regarded as the version of the SDK B, i.e., all the versions of the SDK B as in fig. 2 are updated to the SDK B2.2.
After the version of the SDK B is updated, the version of the SDK a may be updated, which is not described in detail.
For the example shown in fig. 2, after the version of the SDK B is updated first in the L3 layer, since the L3 layer further includes the SDK a 2.1, the processing of completing the dependency conflict between the SDK a and the SDK B can be performed entirely in the L3 layer, and no subsequent processing is required in the L4 layer.
However, if the case where SDK a 2.1 is replaced with SDK B2.3 therein as shown in fig. 2 is considered, the processing of the dependency conflict of SDK B can be completed at the L3 layer, and the processing of the dependency conflict of SDK a is completed at the L4 layer by performing a layer-by-layer traversal of the tree structure in the order of the dependency relationship from high to low.
It should be noted that, in order to more accurately and reasonably determine the updated target version, the determination may be performed manually after determining the target version of the type of the software development kit to be processed, and then the determination may be performed.
The method for processing the dependence conflicts of the software development kit version can automatically identify the dependence library version conflict condition, analyze and provide the best version suggestion, and mark the content of the compatibility conflict between the current code and the suggested best version through static code analysis, so that suggestions are provided for a developer to decide the dependence library version, the workload of manually analyzing the dependence conflicts by the developer is reduced, and the code quality is improved.
According to the method for processing the dependency conflict of the software development kit version, which is provided by the embodiment of the invention, the application project codes are analyzed and processed to obtain the software development kits respectively corresponding to the functional modules represented by the tree structure and the dependency relationship among the software development kits; identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts; traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship; version unified processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result, so that the problem of dependence conflict of the versions of the software development kits can be efficiently solved, and the compatibility problem of application engineering codes is relieved.
Further, the identifying the software development kit identifier of all the software development kits to obtain the software development kit category with dependency conflict includes:
The software development kit identification is subjected to type identification to obtain the type of the software development kit; the description of the embodiments may be referred to above, and will not be repeated.
And carrying out version character recognition on the software development kit identification, and taking the software development kit type with inconsistent version characters as the software development kit type with dependence conflict. The description of the embodiments may be referred to above, and will not be repeated.
The method for processing the dependence conflict of the software development kit version provided by the embodiment of the invention can accurately identify the type of the software development kit with the dependence conflict.
Further, the determining the category of the software development kit to be processed at the current hierarchical position in the tree structure according to the dependency relationship includes:
and acquiring the type of the software development kit at the current hierarchical position, and if the type of the software development kit is determined to be not unique, sequentially taking the type of the software development kit with higher dependency relationship as the type of the software development kit to be processed. The description of the embodiments may be referred to above, and will not be repeated.
The conflict-dependent processing method for the software development kit version provided by the embodiment of the invention can reasonably determine the sequence of the types of the software development kits to be processed.
Further, the method for processing the dependency conflict of the software development kit version further comprises the following steps:
if the software development kit type is determined to be unique, the unique software development kit type is directly used as the software development kit type to be processed. The description of the embodiments may be referred to above, and will not be repeated.
The conflict-dependent processing method for the software development kit version provided by the embodiment of the invention can further reasonably determine the sequence of the types of the software development kits to be processed.
Further, the unified version processing is performed on the types of the software development kits to be processed, and compatibility testing is performed on all the software development kits in sequence, including:
and respectively replacing the types of the software development kits to be processed with versions represented by unified version characters, and sequentially carrying out compatibility test on all the software development kits through the versions represented by the unified version characters. The description of the embodiments may be referred to above, and will not be repeated.
According to the conflict-dependent processing method for the software development kit version, provided by the embodiment of the invention, the version represented by the unified version character can be conveniently and orderly implemented to carry out compatibility test on all the software development kits.
Further, the compatibility test result comprises the number of errors of the compatibility test; correspondingly, the determining the target version of the type of the software development kit to be processed according to the compatibility test result comprises the following steps:
acquiring the number of the compatibility test errors respectively corresponding to the types of the software development kits to be processed of different versions; the description of the embodiments may be referred to above, and will not be repeated.
And determining the version with the least error number of the compatibility test as the target version. The description of the embodiments may be referred to above, and will not be repeated.
The conflict-dependent processing method for the software development kit version provided by the embodiment of the invention can reasonably determine the target version of the software development kit type to be processed.
Further, the method for processing the dependency conflict of the software development kit version further comprises the following steps:
if the version with the least number of the error reporting of the compatibility test is determined to be not unique, the version grade of the version with the least number of the error reporting of the compatibility test is obtained, and the version with the higher version grade and the least number of the error reporting of the compatibility test is taken as the target version. The description of the embodiments may be referred to above, and will not be repeated.
The conflict-dependent processing method for the software development kit version provided by the embodiment of the invention can further reasonably determine the target version of the software development kit type to be processed.
It should be noted that, the conflict-dependent processing method for the software development kit version provided by the embodiment of the invention can be used in the financial field, and also can be used in any technical field except the financial field.
Fig. 3 is a schematic structural diagram of a device for processing dependency conflicts of software development kit versions according to an embodiment of the present invention, and as shown in fig. 3, the device for processing dependency conflicts of software development kit versions according to an embodiment of the present invention includes an analysis unit 301, an identification unit 302, a determination unit 303, and a processing unit 304, where:
the analysis unit 301 is configured to perform analysis processing on the application engineering code, so as to obtain a software development kit corresponding to each functional module represented by the tree structure, and a dependency relationship between the software development kits; the identifying unit 302 is configured to identify the software development kit identifiers of all the software development kits, so as to obtain the software development kit types with dependency conflicts; the determining unit 303 is configured to traverse the tree structure layer by layer according to a dependency relationship from high to low, and determine a type of a software development kit to be processed at a current hierarchical position in the tree structure according to the dependency relationship; the processing unit 304 is configured to perform version unified processing on the types of the software development kits to be processed, sequentially perform compatibility testing on all the software development kits, and determine a target version of the types of the software development kits to be processed according to the compatibility testing result.
Specifically, the analysis unit 301 in the device is configured to analyze and process the application engineering code to obtain a software development kit corresponding to each functional module represented by the tree structure, and a dependency relationship between the software development kits; the identifying unit 302 is configured to identify the software development kit identifiers of all the software development kits, so as to obtain the software development kit types with dependency conflicts; the determining unit 303 is configured to traverse the tree structure layer by layer according to a dependency relationship from high to low, and determine a type of a software development kit to be processed at a current hierarchical position in the tree structure according to the dependency relationship; the processing unit 304 is configured to perform version unified processing on the types of the software development kits to be processed, sequentially perform compatibility testing on all the software development kits, and determine a target version of the types of the software development kits to be processed according to the compatibility testing result.
The device for processing the dependence conflict of the software development kit version provided by the embodiment of the invention analyzes and processes the application engineering codes to obtain the software development kits respectively corresponding to the functional modules represented by the tree structure and the dependence relations among the software development kits; identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts; traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship; version unified processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result, so that the problem of dependence conflict of the versions of the software development kits can be efficiently solved, and the compatibility problem of application engineering codes is relieved.
Further, the identifying unit 302 is specifically configured to:
the software development kit identification is subjected to type identification to obtain the type of the software development kit;
and carrying out version character recognition on the software development kit identification, and taking the software development kit type with inconsistent version characters as the software development kit type with dependence conflict.
The device for processing the dependence conflict of the software development kit version provided by the embodiment of the invention can accurately identify the type of the software development kit with the dependence conflict.
Further, the determining unit 303 is specifically configured to:
and acquiring the type of the software development kit at the current hierarchical position, and if the type of the software development kit is determined to be not unique, sequentially taking the type of the software development kit with higher dependency relationship as the type of the software development kit to be processed.
The conflict-dependent processing device for the software development kit version provided by the embodiment of the invention can reasonably determine the sequence of the types of the software development kits to be processed.
Further, the device for processing the dependency conflict of the software development kit version is further configured to:
if the software development kit type is determined to be unique, the unique software development kit type is directly used as the software development kit type to be processed.
The conflict-dependent processing device for the software development kit version provided by the embodiment of the invention can further reasonably determine the sequence of the types of the software development kits to be processed.
Further, the processing unit 304 is specifically configured to:
and respectively replacing the types of the software development kits to be processed with versions represented by unified version characters, and sequentially carrying out compatibility test on all the software development kits through the versions represented by the unified version characters.
The conflict-dependent processing device for the software development kit version provided by the embodiment of the invention can conveniently and orderly realize compatibility test on all software development kits through the version represented by the unified version character.
Further, the compatibility test result comprises the number of errors of the compatibility test; accordingly, the processing unit 304 is specifically configured to:
acquiring the number of the compatibility test errors respectively corresponding to the types of the software development kits to be processed of different versions;
and determining the version with the least error number of the compatibility test as the target version.
The conflict-dependent processing device for the software development kit version provided by the embodiment of the invention can reasonably determine the target version of the type of the software development kit to be processed.
Further, the device for processing the dependency conflict of the software development kit version is further configured to:
if the version with the least number of the error reporting of the compatibility test is determined to be not unique, the version grade of the version with the least number of the error reporting of the compatibility test is obtained, and the version with the higher version grade and the least number of the error reporting of the compatibility test is taken as the target version.
The conflict-dependent processing device for the software development kit version provided by the embodiment of the invention can further reasonably determine the target version of the type of the software development kit to be processed.
The embodiment of the conflict-dependent processing device provided by the embodiment of the present invention for a software development kit version may be specifically used to execute the processing flow of each method embodiment, and the functions thereof are not described herein in detail, and reference may be made to the detailed description of the method embodiments.
Fig. 4 is a schematic diagram of an entity structure of an electronic device according to an embodiment of the present invention, as shown in fig. 4, where the electronic device includes: a processor (processor) 401, a memory (memory) 402, and a bus 403;
wherein, the processor 401 and the memory 402 complete the communication with each other through the bus 403;
the processor 401 is configured to call the program instructions in the memory 402 to perform the methods provided in the above method embodiments, for example, including:
Analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structures and the dependency relationship among the software development kits;
identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts;
traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example comprising:
Analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structures and the dependency relationship among the software development kits;
identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts;
traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
The present embodiment provides a computer-readable storage medium storing a computer program that causes the computer to execute the methods provided by the above-described method embodiments, for example, including:
analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structures and the dependency relationship among the software development kits;
Identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts;
traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 the description of the present specification, reference to the terms "one embodiment," "one particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A method for handling a dependency conflict of a software development kit version, comprising:
analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structures and the dependency relationship among the software development kits;
identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependency conflicts;
traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
version unification processing is carried out on the types of the software development kits to be processed, compatibility testing is carried out on all the software development kits in sequence, and the target version of the types of the software development kits to be processed is determined according to the compatibility testing result.
2. The method for processing the dependency conflict of the software development kit version according to claim 1, wherein the identifying the software development kit identifications of all the software development kits to obtain the software development kit types with the dependency conflict comprises:
the software development kit identification is subjected to type identification to obtain the type of the software development kit;
and carrying out version character recognition on the software development kit identification, and taking the software development kit type with inconsistent version characters as the software development kit type with dependence conflict.
3. The method for processing a dependency conflict of a software development kit version according to claim 1, wherein the determining a type of a software development kit to be processed at a current hierarchical position in the tree structure according to the dependency relation comprises:
and acquiring the type of the software development kit at the current hierarchical position, and if the type of the software development kit is determined to be not unique, sequentially taking the type of the software development kit with higher dependency relationship as the type of the software development kit to be processed.
4. The method for processing a dependency conflict of a software development kit version according to claim 3, further comprising:
If the software development kit type is determined to be unique, the unique software development kit type is directly used as the software development kit type to be processed.
5. The method for processing the version-dependent conflict of the software development kit according to claim 1, wherein the performing version-unified processing on the type of the software development kit to be processed sequentially performs compatibility testing on all software development kits, and the method comprises the following steps:
and respectively replacing the types of the software development kits to be processed with versions represented by unified version characters, and sequentially carrying out compatibility test on all the software development kits through the versions represented by the unified version characters.
6. The method for processing a dependency conflict of a software development kit version according to any one of claims 1 to 5, wherein the compatibility test result includes a compatibility test error count; correspondingly, the determining the target version of the type of the software development kit to be processed according to the compatibility test result comprises the following steps:
acquiring the number of the compatibility test errors respectively corresponding to the types of the software development kits to be processed of different versions;
and determining the version with the least error number of the compatibility test as the target version.
7. The method for processing a dependency conflict of a software development kit version according to claim 6, further comprising:
if the version with the least number of the error reporting of the compatibility test is determined to be not unique, the version grade of the version with the least number of the error reporting of the compatibility test is obtained, and the version with the higher version grade and the least number of the error reporting of the compatibility test is taken as the target version.
8. A device for handling a conflict of dependency of a software development kit version, comprising:
the analysis unit is used for analyzing and processing the application engineering codes to obtain software development kits respectively corresponding to the functional modules represented by the tree structure and the dependency relationship among the software development kits;
the identification unit is used for identifying the software development kit identifications of all the software development kits to obtain the types of the software development kits with dependence conflicts;
the determining unit is used for traversing the tree structure layer by layer according to the sequence from high to low of the dependency relationship, and determining the type of the software development kit to be processed at the current level position in the tree structure according to the dependency relationship;
The processing unit is used for carrying out version unified processing on the types of the software development kits to be processed, carrying out compatibility test on all the software development kits in sequence, and determining the target version of the types of the software development kits to be processed according to the compatibility test result.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
CN202311605284.2A 2023-11-28 2023-11-28 Method and device for processing dependence conflict of software development kit version Pending CN117608639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311605284.2A CN117608639A (en) 2023-11-28 2023-11-28 Method and device for processing dependence conflict of software development kit version

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311605284.2A CN117608639A (en) 2023-11-28 2023-11-28 Method and device for processing dependence conflict of software development kit version

Publications (1)

Publication Number Publication Date
CN117608639A true CN117608639A (en) 2024-02-27

Family

ID=89957600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311605284.2A Pending CN117608639A (en) 2023-11-28 2023-11-28 Method and device for processing dependence conflict of software development kit version

Country Status (1)

Country Link
CN (1) CN117608639A (en)

Similar Documents

Publication Publication Date Title
CN108614770B (en) Automatic test assertion method, device, storage medium and equipment
US8312440B2 (en) Method, computer program product, and hardware product for providing program individuality analysis for source code programs
CN112394942B (en) Distributed software development compiling method and software development platform based on cloud computing
EP3623948B1 (en) Method and system for code analysis to identify causes of code smells
CN108710571B (en) Method and device for generating automatic test code
CN112799937B (en) Method for automatically detecting dependence conflict problem in Maven project based on Github
CN108984416B (en) Method for evaluating dependency conflict danger level in Maven environment
CN114510267B (en) Program ABI interface compatibility calculation method based on Linux system
US11237943B2 (en) Generating inputs for computer-program testing
US20200133823A1 (en) Identifying known defects from graph representations of error messages
KR101979329B1 (en) Method and apparatus for tracking security vulnerable input data of executable binaries thereof
CN116431520A (en) Test scene determination method, device, electronic equipment and storage medium
CN112306495A (en) Picture verification method and device, computer equipment and computer-readable storage medium
CN112631925B (en) Method for detecting single-variable atom violation defect
CN114139923A (en) Task relevance analysis method and device and computer readable storage medium
RU2656580C2 (en) Determining the order of initialization of static objects
CN117608639A (en) Method and device for processing dependence conflict of software development kit version
CN111930387B (en) Integration method and device of integration package, electronic equipment and storage medium
CN113001538B (en) Command analysis method and system
CN114490413A (en) Test data preparation method and device, storage medium and electronic equipment
CN112035308A (en) Method and device for generating system interface test table
CN112035342B (en) Method and device for identifying code defects
CN116225922A (en) Test case generation method and device, electronic equipment and storage medium
Voit et al. Method to interpret algorithms and design workflows in the complex computer-aided design development
Preißinger et al. Towards Standard Conformant BPEL Engines: The Case of Static Analysis.

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