Dependence conflict detection method and device, equipment, storage medium and product

By serializing and mirroring inspection of system-dependent packages, the problem of non-same-name dependency package conflicts in the existing technology is solved, the efficiency of dependency package conflict detection is improved, and the compatibility and security of system-dependent libraries are ensured.

CN119166518APending Publication Date: 2024-12-20CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411245683.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing system-dependent package conflict detection method can only detect conflicts between dependent packages with the same name, and cannot effectively detect compatibility issues between iterative versions of dependent packages with the same name, and cannot detect conflicts between non-dependent packages with the same name, resulting in conflict detection efficiency. Lower.

Method used

By serializing the system dependent packages, generating a serialization list of dependent packages, and then performing mirror inspections, performing adaptive cloning of dependent packages based on the mirror inspection results, obtaining dependency conflict detection results, avoiding conflicts of non-identical dependent packages and improving Conflict detection efficiency.

Benefits of technology

The detection and resolution of non-same-name dependency package conflicts is realized, the efficiency of dependency package conflict detection is improved, and the compatibility and security of the system dependency library is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166518A_ABST
    Figure CN119166518A_ABST
Patent Text Reader

Abstract

The invention discloses a dependency conflict detection method and device, equipment, a storage medium and a product, and relates to the technical field of computers, the dependency conflict detection method comprises the following steps: serializing a system dependency package to obtain a dependency package serialization list; performing mirror image inspection on the dependency packet serialization list to obtain a mirror image inspection result; and performing adaptive cloning of the dependency packet based on the mirror image inspection result to obtain a dependency conflict detection result. The method comprises the following steps: firstly, serializing a system dependency packet to obtain a dependency packet serialization list; and carrying out mirror image inspection on the dependency packet serialization list, and carrying out adaptive cloning of the dependency packet based on a mirror image inspection result to obtain a dependency conflict detection result. Compared with an existing mode of carrying out dependency conflict detection according to the package names of the dependency packages, the mode of the application can avoid conflicts of non-homonymous dependency packages and improve the dependency package conflict detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to dependency conflict detection methods, devices, equipment, storage media and products. Background Art

[0002] System dependency packages are the basic environment for application programs to run. Platform systems, applets, or AI systems are usually deployed on online servers in production environments. Since the online production environment has high network security requirements and strictly controls external network access rights, staff usually need to deploy system applications offline when deploying them, that is, they cannot be installed with one click through online downloads, which causes conflicts between some system application dependency packages. Existing system dependency package conflict detection generally implements dependency package conflict detection by matching the package names of dependency packages, but only performs conflict detection on dependency packages with the same name, and cannot detect compatibility issues between iterative versions of dependency packages with the same name. Conflicts caused by the installation process of non-identical dependency packages cannot be detected. Therefore, how to improve the efficiency of dependency package conflict detection has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the present application is to provide a dependency conflict detection method, device, equipment, storage medium and product, aiming to solve the technical problem of low efficiency of existing dependency package conflict detection.

[0004] To achieve the above objectives, the present application proposes a dependency conflict detection method, which includes:

[0005] By serializing the system dependency packages, a dependency package serialization list is obtained;

[0006] Performing a mirror inspection on the serialized list of dependent packages to obtain a mirror inspection result;

[0007] Based on the image inspection result, adaptive cloning of the dependent package is performed to obtain a dependency conflict detection result.

[0008] Optionally, the step of performing an image inspection on the serialized list of dependent packages to obtain an image inspection result includes:

[0009] Deserialize the dependency package serialization list to obtain a target information set;

[0010] Establishing a virtual image table, and performing online search on the target information set based on the virtual image table to obtain online search results;

[0011] A custom policy configuration is performed on the online search result to obtain a mirror inspection result.

[0012] Optionally, the step of establishing a virtual mirror table includes:

[0013] Get target operating system information and dependent library information;

[0014] A virtual image table is established based on the target operating system information and the dependent library information.

[0015] Optionally, the step of performing adaptive cloning of the dependent package based on the mirror inspection result to obtain the dependency conflict detection result includes:

[0016] Determine a target dependent package subset based on the image inspection result;

[0017] Obtaining a hierarchical disposal strategy corresponding to the target dependency package subset;

[0018] Based on the hierarchical handling strategy, the target dependent package subsets are hierarchically handled to obtain a dependency conflict detection result.

[0019] Optionally, after the step of performing adaptive cloning of the dependent package based on the image inspection result to obtain the dependency conflict detection result, the step further includes:

[0020] Determine a snapshot file based on the dependency conflict detection result;

[0021] The snapshot file is uploaded to the target server in an intranet offline mode to complete the update of the dependent package.

[0022] Optionally, the step of obtaining a serialized list of dependency packages by serializing the system dependency packages includes:

[0023] Obtaining a serialization strategy, wherein the serialization strategy includes direct serialization and difference serialization;

[0024] The system dependency packages are serialized according to the serialization strategy to obtain a dependency package serialization list.

[0025] In addition, to achieve the above purpose, the present application also proposes a dependency conflict detection device, the dependency conflict detection device comprising:

[0026] The serialization module is used to serialize the system dependency packages to obtain a serialized list of dependency packages;

[0027] An image inspection module is used to perform an image inspection on the serialized list of dependent packages to obtain an image inspection result;

[0028] The adaptation cloning module is used to perform adaptation cloning of dependent packages based on the image inspection results to obtain dependency conflict detection results.

[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes a dependency conflict detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the dependency conflict detection method described above.

[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the dependency conflict detection method described above are implemented.

[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the dependency conflict detection method described above are implemented.

[0032] The present application serializes the system dependency packages to obtain a dependency package serialization list; performs a mirror inspection on the dependency package serialization list to obtain a mirror inspection result; and performs adaptive cloning of the dependency packages based on the mirror inspection result to obtain a dependency conflict detection result. Since the present application first serializes the system dependency packages to obtain a dependency package serialization list; then performs a mirror inspection on the dependency package serialization list, and then performs adaptive cloning of the dependency packages based on the mirror inspection result to obtain a dependency conflict detection result. Compared with the existing method of performing dependency conflict detection based on the package name of the dependency package, the above method of the present application can avoid conflicts between dependency packages with different names and improve the efficiency of dependency package conflict detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0035] Figure 1 A flowchart of the first embodiment of the conflict detection method provided for this application;

[0036] Figure 2 A schematic diagram of the adaptive cloning process of the dependency package provided in the first embodiment of the dependency conflict detection method of the present application;

[0037] Figure 3A flowchart of the second embodiment of the conflict detection method provided for this application;

[0038] Figure 4 This is an online search schematic diagram provided for the second embodiment of the conflict detection method for this application;

[0039] Figure 5 This is a schematic diagram of mirror inspection provided by Embodiment 2 of the conflict detection method of this application;

[0040] Figure 6 This is a schematic diagram of the module structure of the conflict detection device according to the embodiment of the present application;

[0041] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the conflict detection method in the embodiment of the present application.

[0042] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0043] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0044] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0045] The main solution of the embodiment of the present application is: by serializing the system dependency package to obtain a dependency package serialization list; performing a mirror inspection on the dependency package serialization list to obtain a mirror inspection result; performing adaptive cloning of the dependency package based on the mirror inspection result to obtain a dependency conflict detection result. Since the present application first serializes the system dependency package to obtain a dependency package serialization list; then performs a mirror inspection on the dependency package serialization list, and then performs adaptive cloning of the dependency package based on the mirror inspection result to obtain a dependency conflict detection result. Compared with the existing method of performing dependency conflict detection based on the package name of the dependency package, the above method of the present application can avoid conflicts between dependency packages with different names and improve the efficiency of dependency package conflict detection.

[0046] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a dependency conflict detection device, etc. The following takes the dependency conflict detection device as an example to illustrate this embodiment and the following embodiments.

[0047] Based on this, the embodiment of the present application provides a dependency conflict detection method, referring to Figure 1 , Figure 1This is a flow chart of the first embodiment of the conflict detection method of the present application.

[0048] In this embodiment, the dependency conflict detection method includes steps S10 to S30:

[0049] Step S10, obtaining a dependency package serialization list by serializing the system dependency package;

[0050] It should be noted that the serialization of the system dependency package can be to process the dependency package requirements to be installed of the dependency package conflict detection into a serialized data format acceptable to the program, which is mainly used to uniformly describe the dependency package situations of different operating systems. There are differences in the dependency packages of different operating system platforms. For example, there are differences in the packaging and publishing forms of the dependency packages of Windows and Linux systems. The resource attributes of the dependency package are saved and transmitted using JavaScript Object Notation (JSON) format. Even if the operating system is offline, it does not affect the reading of the dependency package data, thereby ensuring the integrity of the dependency package name, version and operating system related information, so as to facilitate subsequent image retrieval and adaptive cloning. The dependency package serialization list can be a serialized list after the dependency package to be installed is serialized.

[0051] Furthermore, in order to improve the efficiency of dependent package serialization, this embodiment proposes two serialization methods, including: direct serialization and difference set serialization, and the step S10 may include: obtaining a serialization strategy, and the serialization strategy includes direct serialization and difference set serialization;

[0052] The system dependency packages are serialized according to the serialization strategy to obtain a dependency package serialization list.

[0053] It should be noted that when the serialization strategy is direct serialization, the system dependency package is the dependency package to be installed received by the production environment operating system. The system dependency package is serialized to obtain a dependency package serialization list, which can clarify the name, version and other related information of each dependency library. When the serialization strategy is difference set serialization, the system dependency package includes the dependency library set installed by the production environment operating system and the dependency library set of the development environment operating system. The difference set between the dependency library set installed by the production environment operating system and the dependency library set of the development environment operating system is determined, and the difference set is serialized to obtain a dependency package serialization list.

[0054] In the specific implementation, suppose a production operating system A needs to deploy a set of web applications. Some dependent libraries have been pre-installed and some more dependent libraries need to be installed. The development environment is operating system B. Due to the strict network control of the production environment and the external network control, the system application needs to be deployed offline in operating system A. Let LnA be the installed dependent library set of the production environment operating system A, that is:

[0055] L n A={{L1A, Value}, {L2A, Value}, ..., {L m A,Value}}

[0056] Let LnB be the set of dependent libraries of the development environment operating system B, that is:

[0057] L m B={{L1B, Value}, {L2B, Value}, ..., {L n B, Value}}

[0058] The set LnA is contained in LnB, expressed as

[0059]

[0060] It should be understood that the variable name is irrelevant to serialized data. For example, the serialized data field sys_ver of operating system A and the serialized data field sys_version of system B both represent the system version. In order to ensure the accurate relationship between the data, the system information and the dependent library information are uniformly named during the serialization process, so as to ensure that the fields and structures of each serialization remain consistent and the required format of the dependent library installation is ensured. For the above sets LnA and LnB, the serialization process provides two methods, direct serialization and difference serialization.

[0061] Direct serialization can be the process of serializing the requirements of the dependent packages to be installed directly after receiving them. That is to say, the production environment operating system A directly provides the requirements of the dependent libraries to be installed, and clarifies the name, version and other related information of each dependent library, that is:

[0062] L′ n A={{L1A, Value}, {L2A, Value}, ..., {L n A,Value}}

[0063] Difference serialization: It is a process of finding the difference of a set, which specifically includes: reading the data of sets LnA and LnB, and finding the difference of sets LnB and LnA, expressed as:

[0064] L′n A=L n BL n A

[0065] The serialization process will process the dependency package list PL (i.e., system dependency package) into a serialized list P'L, completing the conversion of the serialized document to facilitate the image inspection. So in this example:

[0066] P′L=L′ n A

[0067] Step S20, performing a mirror inspection on the dependent package serialization list to obtain a mirror inspection result;

[0068] It should be noted that the mirror inspection is performed on the serialized list of dependent packages to obtain the mirror inspection result, which can be to first deserialize the serialized list of dependent packages to obtain the information set SPC. Then a virtual mirror table containing the operating system and mirror library information is created. Based on the virtual mirror table, the information set SPC is searched online to obtain the online search result. Then, based on the online search result and the user-defined disposal process, the dependency compatible subset and the dependency invalid subset in the online search result are customized to obtain the mirror inspection result. The mirror inspection result includes the combined output mark set MC after the dependent package retrieval process is completed (including online retrieval and user-defined disposal), recording the final detection status of each dependent package and the mirror link address of the confirmed version of the adaptation system and other information.

[0069] Step S30, performing adaptive cloning of dependent packages based on the image inspection result to obtain a dependency conflict detection result.

[0070] It should be noted that the adaptive cloning of dependent packages describes the process of adaptive cloning in a constructed virtual environment based on the tag set MC. The essential difference between this process and the image inspection of dependent packages is that the image inspection of dependent packages performs online detection and marking, while the adaptive cloning of dependent packages solves dependency conflicts and compatibility issues. The adaptive cloning process will receive and store the data request message of the entire tag list MC before making any operation decision, which is conducive to maintaining the integrity and validity of the data. The adaptive cloning of dependent packages based on the image inspection results can be to first perform image disposal, custom decision disposal and selection disposal on the dependent package set in the tag list MC that exists in the image library and has no conflict, the dependency compatibility subset that has been customized retrieved, and the dependency invalid subset that has been customized retrieved, respectively, to obtain the dependency conflict detection result.

[0071] Further, the step S30 may include: determining a target dependent package subset based on the image inspection result;

[0072] Obtaining a hierarchical disposal strategy corresponding to the target dependency package subset;

[0073] Based on the hierarchical handling strategy, the target dependent package subsets are hierarchically handled to obtain a dependency conflict detection result.

[0074] It should be noted that the target dependency package subset includes a set of dependency packages that exist in the image library without conflict, a dependency compatibility subset retrieved by a custom search, and a dependency invalid subset retrieved by a custom search. The hierarchical disposal strategy can be the disposal strategies corresponding to the three target dependency package subsets respectively.

[0075] In a specific implementation, it is assumed that in the marking list MC, PnA is a set of dependent packages that exist in the image library without conflicts during the image retrieval process, which is expressed as:

[0076] P n A={P n ID,{P n A1,value},...{P n A n ,value}}

[0077] PnB is a subset of dependency compatibility that has been customized and retrieved, and PnC is a subset of dependency invalidity that has been customized and retrieved, which are represented as follows:

[0078] P n B={P n ID,{P n B1,value},...{P n B n ,value}}

[0079] P n C={P n ID,{P n C1,value},...{P n C n ,value}}

[0080] Where P n ID represents the unique ID of the dependency package, value represents the attribute value assigned to each dependency package after image retrieval and custom retrieval, and the mark list MC is expressed as:

[0081] MC=P n A∪P n B∪P n C

[0082] When the background monitoring program of the virtual machine receives the MC data processing request, it will query the constructed virtual environment in the virtual machine and match it. A successful match means that the application dependency environment of the target operating system has been synchronized to the local computer. Then the MC program is called back for deployment, and the target dependency package subsets are handled separately using the hierarchical disposal strategy. Specifically:

[0083] Image processing: According to P n A sets the configured mirror address in the given attribute, traverses the dependency set to download from the mirror in the company's intranet or the public network and overwrites the installation of the dependent environment. For example, after the image retrieval, the dependency pytorch is mapped to the version and package name information of the image:

[0084] P1A={0001,{"name","pytorch"},{"mirror","pytorch-2.2.0.zip"},,...{"desc","machine learning library"}}

[0085] Custom decision handling: Based on P n B sets the custom dependency address in the given attribute, traverses the dependency collection and tries to download from the custom address and overwrite the installation of the dependency environment. For dependencies with conflicts and compatibility issues, based on experience and user decisions, the version and URL of the dependency download are interpolated and customized, such as:

[0086] P 26 B={0026,{"name","seaborn"},,...{"url","https: / / files.xxx.org / seaborn-0.13.2.tar.gz"}}

[0087] Optional treatment: When dealing with P n When the C subset is invalid, you need to first determine the custom decision result, and determine whether to ignore, discard, or download and overwrite the installation of the dependent environment by obtaining the flag bit in the attribute. For example, based on experience, after confirming that the dependency is invalid, the user marks the testPkg dependency and sets the tag identification attribute value to 1, indicating discard processing, as follows:

[0088] P 101 C={0101,{"name","testPkg"},{"tag","1"},,...{"desc","Invalid test package"}}

[0089] Furthermore, after step S30, the method may further include: determining a snapshot file based on the dependency conflict detection result;

[0090] The snapshot file is uploaded to the target server in an intranet offline mode to complete the update of the dependent package.

[0091] It should be noted that, please refer to Figure 2 , Figure 2 A schematic diagram of the adaptive cloning process of the dependency package provided in Example 1 of the dependency conflict detection method of the present application; the snapshot file determined based on the dependency conflict detection result can be that after the processing of the mark list MC is completed, the vEnv message is synchronized to the compressed dependency environment, the message includes the unique name of the dependency environment (virtual dependency package environment vEnv, which is the dependency package virtual environment built according to MC), and the dependency environment is requested to be traversed and added to the compressed file to form a snapshot Snap (short for Snapshot, virtual dependency environment snapshot, here refers to a compressed file package of the adapted dependency package, similar to a clone file), and finally the Snap file is uploaded to the production server (i.e., the target server) with a strictly controlled network environment through the intranet in an offline manner, the file is decompressed and the original application environment is synchronized offline.

[0092] The adaptive cloning of the dependency package in this embodiment adopts a three-level disposal strategy, which handles the dependency packages in a graded manner according to the results of the image detection, and supports user customized configuration and decision-making. This strategy model not only ensures the integrity of the dependency package detection data, but also effectively solves the dependency package conflict and compatibility issues, ensures efficient deployment, meets the security of the system, solves the problem of installing dependencies in an offline environment, and also ensures the traceability of the dependency package deployment and installation, preventing the application system from distrusting the detection mechanism and cloning strategy.

[0093] This embodiment serializes the system dependency package to obtain a dependency package serialization list; performs a mirror inspection on the dependency package serialization list to obtain a mirror inspection result; and performs adaptive cloning of the dependency package based on the mirror inspection result to obtain a dependency conflict detection result. Since this embodiment first serializes the system dependency package to obtain a dependency package serialization list; then performs a mirror inspection on the dependency package serialization list, and then performs adaptive cloning of the dependency package based on the mirror inspection result to obtain a dependency conflict detection result. Compared with the existing method of performing dependency conflict detection based on the package name of the dependency package, the above method of this embodiment can avoid conflicts between dependency packages with different names and improve the efficiency of dependency package conflict detection.

[0094] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , Figure 3 The flowchart provided in the second embodiment of the dependency conflict detection method of the present application, step S20, further includes the following steps:

[0095] Step S201: Deserialize the dependency package serialization list to obtain a target information set;

[0096] It should be noted that the target information set obtained by deserializing the dependency package serialization list can be parsed out according to the predetermined serialization format field to obtain the operating system information and the dependency package information, which is called the target information set SPC. The main function of deserialization is to describe the data carrying the request information as a programming language, which mainly includes two parts: the source operating system information and the dependency package list, wherein the source system information includes the operating system model, version, etc., and the dependency package list includes the dependency name and version requirements.

[0097] Step S202: establishing a virtual image table, and performing an online search on the target information set based on the virtual image table to obtain an online search result;

[0098] It should be noted that online retrieval requires the establishment of a virtual image table, which contains the operating system and image library information. The image library information includes the image source information of the dependent library. For the image source of the dependent library, the internal image source of the company is usually configured. If there is no image library within the company, the image library of other software can be configured. The online retrieval of the target information set based on the virtual image table can be to address the system information S (information such as the version of the target operating system), and the addressing is performed in a direct addressing manner. If S is not in the virtual image table, the addressing fails, and there is an unconfigured system or image source, then the online retrieval of the dependent library is not performed; if the addressing is successful, the system information S and the image source address information (storage address information of the dependent package) are searched from the virtual image table, and an online retrieval is performed. Please refer to the following Table 1-System number and image address comparison table:

[0099] Table 1-Comparison table of system numbers and image addresses

[0100] System Number Mirror address 10062283777 https: / / xxx.mirror1.com / 10047472646 https: / / xxx.mirror2.com / 10201351176 https: / / xxx.mirror3.com / ... ...

[0101] It should be noted that the online retrieval process includes: traversing each image address according to the system information and image address information obtained by addressing, and comparing the dependent package information in the information set SPC, comparing from the image library, if the dependent library exists, then finding the latest version, and recursively checking the packages that the dependent library depends on, until all dependencies are found and a suitable version without compatibility issues is found; if the dependent package does not exist in the image library or there is a compatibility issue, then the prompt information of the dependent package is returned for a customized search.

[0102] In specific implementation, the online search process can refer to Figure 4 , Figure 4The online search diagram provided for the second embodiment of the dependency conflict detection method of the present application; assuming that P1 is the dependency list P1...P n A dependency package in , a1...a1 is the dependency required for the installation of the dependency package, and x1...x n is the dependency required by a1, and so on, expressed as:

[0103] P1={a1,...,a n}={{x1,...,x n},...,{y1,...,y n}}

[0104] According to the address of the virtual image table, P1 is searched online. First, the a1 node is searched. If a1 is found, its child nodes {x1,...,x n}, if the x node still has child nodes dependent, continue traversing until the leaf node is reached. The traversal retrieval process ends until a n The node traversal ends.

[0105] In the process of tree retrieval algorithm, if the dependent package node {a1,...,a n}, if a dependent package or its sub-dependent package is not retrieved in the system, the dependent package node is recorded in the custom search collection and marked; similarly, if a dependent package is detected to be incompatible with the system, the dependent package node is recorded in the custom search collection and marked; after the traversal is completed, the collection is returned and prompted.

[0106] Further, the step of establishing a virtual image table includes: obtaining target operating system information and dependent library information;

[0107] A virtual image table is established based on the target operating system information and the dependent library information.

[0108] It should be noted that the target operating system information may include information such as the model and version of the target operating system, which is used to deploy a virtual operating system with the same or similar model and version as the source operating system (i.e., the target operating system) on a PC machine that can connect to the Internet, and configure the mirror source of the dependent library. The operating system deployment can be ISO deployment or docker deployment, as long as it is ensured to be similar or the same as the source operating system model and version.

[0109] Step S203: performing a custom policy configuration on the online search result to obtain a mirror inspection result.

[0110] It should be noted that the custom policy configuration, namely the custom search mentioned above, describes the user's handling process of the custom search set generated in the above step S202. Its main function is to make decisions on the conflicts and compatibility issues of the dependency packages of the set. According to the set of custom searches, two subsets are divided, the dependency compatible subset and the dependency invalid subset. For the dependency compatible subset, it is necessary to give a clear specific version for each dependency package with compatibility issues based on empirical information; and for the dependency invalid subset, it is necessary to give clear other URL address information of the valid dependency library for each dependency package that cannot be retrieved in the configured mirror library. If it cannot be given, it is marked as ignored. After the custom search processing of the dependency package is completed, a mark set MC is merged and output to record the final detection status of each dependency package and the mirror link address of the confirmed version of the adaptation system and other information.

[0111] In specific implementation, Figure 5 , Figure 5 The image inspection diagram provided for the second embodiment of the dependency conflict detection method of this application; CK in the figure is inspection Ck, which refers to online retrieval and custom retrieval based on SPC. The image inspection process describes how the dependency package performs conflict detection and compatibility checks after the serialized document conversion is completed, such as Figure 5 As shown in the figure, image inspection is used to solve the conflict problem of dependency packages, avoiding the conventional traversal of the dependency library folder in the machine directory to determine whether the dependency to be installed is in the installed list; through custom retrieval, users are allowed to interpolate and solve the compatibility problem of dependency package versions.

[0112] Furthermore, in order to improve the user experience and facilitate users to detect dependency package conflicts, this example also includes a system environment dependency detection management platform. Users can use the system front desk to initiate queries and manage the MC tag set and cloned environment version of each model training machine in the corresponding test environment or production environment. Based on fine-grained query conditions such as system version and IP, the platform reads the specified query conditions and transmits the query instructions to the system backend. Through the analysis of query rules, the clone environment version information deployed by the query system is associated with the database. Based on the MC tag set in the database, the data is processed, summarized, formatted, etc., and returned to the front-end platform. Usually, for the convenience of management, the fields that need to be paid attention to include: system version, snapshot (clone) version, dependency status, dependency detection status, compatibility status, and other fields.

[0113] This embodiment avoids the traditional method of decompressing and traversing the installed dependency packages for detection, and solves both the dependency conflict detection problem and the dependency offline deployment problem. Specifically, before making a decision to install the dependency package based on the application of the target operating system, the dependency package list is accepted and the target operating system platform version and system bit number are detected. The version number and instruction set architecture of the target operating system are used as the characteristics of the dependency package, and the dependency package list to be installed is marked and arranged, and the text storage format is serialized. After receiving the image inspection processing request of the text, in order to ensure the accuracy of the dependency package version and system matching, the serialized text is first deserialized to obtain the parameters of the target operating system and the dependency package, and the image inspection is performed based on the target operating system and the dependency package list, and each dependency package and sub-dependency relationship are exhaustively enumerated to form a complete set of dependencies to be installed, called a marking set, and the detection results and disposal methods of each dependency package are marked, thereby realizing the detection of conflicts and compatibility issues of dependency packages. After the image inspection request is completed, the dependent packages are upgraded and overwritten in the constructed virtual production environment. Finally, the successfully installed and deployed virtual environment is compressed into a Snap snapshot file and transmitted offline to the real production environment with strict network control. The dependent environment is decompressed and synchronized to achieve cloning, and conflicts between dependent packages, dependency compatibility issues, and installation and deployment issues are resolved, thereby ensuring that the dependent library adaptation and installation of the production environment application system is reliable, stable, and efficient.

[0114] This embodiment uses the image inspection mechanism to detect not only conflicts between dependency packages with the same name, but also conflicts between dependency packages with different names. For the problem of incompatible software package versions, it allows users to customize the selected configuration to solve the compatibility problem of dependency package versions with different versions of the same library. In order to meet the business requirements of development, testing and operation and maintenance personnel, this embodiment also proposes an adaptation cloning model for dependency packages, which directly solves system dependency conflict problems, compatibility problems, difficult installation, large workload and other problems, and meets the system adaptation requirement that if the system is adapted in one place, it will be adapted everywhere, thereby ensuring the reliability, stability and efficiency of the adaptation installation of the system dependency library.

[0115] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the present application's reliance on the conflict detection method. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0116] This application also provides a dependency conflict detection device, please refer to Figure 6 , the dependency conflict detection device comprises:

[0117] A serialization module 10 is used to obtain a serialization list of dependent packages by serializing the system dependent packages;

[0118] The image inspection module 20 is used to perform an image inspection on the dependency package serialization list to obtain an image inspection result;

[0119] The adaptive cloning module 30 is used to perform adaptive cloning of dependent packages based on the image inspection result to obtain a dependency conflict detection result.

[0120] This embodiment serializes the system dependency package to obtain a dependency package serialization list; performs a mirror inspection on the dependency package serialization list to obtain a mirror inspection result; and performs adaptive cloning of the dependency package based on the mirror inspection result to obtain a dependency conflict detection result. Since this embodiment first serializes the system dependency package to obtain a dependency package serialization list; then performs a mirror inspection on the dependency package serialization list, and then performs adaptive cloning of the dependency package based on the mirror inspection result to obtain a dependency conflict detection result. Compared with the existing method of performing dependency conflict detection based on the package name of the dependency package, the above method of this embodiment can avoid conflicts between dependency packages with different names and improve the efficiency of dependency package conflict detection.

[0121] The dependency conflict detection device provided by the present application adopts the dependency conflict detection method in the above embodiment, which can solve the technical problem of low efficiency of conflict detection of existing dependency packages. Compared with the prior art, the beneficial effects of the dependency conflict detection device provided by the present application are the same as the beneficial effects of the dependency conflict detection method provided by the above embodiment, and other technical features in the dependency conflict detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0122] The present application provides a dependency conflict detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the dependency conflict detection method in the above-mentioned embodiment one.

[0123] Reference below Figure 7 , which shows a schematic diagram of the structure of a dependency conflict detection device suitable for implementing the embodiment of the present application. The dependency conflict detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7The dependency conflict detection device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0124] like Figure 7 As shown, the dependency conflict detection device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Me mory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the dependency conflict detection device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the dependency conflict detection device to communicate with other devices wirelessly or by wire to exchange data. Although the dependency conflict detection device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.

[0125] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0126] The dependency conflict detection device provided by the present application adopts the dependency conflict detection method in the above embodiment, which can solve the technical problem of low efficiency of conflict detection of existing dependency packages. Compared with the prior art, the beneficial effects of the dependency conflict detection device provided by the present application are the same as the beneficial effects of the dependency conflict detection method provided by the above embodiment, and other technical features in the dependency conflict detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0127] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0128] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0129] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the dependency conflict detection method in the above-mentioned embodiment.

[0130] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0131] The computer-readable storage medium may be included in the dependency conflict detection device; or may exist independently without being assembled into the dependency conflict detection device.

[0132] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the dependency conflict detection device, the dependency conflict detection device executes the dependency conflict detection method.

[0133] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0134] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0135] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0136] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned dependency conflict detection method, and can solve the technical problem of low efficiency of existing dependency package conflict detection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the dependency conflict detection method provided by the above-mentioned embodiment, and will not be elaborated here.

[0137] The present application also provides a computer program product, including a computer program, which implements the steps of the dependency conflict detection method as described above when executed by a processor.

[0138] The computer program product provided by the present application can solve the technical problem of low efficiency of existing dependency package conflict detection. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the dependency conflict detection method provided by the above embodiment, which will not be repeated here.

[0139] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A dependency conflict detection method, characterized in that: The dependency conflict detection method comprises the following steps: By serializing the system dependency packages, a dependency package serialization list is obtained; Performing a mirror inspection on the serialized list of dependent packages to obtain a mirror inspection result; Based on the image inspection result, adaptive cloning of the dependent package is performed to obtain a dependency conflict detection result.

2. The dependency conflict detection method according to claim 1, characterized in that: The step of performing a mirror inspection on the serialized list of dependent packages to obtain a mirror inspection result includes: Deserialize the dependency package serialization list to obtain a target information set; Establishing a virtual image table, and performing online search on the target information set based on the virtual image table to obtain online search results; A custom policy configuration is performed on the online search result to obtain a mirror inspection result.

3. The dependency conflict detection method according to claim 2, characterized in that: The step of establishing a virtual mirror table includes: Get target operating system information and dependent library information; A virtual image table is established based on the target operating system information and the dependent library information.

4. The dependency conflict detection method according to claim 1, characterized in that: The step of performing adaptive cloning of the dependent package based on the mirror inspection result to obtain the dependency conflict detection result includes: Determine a target dependent package subset based on the image inspection result; Obtaining a hierarchical disposal strategy corresponding to the target dependency package subset; Based on the hierarchical handling strategy, the target dependent package subsets are hierarchically handled to obtain a dependency conflict detection result.

5. The dependency conflict detection method according to any one of claims 1 to 4, characterized in that: After the step of performing adaptive cloning of the dependent package based on the image inspection result to obtain the dependency conflict detection result, the method further includes: Determine a snapshot file based on the dependency conflict detection result; The snapshot file is uploaded to the target server in an intranet offline mode to complete the update of the dependent package.

6. The dependency conflict detection method according to any one of claims 1 to 4, characterized in that: The step of obtaining a serialized list of dependent packages by serializing the system dependent packages includes: Obtaining a serialization strategy, wherein the serialization strategy includes direct serialization and difference serialization; The system dependency packages are serialized according to the serialization strategy to obtain a dependency package serialization list.

7. A dependency conflict detection device, characterized in that: The dependency conflict detection device comprises: The serialization module is used to serialize the system dependency packages to obtain a serialized list of dependency packages; An image inspection module is used to perform an image inspection on the serialized list of dependent packages to obtain an image inspection result; The adaptation cloning module is used to perform adaptation cloning of dependent packages based on the image inspection results to obtain dependency conflict detection results.

8. A dependency conflict detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the dependency conflict detection method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the dependency conflict detection method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the dependency conflict detection method according to any one of claims 1 to 6 are implemented.