Private library merging method, readable storage medium, program product and electronic equipment

By obtaining the dependency configuration files and information management files entered by the user, the version information of the private library is automatically determined and downloaded and merged, the problem of complex and inefficient private library merging operations in the existing technology is solved, and a more efficient private library merging process is realized.

CN120045221APending Publication Date: 2025-05-27Z-ONE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510123889.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the prior art, when a software provider merges multiple private libraries into a total library, it needs to manually configure version information and download each private library, which is complex and inefficient.

Method used

By obtaining the dependency configuration files and information management files entered by the user, the version information of the private library that needs to be merged is automatically determined, the corresponding version of the private library is downloaded and merged, and the merged file is generated and uploaded to the server.

Benefits of technology

It reduces the version information that users need to configure when merging private libraries, simplifies the operation process, and improves the efficiency of private library merging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045221A_ABST
    Figure CN120045221A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computers, in particular to a private library merging method, a readable storage medium, a program product and electronic equipment. The method comprises the steps that a dependency configuration file input by a user is obtained, the dependency configuration file comprises first version information of a part of private libraries in a plurality of private libraries to be combined, and the first version information is version information configured by the user; obtaining an information management file, wherein the information management file comprises second version information of the last update of the private libraries; querying second version information of the other part of private libraries in the plurality of private libraries from the information management file; downloading a plurality of private libraries based on the first version information and the second version information; merging the plurality of private libraries to obtain a merged file of the plurality of private libraries; and uploading the combined file to a server. Therefore, the private library merging efficiency can be improved.
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 private library merging method, a readable storage medium, a program product and an electronic device. Background Art

[0002] In order to improve the efficiency of software development, a modular development method can be used to develop software programs. For example, the software can be divided into multiple modules, and each module can be made into an independent private library. Then, each private library can be developed to achieve software development and iteration. During the software development process, these private libraries may have different versions. For the convenience of management, a distributed version control system (DVCS) can be used to manage different versions of private libraries.

[0003] After the software provider has developed multiple private libraries of software A, the software provider can merge the multiple private libraries of software A into one general library, so that when the software user develops software B, he only needs to rely on one general library of software A to achieve the normal development of software B, without having to rely on multiple private libraries of software A. This is convenient for software users to use.

[0004] In the prior art, when a software provider needs to merge multiple private libraries of software A into a general library, the software provider needs to manually configure the version information (such as version number) of each private library first, and then manually download the corresponding versions of each private library from the DVCS server according to the configured version information for merging. The operation is relatively complicated and the efficiency of merging private libraries is low. Summary of the invention

[0005] Embodiments of the present application provide a private library merging method, a readable storage medium, a program product, and an electronic device.

[0006] In a first aspect, an embodiment of the present application provides a private library merging method, including: obtaining a dependency configuration file input by a user, wherein the dependency configuration file includes first version information of some private libraries among multiple private libraries to be merged, and the first version information is version information configured by the user; obtaining an information management file, the information management file includes second version information of the last update of multiple private libraries; querying the second version information of another part of the multiple private libraries from the information management file; downloading multiple private libraries based on the first version information and the second version information; merging the multiple private libraries to obtain a merged file of the multiple private libraries; and uploading the merged file to a server.

[0007] In the present application, the electronic device queries the version information of the private library that is not configured by the user in the dependent configuration file from the information management file, so that the user does not need to configure the version information of all private libraries to be merged, thereby reducing the user's operations and improving the merging efficiency of the private libraries.

[0008] In some embodiments, the information management file is stored in a private library information management warehouse, and the private library information management warehouse is stored in a server; obtaining the information management file includes: cloning the private library information management warehouse from the server, and reading the information management file from the private library information management warehouse.

[0009] In some embodiments, both the dependency configuration file and the information management file include identifiers of multiple private libraries to be merged; querying the information management file for second version information of another part of the multiple private libraries includes: obtaining the identifier of another part of the private libraries from the dependency configuration file; based on the identifier, querying the information management file for second version information of the private libraries that are not configured with the first version information among the multiple private libraries to be merged.

[0010] In some embodiments, based on the target version information, downloading the first files of multiple private libraries to be merged includes: generating a download script; and downloading multiple private libraries corresponding to the first version information and the second version information through the download script.

[0011] In some embodiments, the method further includes: generating an index file corresponding to the merged file, wherein the index file is used to indicate an address of the merged file.

[0012] After the multiple private libraries to be merged are merged into a merged file, an index file corresponding to the merged file is generated, so that the electronic device can subsequently query and download the merged file through the index file.

[0013] In some embodiments, the index file includes a first field, wherein the first field is used to indicate an address of the merged file.

[0014] In some embodiments, the version information includes one of a version number, a version name, and a version tag.

[0015] In a second aspect, the present application provides an electronic device, comprising: a memory for storing instructions; and at least one processor for executing instructions so that the device implements the first aspect and any possible implementation method of the first aspect. The beneficial effects that can be achieved in the second aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here.

[0016] In a third aspect, the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed by a device, the computer implements the method provided in the first aspect and any possible implementation of the first aspect. The beneficial effects that can be achieved in the third aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here.

[0017] In a fourth aspect, the present application provides a computer program product, which, when running on a device, enables the device to implement the method provided in the first aspect and any possible implementation of the first aspect. The beneficial effects that can be achieved in the fourth aspect can refer to the beneficial effects of the method provided in any implementation of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 According to some embodiments of the present application, a flowchart of a private library merging method is shown;

[0019] Figure 2 According to some embodiments of the present application, a packaging flow chart of a single private library is shown;

[0020] Figure 3 According to some embodiments of the present application, a packaging flow chart of multiple private libraries is shown;

[0021] Figure 4 According to some embodiments of the present application, a flowchart of an incremental packaging method for a private library is shown;

[0022] Figure 5 According to some embodiments of the present application, an information storage format of an information management file is shown;

[0023] Figure 6 According to some embodiments of the present application, a comparison diagram of full packaging and incremental packaging is shown;

[0024] Figure 7 According to some embodiments of the present application, a flowchart of another incremental packaging method for a private library is shown;

[0025] Figure 8 According to some embodiments of the present application, a method for specifying branch packaging is shown;

[0026] Fig. 9 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION

[0027] The illustrative embodiments of the present application include, but are not limited to, a private library merging method, a readable storage medium, a program product, and an electronic device.

[0028] It should be noted that the electronic device in the present application can be a desktop computer, a laptop computer, a single computer, a mobile workstation, and other terminal devices that support software program development.

[0029] It should be noted that the software development in this application may be about Systematic software application development, or The software application development of the system can also be related to the software application development of other systems, which is not limited to this. The system's software application development is used as an example to introduce it.

[0030] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0031] As mentioned above, the merging operation of private libraries is relatively complicated and inefficient. In view of this, an embodiment of the present application provides a method for merging private libraries, in which an information management file for storing the latest version information of private libraries can be created in advance, so that the electronic device can automatically determine the version information of the private libraries to be merged based on the information management file, and then download the corresponding versions of multiple private libraries based on the version information and merge them into a file of a general library. In this way, the operation of user configuration of version information can be reduced, thereby improving the efficiency of private library merging.

[0032] Next, the private library merging method in the embodiment of the present application is introduced.

[0033] For example, Figure 1 According to some embodiments of the present application, a flowchart of a private library merging method is shown.

[0034] It should be noted that the execution subject of each of the following processes can be an electronic device. When introducing the following processes, the execution subject of each process will not be described in detail.

[0035] like Figure 1 As shown, the process includes:

[0036] S101, obtaining a dependency configuration file input by a user, wherein the dependency configuration file includes first version information of some private libraries among multiple private libraries to be merged, and the first version information is version information configured by the user. It can be understood that the first version information can be the latest version information or the old version information, and there is no limitation on this.

[0037] The multiple private libraries to be merged in this application can be an application or a software development kit (SDK) (e.g. Dependency refers to the functions or services that a software project needs to provide from other software libraries or components in order to run or build properly.

[0038] It can be understood that when the developer wants to merge part of the old version of the private library and part of the new version of the private library, the version information of the old version of the private library can be input into the electronic device as the first version information, so that the electronic device can subsequently download part of the old version of the private library and download part of the latest version of the private library according to the first version information for merging.

[0039] In some embodiments, when the electronic device detects that a user creates a dependency configuration file including information of multiple private libraries to be merged on the electronic device, the electronic device obtains the dependency configuration file.

[0040] It can be understood that when a user creates a dependency configuration file, if the user enters the first version information of some of the multiple private libraries to be merged in the dependency configuration file, the dependency configuration file acquired by the electronic device includes the first version information of some of the multiple private libraries to be merged.

[0041] S102, obtaining an information management file, wherein the information management file includes second version information of a plurality of private libraries that were last updated.

[0042] In some embodiments, the information management file may be stored in a private library information management warehouse, which may be stored in a server. The electronic device obtains the information management file, including: cloning the private library information management warehouse from the server, and reading the information management file from the private library information management warehouse.

[0043] The private library information management warehouse is a warehouse for storing information management files. Information management files are files that store private library information (such as name, version number, branch name, etc.). Information management files may include private library identification (such as name, identity document (ID), etc.), version information (such as version number, version name, version tag, etc.), source code warehouse address information, branch name, commit ID, and other information.

[0044] Optionally, the private library information management warehouse is created on the electronic device in advance and uploaded to the server, and the information management file is created on the electronic device in advance and stored in the private library information management warehouse. For the sake of narrative coherence, the creation process of the private library information management warehouse and the information management file is specifically introduced below.

[0045] The server in the embodiment of the present application may be a server running a DVCS, such as a server running Git (as an example of a DVCS) (hereinafter referred to as a “Git server”), etc.

[0046] Exemplarily, the electronic device may clone the private library information management warehouse from the Git server through a git clone command, and then read the information management file from the private library information management warehouse.

[0047] S103, querying the information management file for second version information of another part of the multiple private libraries.

[0048] It can be understood that the second version information may be the version information of the last update of the private library, that is, the latest version information, such as the latest version number, version name, version label, etc.

[0049] In the above S101, the dependency configuration file only includes the version information of a part of the private library (first version information), but does not include the version information of another part of the private library. Therefore, it is also necessary to determine the version information of the private library for which the user has not configured version information.

[0050] In some embodiments, the dependency configuration file and the information management file both include identifiers of multiple private libraries to be merged. The electronic device queries the information management file for second version information of another part of the multiple private libraries to be merged, including: obtaining the identifier of the other part of the private library from the dependency configuration file, and querying the information management file for the second version information of the other part of the private library based on the identifier.

[0051] Specifically, the electronic device can obtain the identifiers of each private library in the dependency configuration file that is not configured with the first version information, and then query the second version information of some private libraries in the dependency configuration file (i.e., another part of the private libraries) that are not configured with the first version information from the information management file based on the identifier, so that the electronic device can subsequently download the corresponding version of the private library based on the first version information and the second version information.

[0052] For example, assuming that the multiple private libraries to be merged include private libraries A1~A6, the dependent configuration file includes the names of private libraries A1~A3 and the user configuration version numbers (user configured version numbers), and the information management file includes the names and latest version numbers of private libraries A1~A6, then the electronic device can query the latest version numbers of private libraries A4~A6 from the information management file according to the names of private libraries A4~A6, and then use the user configuration version numbers of private libraries A1~A3 in the dependent configuration file and the latest version numbers of A4~A6 queried from the information management file as the version numbers b1~b6 downloaded from the private libraries A1~A6, so that the electronic device can subsequently download the corresponding versions of private libraries A1~A6 based on the version numbers b1~b6.

[0053] S104: Download multiple private libraries based on the first version information and the second version information.

[0054] In some embodiments, based on the first version information and the second version information, downloading multiple private libraries includes: generating a download script, and downloading the private libraries corresponding to the first version information and the second version information through the download script. By downloading the private library through the download script, the private library can be automatically downloaded without the need for manual download by the user, thereby improving the efficiency of private library download.

[0055] For example, after the electronic device uses the user configuration version numbers of private libraries A1~A3 in the dependency configuration file and the latest version numbers of A4~A6 queried from the information management file as version numbers b1~b6 downloaded from private libraries A1~A6, the electronic device can download private libraries A1~A6 corresponding to version numbers b1~b6 from the server through a download script.

[0056] S105, merging the multiple private libraries to obtain a merged file of the multiple private libraries.

[0057] In some embodiments, after the electronic device downloads the multiple private libraries to be merged, the electronic device may merge the multiple private libraries to obtain a merged file.

[0058] For example, after the electronic device downloads the private libraries A1-A6 corresponding to the version numbers b1-b6, the electronic device may merge the private libraries A1-A6 to obtain a corresponding merged file.

[0059] S106, uploading the merged file to the server.

[0060] In some embodiments, the electronic device may directly upload the merged file to the server, or may compress the merged file into a compressed file (such as a zip file, a rar file, etc.) and then upload it to the server.

[0061] S107, generating an index file corresponding to the merged file, wherein the index file is used to indicate the address of the merged file.

[0062] In some embodiments, after the electronic device uploads the merged file to the server, the electronic device may generate an index file indicating the address of the merged file, such as a podspec file or other file indicating the address of the merged file. The podspec file is a file used in the CocoaPods ecosystem to describe the metadata and configuration information of the library. CocoaPods is a system for managing Tools that third-party libraries in the project depend on.

[0063] In some embodiments, the index file may include a first field for indicating an address of the merged file.

[0064] For example, the first field may be the source field in a podspec file.

[0065] In the embodiment of the present application, the electronic device can determine the version information of multiple private libraries that need to be merged based on the dependency configuration file and the information management file, and then download the corresponding private library files based on the version information for merging. In this way, the user only needs to enter the version information of a part of the private library in the dependency configuration file to determine the version information of all the private libraries, without having to enter the version information of all the private libraries, which reduces the user's operations and improves the efficiency of merging private libraries.

[0066] In the above embodiment, the dependency configuration file includes the version information of some private libraries. In other embodiments, the dependency configuration file may also include the version information of all private libraries. In this case, since all private libraries are configured with version information, the electronic device can directly download the files of all private libraries according to the version information configured by the user for merging, without having to query the latest version information from the information management file.

[0067] In some other embodiments, the dependency configuration file may not include the version information of the private library, that is, the user does not configure any version information of the private library when configuring the information of the private library. In this case, the electronic device can query the latest version information of all private libraries from the information management file, and then download the files of each latest version of the private library for merging.

[0068] That is, when merging a private library, the electronic device can match the dependency configuration file with the information management file. If the version information of the private library exists in the dependency configuration file, the version information in the dependency configuration file is used as the version information when downloading, without querying the information management file. Conversely, if the version information of the private library does not exist in the dependency configuration file, the latest version information of the private library is queried from the information management file as the version information when downloading.

[0069] It can be understood that the private library files stored in the above server are private library files that are uploaded after being packaged. In the related art, the packaging principle of private library files is as follows:

[0070] Figure 2 According to some embodiments of the present application, a flowchart of packaging a single private library is shown.

[0071] like Figure 2 As shown, the process includes:

[0072] S1: Trigger the packaging pipeline.

[0073] You can create a build pipeline for your private library through a continuous integration (CI) system or a continuous deployment (CD) system. A build pipeline is an automated workflow in the software development process that defines a set of steps, starting with code submission, through compilation, testing, packaging, deployment, and other stages, to ultimately convert the code into a releasable software product.

[0074] In some embodiments, the condition for triggering the packaging pipeline may be that the developer submits code to a specific branch or tag.

[0075] S2: Package private library A.

[0076] S3: Output the framework file of private library A.

[0077] The code of private library A can be compiled through script tools such as xcodebuild, and a framework file can be generated after compilation, and then the framework file can be stored in an accessible location.

[0078] S4: Generate index file.

[0079] The index files required for private libraries can be dynamically generated through scripts, for example, the podspec files required to generate pod private libraries.

[0080] S5: Push the index file to the index warehouse.

[0081] The index repository is a repository for storing index files.

[0082] After obtaining the index file, the index file can be pushed to the index warehouse for storage. At this point, the private library packaging is completed.

[0083] The packaging of multiple private libraries is based on the packaging of a single private library, such as Figure 3 As shown, in the related art, a packaging pipeline of private libraries A to G or even more private libraries is built in advance. When the entire packaging process is started from the private library packaging main entrance, the packaging pipelines of private libraries A to G or even more private libraries are started in sequence to package all private libraries, that is, full packaging. However, the full packaging method has too many pipelines and is not easy to manage.

[0084] For example, each time a new private library is added, a new private library pipeline is required, and a new association is inserted into the main pipeline. Deleting a private library requires the opposite operation. When there are fewer private libraries, manual association or deletion is relatively simple. However, when there are more private libraries, the workload of manual operation is large and it is easy to cause misoperation, especially in the stage of new function development (such as developing Z library). The current test branch does not need to rely on Z library, but the development branch needs to rely on Z library. This requires the main pipeline to have the ability to dynamically manage the number and branches of private libraries. In addition, since private libraries are packaged on their own independent pipelines, and the version numbers of each private library are managed independently. This leads to the inability to perceive the versions that depend on each other between private libraries, and it is easy to have problems with relying on old versions.

[0085] Understandably, due to Figure 3 The packaging process shown is a full packaging process, and even if there are unupdated private libraries in the private libraries A to G, they still need to be updated. In this way, the packaging efficiency of the private libraries is reduced.

[0086] In order to improve the packaging efficiency of multiple private libraries, the embodiment of the present application also provides an incremental packaging method, which does not need to package each private library, but only needs to package the private libraries that have been updated.

[0087] Figure 4 According to some embodiments of the present application, a flowchart of an incremental packaging method is shown.

[0088] It should be noted that the execution subjects of the following processes are all electronic devices. When introducing the following processes, the execution subjects of each process will not be described in detail.

[0089] like Figure 4 As shown, the method includes:

[0090] S201: Create a private library information management warehouse.

[0091] In some embodiments, the electronic device may create a private library information management repository for storing information management files of the private library, and store it in a remote repository (such as a Git repository).

[0092] It should be noted that if the private library information management warehouse has been created, S201 can be skipped.

[0093] S202: Creating an information management file in a private library information management warehouse.

[0094] In some embodiments, after the private library information management warehouse is created, an information management file for storing private library information may be created in the created private library management warehouse.

[0095] Specifically, you can first create an empty information management file, and then add the configuration information of each private library to the empty information management file according to the set format. For example, you can follow Figure 5 Add the information of each private library to the empty information management file in the format shown.

[0096] Specifically, Figure 5 As shown, the private library information stored in the information management file includes the private library name, version number, source code repository address information, branch name and commit ID.

[0097] As you can understand, commit id is a string used to uniquely identify each code submission in DVCS. Every time you submit code to the version control system, the version control system will generate a commit id.

[0098] It should be noted that the commit ID stored in the information management file is the latest commit ID of the private library.

[0099] It should be noted that if the information management file has been created, S202 can be skipped.

[0100] S203: Clone the private library information management repository to obtain information management files.

[0101] In some embodiments, when the electronic device receives a clone instruction, the electronic device can clone the private library information management warehouse from the remote warehouse to obtain the information management file. For example, when the electronic device receives a cone git instruction, the electronic device can clone the private library information management warehouse from the Git warehouse.

[0102] S204: Traverse the information management files to perform incremental packaging.

[0103] In some embodiments, after the electronic device obtains the information management file, the electronic device may parse the information management file to obtain each private library information stored in the information management file.

[0104] In some embodiments, when the electronic device needs to package N (positive integer) private libraries, the electronic device can obtain the commit id of the N private libraries after the most recent compilation, and obtain the latest commit id of the N private libraries from the information management file. Then, the commit id of each private library in the N private libraries after the most recent compilation is compared with the latest commit id, and it is determined whether they are the same. If so, it means that the private library has not been updated, and the private library is not packaged. If not, it means that the private library has been updated, and the private library is packaged.

[0105] S205: It is detected that the private library is packaged successfully, and the version number, branch name and commit ID of the private library are modified.

[0106] In some embodiments, when the private library is packaged successfully, the electronic device may modify the version number, branch name, and commit id of the private library in the information management file to the latest version number, branch name, and commit id.

[0107] S206: It is detected that the private library packaging fails, and the next private library is packaged.

[0108] In some embodiments, when packaging of a previous private library fails, the electronic device may continue to package the next private library.

[0109] S207: Push the modified information management file to the remote warehouse.

[0110] In some embodiments, after the electronic device has packaged all private libraries, the electronic device can modify the version information of the private library in the information management file to the latest version information, and then push the modified information management file to the private library information management warehouse of the remote warehouse, so that the information management file stores the latest private library information.

[0111] In an embodiment of the present application, when packaging multiple private libraries, only the private libraries that have been updated can be packaged, without packaging the private libraries that have not been updated, which can improve the packaging efficiency of the private libraries.

[0112] For example, Figure 6 As shown, when packaging 26 private libraries (2 of which were updated), it took 19 minutes and 8 seconds to package using the full packaging method, while it only took 3 minutes and 55 seconds to package using the incremental packaging method of the present application.

[0113] Figure 7 According to some embodiments of the present application, another incremental packaging method is shown.

[0114] It should be noted that the execution subjects of the following processes are all electronic devices. When introducing the following processes, the execution subjects of each process will not be described in detail.

[0115] like Figure 7 As shown, the method includes:

[0116] S401: Create a private library S1 and create a release branch.

[0117] In some embodiments, the electronic device may create a new private library S1 and create a release branch (release branch) in the private library S1 to store the code of the release version.

[0118] In some embodiments, the electronic device may also create a master branch and a develop branch. Then, the electronic device may add corresponding access permissions for each branch to ensure access security of each branch.

[0119] It should be noted that if the private library S1 has been created, S401 is skipped.

[0120] S402: Use Cocoapod to create a private library S1, add code and push it to the private library S1.

[0121] In some embodiments, the electronic device can use the git clone command to clone the private library S1 to the local computer, and create a private library project of the private library S1 in the file of the private library S1. Then, when creating the private library S1, the Cocoapod tool can be used to execute the pod lib create A1 command to create the private library S1 in the private library project of the private library S1.

[0122] It should be noted that if the private library S1 has been created, S402 is skipped.

[0123] S403: Create a private library information management warehouse.

[0124] In some embodiments, the electronic device may create a private library information management repository.

[0125] It should be noted that if the private library information management repository has been created, S403 can be skipped.

[0126] S404: Create an information management file and add configuration information of the information management file.

[0127] In some embodiments, the electronic device may create a name information management file and add the configuration information of the private library S1 in the name information management file.

[0128] It should be noted that when adding private library information to the information management file for the first time, the correctness of the private library name must be ensured.

[0129] In some embodiments, when adding configuration information of multiple private libraries to the information management file, the configuration information of each private library can be added in the order of dependency of the private libraries. For example, if private library A depends on private library B, the configuration information of private library B is added first and then the configuration information of private library A.

[0130] S405: Add dependency configuration files and add private library S1 dependency pod 'S1'.

[0131] In some embodiments, the electronic device may add a dependency configuration file, and add a private library dependency pod 'S1' in the dependency configuration file:

[0132] No version number: pod "S1";

[0133] There are version numbers: pod "S1", "1.1.2".

[0134] S406: With the help of Devops platform, configure the pipeline to trigger the packaging pipeline. You can manually enter the code branch name.

[0135] In some embodiments, the packaging pipeline can be configured through the Devops platform, and the triggering condition of the packaging pipeline can be configured to detect that the user manually enters the code branch name.

[0136] S407: Trigger incremental packaging.

[0137] In some embodiments, when the electronic device detects that a user enters a code branch name such as release on the electronic device, the private library packaging pipeline is triggered to perform incremental packaging.

[0138] In some embodiments, the electronic device can determine whether the private library to be packaged is updated by querying the version number in the information management file. If so, the private library is packaged; if not, the private library is not packaged.

[0139] Figure 8 According to some embodiments of the present application, a method for specifying branch packaging is shown.

[0140] It should be noted that the execution subjects of the following processes are all electronic devices. When introducing the following processes, the execution subjects of each process will not be described in detail.

[0141] like Figure 8 As shown, the method includes:

[0142] S501: Get the branch name.

[0143] When a user creates an information management file, the user can enter the corresponding branch name, such as release.

[0144] In some embodiments, after the user inputs a branch name, the electronic device obtains the branch name.

[0145] S502: Clone the information management file of the corresponding branch.

[0146] In some embodiments, after the electronic device obtains the branch name, it can clone the information management file of the branch corresponding to the branch name from the remote repository.

[0147] S503: Clone the code of the branch corresponding to the sub-repository, and package and save the corresponding branch name and version number.

[0148] In some embodiments, the electronic device may clone the code of each sub-library in the branch corresponding to the branch name from the remote repository for packaging, and then save the branch name and version number of the branch.

[0149] In the embodiment of the present application, the code of each branch can be automatically packaged according to the branch name, that is, the branch packaging is specified, which improves the efficiency of branch packaging.

[0150] The electronic devices involved in the above embodiments are introduced below.

[0151] For example, Fig. 9 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown.

[0152] The electronic device 100 can be used to implement the private library merging methods provided in the aforementioned embodiments.

[0153] like Fig. 9 As shown, the electronic device 100 includes one or more processors 101, a system memory 102, a non-volatile memory (NVM) 103, a communication interface 104, an input / output device 105, and a system control logic 106 for coupling the processor 101, the system memory 102, the non-volatile memory 103, the communication interface 104 and the input / output (I / O) device 105. Among them:

[0154] The processor 101 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor or a programmable logic device (field programmable gate array, FPGA), a neural network processor (neural-network processing unit, NPU), etc. The processing module or processing circuit may include one or more single-core or multi-core processors. In some embodiments, the CPU can be used to optimize the neural network model to be run, and the NPU can be used to run the neural network model to be run.

[0155] The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store the aforementioned target code, executable files, executable instructions, etc., and can also be used to store instructions of the private library merging method provided in the aforementioned embodiments, etc.

[0156] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as a flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card, etc. In other embodiments, the non-volatile memory 103 may be used to store instructions of the private library merging method provided in the aforementioned embodiments, etc.

[0157] In particular, the system memory 102 and the non-volatile memory 103 may respectively include: a temporary copy and a permanent copy of the instruction 107. The instruction 107 may include: an instruction that enables the electronic device 100 to implement the private library merging method provided by each embodiment of the present application when executed by at least one of the processors 101.

[0158] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the electronic device 100, and then communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the electronic device 100, for example, the communication interface 104 may be integrated into the processor 101. In some embodiments, the electronic device 100 may communicate with other devices through the communication interface 104, for example, the electronic device 100 may obtain demand data from other electronic devices through the communication interface 104.

[0159] The input / output (I / O) device 105 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the electronic device 100 through the input / output (I / O) device 105 .

[0160] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of electronic device 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.

[0161] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).

[0162] Understandably, Fig. 9 The structure of the electronic device 100 shown is only an example. In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0163] The embodiments of the present application also provide a program product, which, when executed on an electronic device, can enable the electronic device to implement the methods provided in the aforementioned embodiments.

[0164] An embodiment of the present application further provides a readable storage medium, in which one or more programs are stored. When the one or more programs are executed by an electronic device, the electronic device implements the methods provided in the aforementioned embodiments.

[0165] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.

[0166] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.

[0167] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0168] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, the machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy disks, optical disks, optical discs, compact disc-read only memory (CD-ROMs), magneto-optical disks, read-only memory (ROM), random-access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic or optical cards, flash memory, or tangible machine-readable storage for transmitting information using the Internet in electrical, optical, acoustic or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.). Therefore, the machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0169] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0170] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0171] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0172] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. A private library merging method, characterized in that: For an electronic device, the method comprises: Obtaining a dependency configuration file input by a user, wherein the dependency configuration file includes first version information of some private libraries among the multiple private libraries to be merged, and the first version information is version information configured by the user; Acquire an information management file, wherein the information management file includes second version information of the last update of the plurality of private libraries; Querying the information management file for second version information of another part of the private libraries among the multiple private libraries; Downloading the multiple private libraries based on the first version information and the second version information; The multiple private libraries are merged to obtain a merged file of the multiple private libraries.

2. The method according to claim 1, characterized in that The information management file is stored in a private library information management warehouse, and the private library information management warehouse is stored in a server; The acquisition information management file includes: The private library information management warehouse is cloned from the server, and the information management file is read from the private library information management warehouse.

3. The method according to claim 1, characterized in that: The dependency configuration file and the information management file both include identifiers of the multiple private libraries; The querying the second version information of another part of the private libraries in the plurality of private libraries from the information management file includes: Obtaining the identifier of the other part of the private library from the dependency configuration file; Based on the identifier, the second version information of the other part of the private library is queried from the information management file.

4. The method according to claim 1, characterized in that The downloading of the plurality of private libraries based on the first version information and the second version information includes: Generate download script; The multiple private libraries corresponding to the first version information and the second version information are downloaded through the download script.

5. The method according to claim 1, characterized in that The method further comprises: An index file corresponding to the merged file is generated, wherein the index file is used to indicate an address of the merged file.

6. The method according to claim 5, characterized in that The index file includes a first field, wherein the first field is used to indicate the address of the merged file.

7. The method according to any one of claims 1 to 4, characterized in that The version information includes one of the version number, version name, and version tag.

8. An electronic device, characterized in that: include: A memory for storing instructions; At least one processor is used to execute the instructions so that the electronic device implements the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is executed on a device, the device is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Cocopods proxy and cache management method and device of product storage system, equipment and medium

    CN120596138A