Version determination method and device, computer equipment and computer readable storage medium

By obtaining the current environment information of the target project and determining the corresponding version strategy, the problem of determining the dependency package version in the software project is solved, and efficient and accurate version management is achieved to ensure that the project runs normally in different environments.

CN119645485APending Publication Date: 2025-03-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411752792.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In a software project, how to determine the correct version of the dependency package required for the project, especially in different environments, to ensure the project is running normally.

Method used

By obtaining the current environment information of the target project, the target version policy is determined based on the environment information, and the current version information of the required dependency package is determined based on the policy.

Benefits of technology

It realizes automatic determination of the dependency package version based on the project environment, improves the efficiency and accuracy of version determination, and ensures that the project runs normally in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645485A_ABST
    Figure CN119645485A_ABST
Patent Text Reader

Abstract

The invention relates to a version determination method and device, computer equipment and a computer readable storage medium. The method comprises the steps that current environment information of a target project is acquired, a target version strategy is determined according to the current environment information of the target project, and current version information of a dependency package needed by the target project is determined according to the target version strategy. By adopting the method, the version of the dependent package required by the project can be determined according to the project environment.
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 a version determination method, apparatus, computer device, and computer-readable storage medium. Background Art

[0002] Dependency packages are a collection of external dependencies in a software project. These dependencies are required for the project to build and run. In order to ensure the normal operation of the project, the corresponding dependency packages need to be installed for the project before the project starts. However, the same dependency package may have different versions of dependency packages, so it is very important to determine the version of the dependency package required by the project. Summary of the invention

[0003] Based on this, it is necessary to provide a version determination method, device, computer equipment and computer-readable storage medium that can determine the version through environmental information to address the above technical problems.

[0004] In a first aspect, the present application provides a version determination method, the method comprising:

[0005] Get the current environment information of the target project;

[0006] Determine a target version strategy according to the current environment information;

[0007] The current version information of the dependent packages required by the target project is determined according to the target version strategy.

[0008] In one embodiment, obtaining the current environment information of the target project includes:

[0009] When a start command for starting a target project is detected, current environment information of the target project is acquired.

[0010] In one embodiment, the method further comprises:

[0011] Obtain a version configuration file of the target project;

[0012] The strategy of determining the target version according to the current environment information includes:

[0013] The version policy corresponding to the current environment information is determined according to the version configuration file to obtain a target version policy.

[0014] In one embodiment, determining the target version strategy according to the current environment information includes:

[0015] Obtain a version configuration file corresponding to the current environment information;

[0016] A target version strategy is determined according to the version configuration file.

[0017] In one embodiment, the method further comprises:

[0018] Obtaining fixed version information of the target project;

[0019] Determining the current version information of the dependent package required by the target project according to the target version strategy includes:

[0020] In the case where the fixed version information matches the target version policy, determining the fixed version information as the current version information of the dependency package required by the target project;

[0021] In the case that the fixed version information does not match the target version policy, the fixed version information is modified according to the target version policy to obtain the current version information of the dependent package required by the target project.

[0022] In one embodiment, the method further comprises:

[0023] Download the target dependency package according to the current version information of the dependency package required by the target project;

[0024] Install the target dependency package.

[0025] In one embodiment, the operating environment corresponding to the current environment information is a development environment, a test environment or a production environment.

[0026] In a second aspect, the present application further provides a version determination device, the device comprising:

[0027] An acquisition unit, used to obtain the current environment information of the target project;

[0028] A determination unit, configured to determine a target version strategy according to the current environment information;

[0029] The determining unit is further configured to determine the current version information of the dependent package required by the target project according to the target version strategy.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor:

[0031] The memory is used to store a computer program, and the processor is used to read the computer program in the memory and perform the following operations:

[0032] Get the current environment information of the target project;

[0033] Determine a target version strategy according to the current environment information;

[0034] The current version information of the dependent packages required by the target project is determined according to the target version strategy.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0036] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0037] In the embodiment of the present application, the current environment information of the target project is obtained, the target version strategy is determined according to the current environment information of the target project, and the current version information of the dependency package required by the target project is determined according to the target version strategy. It can be seen that the version of the dependency package required for the project can be determined according to the environment of the project. In addition, since the version of the dependency package required for the project can be automatically determined according to the environment of the project, the efficiency and accuracy of version determination can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 It is a flowchart of a version determination method provided in an embodiment of the present application;

[0040] Figure 2 is a flowchart of another version determination method provided in an embodiment of the present application;

[0041] Figure 3 is a structural diagram of a version determination device provided in an embodiment of the present application;

[0042] Figure 4 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] Figure 11 is a flow chart of a version determination method provided in an embodiment of the present application. The version determination method can be applied to a computer device capable of installing an application and performing data processing. Figure 1 As shown, the version determination method may include the following steps.

[0045] 101. Get the current environment information of the target project.

[0046] The computer device can obtain the current environment information of the target project in real time, periodically or regularly. The target project is any project in the software project on the computer device.

[0047] The target project's environment information is information about the target project's operating environment. The target project's current environment information is information about the target project's current environment. The environment corresponding to the target project's current environment information may be a development environment, a test environment, a production environment, or other environments.

[0048] 102. Determine the target version strategy based on the current environment information of the target project.

[0049] The target project may have different operating environments and different version policies of the dependent packages required by the target project. Therefore, after the computer device obtains the current environment information of the target project, it can determine the target version policy according to the current environment information of the target project, that is, determine the version policy corresponding to the current environment information of the target project and obtain the target version policy.

[0050] 103. Determine the current version information of the dependency packages required by the target project according to the target version strategy.

[0051] After the computer device determines the target version strategy, it can determine the current version information of the dependency package required by the target project according to the target version strategy. The dependency package required by the target project may include one dependency package or multiple dependency packages.

[0052] In the case where the target project requires a plurality of dependency packages, the version information of the target project requires a plurality of version information. The plurality of dependency packages correspond to the plurality of version information one by one. That is, a version information needs to be determined for each dependency package required by the target project.

[0053] The version information of the dependent package is information about the version of the dependent package. The version information of the dependent package can be the version number of the dependent package, or can be other version information that can uniquely identify different versions of the dependent package.

[0054] exist Figure 1In the version management method shown, the current environment information of the target project is obtained, the target version strategy is determined according to the current environment information of the target project, and the current version information of the dependency package required by the target project is determined according to the target version strategy. It can be seen that the version of the dependency package required by the project can be determined according to the environment of the project. In addition, since the version of the dependency package required by the project can be automatically determined according to the environment of the project, the efficiency and accuracy of version determination can be improved.

[0055] Figure 2 1 is a flow chart of another version determination method provided in an embodiment of the present application. The version determination method can be applied to a computer device capable of installing an application and performing data processing. Figure 2 As shown, the version determination method may include the following steps.

[0056] 201. Get the current environment information of the target project.

[0057] The computer device can obtain the current environment information of the target project in real time, periodically or regularly. The target project is any project in the software project on the computer device.

[0058] The target project's environment information is information about the target project's operating environment. The target project's current environment information is information about the target project's current environment. The environment corresponding to the target project's current environment information may be a development environment, a test environment, a production environment, or other environments.

[0059] The script of the package management tool can be pre-placed in the project startup command. Therefore, when the computer device detects the startup command for starting the target project, the computer device can first obtain the current environment information of the target project, so as to ensure that the installation of the required dependent packages is completed before the target project is started.

[0060] When the computer device detects a startup command for starting the target project, the computer device may first determine whether there is information about the package management tool in the startup command, and if it is determined that there is information about the package management tool in the startup command, the current environment information of the target project may be obtained. If it is determined that there is no information about the package management tool in the startup command, step 201 and subsequent steps may not be performed, unnecessary processing processes may be reduced, thereby saving processing resources and reducing power consumption.

[0061] By integrating version management and dependency package installation into the project startup process and implementing automated processing, project development efficiency can be improved and target maintenance costs can be reduced.

[0062] The project file of the target project may include an environment variable. The computer device may obtain the current value of the environment variable of the target project and may determine the current environment information of the target project according to the current value of the environment variable.

[0063] Exemplarily, the computer device may read the value of NODE_ENV in the target project, and may determine the current environment information of the target project according to the value of NODE_ENV.

[0064] The computer device may call a Node.js script to read the current value of the environment variable of the target project, or may call other scripts to read the current value of the environment variable of the target project.

[0065] 202. Determine a target version strategy based on current environment information of the target project.

[0066] The target project may have different operating environments and different version policies of the dependent packages required by the target project. Therefore, after the computer device obtains the current environment information of the target project, it can determine the target version policy according to the current environment information of the target project, that is, determine the version policy corresponding to the current environment information of the target project and obtain the target version policy.

[0067] In some embodiments, the target project has a version configuration file. This version configuration file is used to configure the version strategy of the target project in different environments, that is, the version strategy of the dependency packages required by the target project in different environments. The version configuration file of the target project may include the version strategy of the dependency packages required in different environments. Exemplarily, the development environment needs to use the latest version of the dependency package, the test environment needs to use the first preset version of the dependency package, and the production environment needs to use the second preset version of the dependency package.

[0068] The version configuration file of the target project may include a correspondence between an environment identifier and a version policy identifier. The environment identifier is an identifier of the environment. The version policy identifier is an identifier of the version policy. The correspondence between the environment identifier and the version policy identifier may be as shown in Table 1:

[0069] Environmental Labeling Version policy identifier Environment 1 Version Strategy 1 Environment 2 Version Strategy 2 … …

[0070] Table 1

[0071] The computer device may first obtain a version configuration file of the target project, and then determine a version policy corresponding to the current environment information according to the version configuration file of the target project to obtain a target version policy.

[0072] The computer device can first determine the correspondence between the environment identifier and the version policy identifier based on the version configuration file of the target project, and then determine the version policy identifier corresponding to the current environment information based on the correspondence. Then, based on the version policy identifier corresponding to the current environment information, the computer device can obtain the version policy corresponding to the current environment information from the version configuration file of the target project to obtain the target version policy.

[0073] In some embodiments, the target project has multiple version configuration files. Multiple version configuration files correspond to multiple environments of the target project one by one. It can be seen that a version configuration file is configured for different environments of the target project. Each version configuration file of the target project can include the version strategy of the required dependency package under the corresponding environment. Exemplary, the target project has three version configuration files, which are respectively a development version configuration file, a test version configuration file and a production version configuration file.

[0074] The computer device may first obtain a version configuration file corresponding to the current environment information of the target project, and then determine a version policy corresponding to the current environment information according to the version configuration file corresponding to the current environment information to obtain a target version policy.

[0075] The version configuration file can be an env file or other files.

[0076] The version configuration file can be stored in the root directory of the target file or in other accessible locations.

[0077] Exemplarily, in the case where the version configuration file is stored in the root directory of the target file, the computer device may obtain the version configuration file of the target project from the root directory of the target project.

[0078] 203. Determine the current version information of the dependency package required by the target project according to the target version strategy.

[0079] After the computer device determines the target version strategy, it can determine the current version information of the dependency package required by the target project according to the target version strategy. The dependency package required by the target project may include one dependency package or multiple dependency packages.

[0080] In the case where the target project requires a plurality of dependency packages, the version information of the target project requires a plurality of version information. The plurality of dependency packages correspond to the plurality of version information one by one. That is, a version information needs to be determined for each dependency package required by the target project.

[0081] The version information of the dependent package is information about the version of the dependent package. The version information of the dependent package can be the version number of the dependent package, or can be other version information that can uniquely identify different versions of the dependent package.

[0082] In some embodiments, a fixed version information is pre-configured for the target project, that is, the fixed version information of the target project. The fixed version information of the target project is fixed and does not change with changes in the environment of the target project.

[0083] The computer device can obtain the fixed version information of the target project, and can determine whether the fixed version information of the target project matches the target version policy, that is, determine whether the version corresponding to the fixed version information of the target project satisfies the target version policy. When it is determined that the fixed version information of the target project matches the target version policy, the fixed version information of the target project can be determined as the current version information of the dependency package required by the target project; when it is determined that the fixed version information of the target project does not match the target version policy, the fixed version information of the target project can be modified according to the target version policy to obtain the current version information of the dependency package required by the target project.

[0084] The fixed version information of the target project may exist in the form of a file. In the case where the fixed version information of the target project exists in the form of a file, the fixed version information of the target project may be a package.json file or other files. Accordingly, the current version information of the dependency package required by the target project is a temporary file.

[0085] The computer device can call the fs module of JavaScript to modify the fixed version information of the target project according to the target version policy, or call the fs module of Node.js to modify the fixed version information of the target project according to the target version policy, or call other modules to modify the fixed version information of the target project according to the target version policy.

[0086] In some embodiments, the computer device may generate current version information of the dependent packages required by the target project according to the target version policy.

[0087] 204. Download the target dependency package according to the current version information of the dependency package required by the target project.

[0088] After the computer device determines the current version information of the dependency package required by the target project, it can download the target dependency package according to the current version information of the dependency package required by the target project, that is, download the dependency package corresponding to the current version information of the dependency package required by the target project.

[0089] 205. Install target dependency packages.

[0090] After the computer device downloads the target dependency package, the target dependency package can be installed. The computer device can call a package management tool to install the target dependency package.

[0091] The package management tool may be npm, yarn, pnpm, or other package management tools.

[0092] exist Figure 2 In the version determination method shown, the current environment information of the target project is obtained, the target version strategy is determined according to the current environment information of the target project, the current version information of the dependency package required for the target project is determined according to the target version strategy, the target dependency package is downloaded according to the current version information of the dependency package required for the target project, and the target dependency package is installed. It can be seen that the version of the dependency package required for the project can be determined according to the environment of the project. In addition, since the version of the dependency package required for the project can be automatically determined according to the environment of the project, the efficiency and accuracy of version determination can be improved. Further, the version of the project can be determined respectively for different environments, and the adaptability can be improved. Further, after determining the version information of the dependency package required for the project, the dependency package can be automatically downloaded and installed, which can ensure the normal operation of the project and improve the operation efficiency of the project.

[0093] It should be understood that the same or corresponding contents in different embodiments may be referenced to each other.

[0094] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0095] Based on the same inventive concept, the embodiment of the present application also provides a version determination device for implementing the version determination method involved above. The implementation solution provided by the version determination device to solve the problem is similar to the implementation solution recorded in the above version determination method, so the specific limitations in one or more version determination device embodiments provided below can refer to the limitations on the version determination method above, and will not be repeated here.

[0096] Figure 3 : is a schematic diagram of a structure of a version determination device provided in an embodiment of the present application. The version determination device can be applied to a computer device capable of installing an application and performing data processing. The version determination device may include:

[0097] An acquisition unit 301 is used to acquire current environment information of a target project;

[0098] A determination unit 302 is used to determine a target version strategy according to current environment information of a target project;

[0099] The determination unit 302 is further configured to determine the current version information of the dependent package required by the target project according to the target version strategy.

[0100] In some embodiments, the acquisition unit 301 is specifically configured to acquire current environment information of the target project when a startup command for starting the target project is detected.

[0101] In some embodiments, the acquisition unit 301 is further used to acquire a version configuration file of the target project;

[0102] The determining unit 302 determines the target version strategy according to the current environment information of the target project, including:

[0103] The version policy corresponding to the current environment information of the target project is determined according to the version configuration file of the target project to obtain the target version policy.

[0104] In some embodiments, the determining unit 302 determines the target version strategy according to the current environment information of the target project, including:

[0105] Get the version configuration file corresponding to the current environment information of the target project;

[0106] The target version strategy is determined based on the version configuration file.

[0107] In some embodiments, the acquisition unit 301 is further used to acquire fixed version information of the target project;

[0108] The determination unit 302 determines the current version information of the dependency package required by the target project according to the target version strategy, including:

[0109] When the fixed version information of the target project matches the target version policy, the fixed version information of the target project is determined as the current version information of the dependency package required by the target project;

[0110] When the fixed version information of the target project does not match the target version policy, the fixed version information of the target project is modified according to the target version policy to obtain the current version information of the dependent package required by the target project.

[0111] In some embodiments, the version determination device may further include:

[0112] A download unit, used to download a target dependency package according to the current version information of the dependency package required by the target project;

[0113] Installation unit, used to install target dependency packages.

[0114] In some embodiments, the operating environment corresponding to the current environment information of the target project is a development environment, a test environment, or a production environment.

[0115] Each unit in the above version determination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each unit can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each unit above.

[0116] Based on the above network architecture, Figure 4 : It is a structural schematic diagram of a computer device provided in an embodiment of the present application. The computer device may include a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store version configuration files, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external client through a network connection. The processor is used to read the computer program in the memory and perform the following operations:

[0117] Get the current environment information of the target project;

[0118] Determine the target version strategy based on the current environment information of the target project;

[0119] Determine the current version information of the dependency packages required by the target project according to the target version strategy.

[0120] In some embodiments, the processor obtaining the current environment information of the target project includes:

[0121] When a startup command for starting a target project is detected, current environment information of the target project is obtained.

[0122] In some embodiments, the processor is further configured to read the computer program in the memory and perform the following operations:

[0123] Get the version configuration file of the target project;

[0124] The processor determines the target version strategy based on the current environment information of the target project, including:

[0125] The version policy corresponding to the current environment information of the target project is determined according to the version configuration file of the target project to obtain the target version policy.

[0126] In some embodiments, the processor determines the target version strategy according to the current environment information of the target project, including:

[0127] Get the version configuration file corresponding to the current environment information of the target project;

[0128] The target version strategy is determined based on the version configuration file.

[0129] In some embodiments, the processor is further configured to read the computer program in the memory and perform the following operations:

[0130] Get the fixed version information of the target project;

[0131] The processor determines the current version information of the dependency packages required by the target project based on the target version strategy, including:

[0132] When the fixed version information of the target project matches the target version policy, the fixed version information of the target project is determined as the current version information of the dependency package required by the target project;

[0133] When the fixed version information of the target project does not match the target version policy, the fixed version information of the target project is modified according to the target version policy to obtain the current version information of the dependent package required by the target project.

[0134] In some embodiments, the processor is further configured to read the computer program in the memory and perform the following operations:

[0135] A download unit, used to download a target dependency package according to the current version information of the dependency package required by the target project;

[0136] Installation unit, used to install target dependency packages.

[0137] In some embodiments, the operating environment corresponding to the current environment information of the target project is a development environment, a test environment, or a production environment.

[0138] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned version determination method are implemented.

[0140] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0141] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0142] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A version determination method, characterized in that: The method comprises: Get the current environment information of the target project; Determine a target version strategy according to the current environment information; The current version information of the dependent packages required by the target project is determined according to the target version strategy.

2. The method according to claim 1, characterized in that The obtaining of the current environment information of the target project includes: When a start command for starting a target project is detected, current environment information of the target project is acquired.

3. The method according to claim 1, characterized in that The method further comprises: Obtain a version configuration file of the target project; The strategy of determining the target version according to the current environment information includes: The version policy corresponding to the current environment information is determined according to the version configuration file to obtain a target version policy.

4. The method according to claim 1, characterized in that: The strategy of determining the target version according to the current environment information includes: Obtain a version configuration file corresponding to the current environment information; A target version strategy is determined according to the version configuration file.

5. The method according to claim 1, characterized in that The method further comprises: Obtaining fixed version information of the target project; Determining the current version information of the dependent package required by the target project according to the target version strategy includes: In the case where the fixed version information matches the target version policy, determining the fixed version information as the current version information of the dependency package required by the target project; In the case that the fixed version information does not match the target version policy, the fixed version information is modified according to the target version policy to obtain the current version information of the dependent package required by the target project.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Download the target dependency package according to the current version information of the dependency package required by the target project; Install the target dependency package.

7. The method according to any one of claims 1 to 5, characterized in that: The operating environment corresponding to the current environment information is a development environment, a test environment or a production environment.

8. A version determination device, characterized in that: The device comprises: An acquisition unit, used to obtain the current environment information of the target project; A determination unit, configured to determine a target version strategy according to the current environment information; The determining unit is further configured to determine the current version information of the dependent package required by the target project according to the target version strategy.

9. A computer device, characterized in that: Including memory and processor: The memory is used to store a computer program, and the processor is used to read the computer program in the memory and perform the following operations: Get the current environment information of the target project; Determine a target version strategy according to the current environment information; The current version information of the dependent packages required by the target project is determined according to the target version strategy.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.