[go: up one dir, main page]

WO2024250792A1 - Software package building method and apparatus, and related device - Google Patents

Software package building method and apparatus, and related device Download PDF

Info

Publication number
WO2024250792A1
WO2024250792A1 PCT/CN2024/082421 CN2024082421W WO2024250792A1 WO 2024250792 A1 WO2024250792 A1 WO 2024250792A1 CN 2024082421 W CN2024082421 W CN 2024082421W WO 2024250792 A1 WO2024250792 A1 WO 2024250792A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
package
source code
software package
historical
Prior art date
Application number
PCT/CN2024/082421
Other languages
French (fr)
Chinese (zh)
Inventor
段鹏杰
吴峰光
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024250792A1 publication Critical patent/WO2024250792A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present application relates to the field of computer technology, and in particular to a software package construction method, apparatus and related equipment.
  • Building a software package refers to the process of converting the source code of the software into an executable software package, wherein the resulting software package refers to one or more groups of programs with specific functions and used to complete specific tasks.
  • a software package may include one or more Red Hat Package Managers (RPMs), and each RPM is used to implement at least one function in the software.
  • RPMs Red Hat Package Managers
  • developers can use build tools to build software packages corresponding to each software in the development project.
  • the source code of some software in the development project may change, such as when the developer optimizes the code logic of this part of the software.
  • the user can use the build tool to adopt the incremental build method to build a new software package corresponding to this part of the software. Since there are usually dependencies between the software packages corresponding to multiple software in the development project, such as the construction of software package a depends on the completion of the construction of software package b first, each time the build tool rebuilds the software package corresponding to a software, it will also rebuild all other software packages that depend on this software package, which will cause the build tool to execute a large number of invalid repeated software package construction processes, thereby affecting the overall development efficiency of the development project.
  • the development project includes software A, B, C, and D.
  • the software packages constructed based on these four software are software package a, software package b, software package c, and software package d, respectively.
  • the construction of software package a depends on the completion of the construction of software packages b, c, and d first.
  • the construction tool can rebuild a new software package b based on the source code of software B. Since software package a depends on software package b, after rebuilding software package b, the construction tool will also rebuild software package a that depends on software package b. Then, the construction tool rebuilds a new software package c based on the source code of software C.
  • the construction tool will rebuild software package a again after building the new software package c.
  • the construction tool will repeat the process of building software package a three times in the process of building new software packages b, c, and d. Among them, only the software package a obtained by the last construction is valid, and the processes of building software package a twice before are invalid repeated construction processes.
  • the present application provides a software package construction method to avoid executing the process of invalid and repeated software package construction as much as possible, thereby improving the overall development efficiency of the development project.
  • the present application also provides a corresponding software package construction device, a computing device, a computer-readable storage medium, and a computer program product.
  • the present application provides a software package construction method, which can be executed by a corresponding software package construction device.
  • the software package construction device obtains historical construction information of multiple software, and the historical construction information includes relevant information of software packages constructed for the multiple software within a historical time period, such as the identification of each sub-software package in the software package constructed for each software in the process of incrementally constructing software packages for multiple software in a development project last time, the dependency relationship between different software packages, and other information; and the software package construction device determines first description information of a first software among the multiple software (such as the identification of the first software, or the storage location of the source code of the first software, etc.), the source code to be constructed of the first software and the information of the constructed source code of the first software There are differences in the source code to be built, the source code to be built refers to the source code of the software package that needs to be rebuilt in the current incremental build process, and the constructed source code refers to the source code used to build the software package in the historical time period; then, the
  • the software package construction device may obtain the source code to be built of the first software and the second software from a third-party hosting platform according to the first description information and the second description information, or may obtain the source code to be built of all software before determining the first description information and the second description information, and then filter out the source code to be built of the first software and the second software.
  • the description information of all software i.e., the first software and the second software
  • the source code of the first software corresponding to the first software package that is relied on is preferentially built according to the description information and the historical construction information
  • the source code of the first software can be built only once during the entire incremental building process, thereby avoiding invalid construction of the source code of the first software being repeated many times, thereby improving the incremental building efficiency of the software package and improving the overall development efficiency of the development project.
  • the time required to build the software packages corresponding to the source codes of these software can be estimated, thereby predicting the end time of the incremental building process and improving the user experience.
  • the software package construction device when the software package construction device constructs the source code to be constructed of the first software and the source code to be constructed of the second software, the software package construction device may first construct the source code to be constructed of the first software according to the first description information to obtain the first software package, and determine that the first sub-package in the first software package on which the second software package depends has changed according to the historical construction information, so that the software package construction device then constructs the source code to be constructed of the second software according to the second description information to obtain the second software package.
  • the software package construction device may not need to rebuild the software package for the second software.
  • the first software package may include multiple sub-packages, each of which may be, for example, RPM, etc., and each of the multiple sub-packages is used to implement at least one function of the first software, such as an image cropping function, an image zooming function, etc.; in this way, when the software package construction device determines that the sub-package in the first software package on which the second software package depends has changed, it may specifically determine the identifier of the second sub-package on which the historical software package corresponding to the second software depends based on the historical construction information, wherein the historical software package corresponding to the second software is obtained by building the constructed source code of the second software, so that the software package construction device may detect that there is no first sub-package matching the second sub-package in the first software package according to the identifier of the second sub-package, which indicates that the sub-package on which the software package corresponding to the second software depends has changed compared to before, that is, it is determined that the sub-package in the first software package on
  • the software package construction device can determine whether to rebuild the software package for the second software by comparing whether the sub-package on which the software package corresponding to the second software depends has changed, so as to avoid invalidly building the software package for the second software when the sub-package on which it depends has not changed.
  • the multiple software in the incremental construction process may include a third software in addition to the first software and the second software, and the software package corresponding to the third software depends on the second software package; in this way, when the software package construction device constructs the source code to be constructed of the first software and the source code to be constructed of the second software, it can be determined based on the historical construction information, and the dependency relationship between the first software package, the second software package and the third software package is generated according to the dependency relationship between the first software package, the second software package and the third software package.
  • the first dependency chain indicates that the source code to be constructed of the first software is constructed before the source code to be constructed of the second software
  • the second dependency chain indicates that the source code to be constructed of the second software is constructed before the source code to be constructed of the third software
  • the software package construction device can construct the source code to be constructed indicated in the first dependency chain and the source code to be constructed indicated in the second dependency chain in parallel according to the first description information, the second description information, and the third description information of the third software.
  • the software package construction device can simultaneously construct software packages for software in multiple dependency chains, which can effectively improve the efficiency of constructing software packages for multiple software, thereby further improving the overall development efficiency of the development project.
  • the software package construction device can generate a larger number of dependency chains to achieve a higher degree of concurrency.
  • the third software package corresponding to the third software depends on the third sub-package in the second software package
  • the fourth sub-package in the second software package depends on the first software package.
  • the sub-package on which the software package corresponding to the third software depends is changed to the third sub-package.
  • the software package construction device rebuilds the software package for the first software, it will only affect the fourth sub-package in the second software package, but will not affect the third sub-package on which the third software package depends, thereby not affecting the process of the software package construction device building the software package for the third software.
  • the process of the software package construction device concurrently building software packages for software in multiple dependency chains can be independent of each other, while improving the efficiency of incremental construction and avoiding as much as possible the duplication of some software. Invalid build of .
  • the historical construction information also includes the content identifier of the constructed source code of the first software.
  • the software package construction device determines the first description information of the first software among the multiple software, it can specifically obtain the content identifier of the candidate source code of the first software first, such as by taking a snapshot of the information in the code repository.
  • the content identifier can be the identifier assigned to the candidate source code when it is submitted by the user, the version number, or the information calculated by the digest algorithm.
  • the software package construction device determines the first description information of the first software among the multiple software, and uses the candidate source code as the source code to be constructed, that is, the software package construction device will rebuild the software package for the first software according to the candidate source code (that is, the source code to be constructed).
  • the first description information includes the content identifier of the first software and the indication information of the storage location of the constructed source code of the first software. In this way, the software package construction device can determine the software whose source code has changed by comparing the content identifiers corresponding to the new and old source codes, and thus rebuild the software package for the software by further determining the description information of the software.
  • the historical build information includes a dependency relationship between a historical software package corresponding to the second software and a historical software package corresponding to the first software, wherein the historical software package corresponding to the second software is obtained by building the constructed source code of the second software, and the historical software package corresponding to the first software is obtained by building the constructed source code of the first software; thus, when the software package building device determines the second description information of the second software among the multiple software, it can specifically be firstly detected from the multiple software according to the historical build information that there is a dependency relationship between the historical software package corresponding to the second software and the historical software package corresponding to the first software, so that the software package building device can determine the second description information of the second software, and the second description information includes the content identifier of the second software and the indication information of the storage location of the constructed source code of the second software.
  • the software package building device can determine which software packages among the multiple software will depend on the software package corresponding to the first software according to the dependency relationship between the historical software packages corresponding to different software recorded when the multiple software packages are built within the historical time period, and further determine the description information of the part of the software, so as to determine the software whose source code has not changed but still needs to be rebuilt according to the description information.
  • the software package construction device may also store the content identifier of the source code to be constructed of the first software, the identifier of the sub-package included in the first software package, the content identifier of the source code to be constructed of the second software, the identifier of the sub-package included in the second software package, and the dependency relationship between the first software package and the second software package.
  • the software package construction device may create a new database to record this information, etc.
  • the software package construction device may incrementally construct software packages for the multiple software packages based on the stored information, while avoiding the situation where the software is repeatedly and invalidly constructed as much as possible, so as to improve the efficiency of the next incremental construction of the software package.
  • the software packages corresponding to the first software and the second software may be repeatedly constructed based on the information recorded in the database, so as to analyze the root cause of the problem based on the constructed software packages.
  • the software package construction device can also use the first software package to replace the historical software package corresponding to the first software in the second database, and use the second software package to replace the historical software package corresponding to the second software in the second database; wherein the second database includes historical software packages corresponding to multiple software, the historical software package corresponding to the first software is obtained by constructing the constructed source code of the first software, and the historical software package corresponding to the second software is obtained by constructing the constructed source code of the second software.
  • the software packages stored in the second database are the latest versions of the software packages corresponding to the multiple software, thereby realizing the update of the software packages of the multiple software.
  • the present application provides a software package construction method, which can be executed by a corresponding software package construction device.
  • the software package construction device obtains historical construction information of multiple software, and the historical construction information includes relevant information of the software packages constructed for the multiple software within a historical time period, such as the identification of each sub-software package in the software package constructed for each software in the process of incrementally constructing software packages for multiple software in a development project last time, the dependency relationship between different software packages, and other information; and the software package construction device determines first description information of a first software among the multiple software (such as the identification of the first software, or the storage location of the source code of the first software, etc.), there is a difference between the source code to be constructed of the first software and the constructed source code of the first software, the source code to be constructed refers to the source code of the software package that needs to be reconstructed in the current incremental construction process, and the constructed source code refers to the source code used to construct the software package within the historical time period; wherein the determined first description information
  • the software package construction device can determine the description information of all the software (i.e., the first software and the second software) that need to rebuild the software package among the multiple software, so that when the corresponding software package is subsequently built according to the description information of these software, the source code of the first software can be built only once, thereby avoiding the invalid construction of the source code of the first software being repeated multiple times, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project.
  • each The source code of each software can be built only once, so the time required to build the software packages corresponding to the source code of these software can be estimated, so that the end time of the incremental build process can be anticipated, improving the user experience.
  • the present application provides a software package construction device, wherein the software package construction device includes modules for executing the software package construction method in the first aspect or any possible implementation of the first aspect.
  • the present application provides a software package construction device, wherein the software package construction device includes modules for executing the software package construction method described in the first aspect or the second aspect.
  • the present application provides a computing device, the computing device comprising a processor and a memory.
  • the processor and the memory communicate with each other.
  • the processor is used to execute instructions stored in the memory, so that the computing device executes the software package construction method in the first aspect or any one of the implementations of the first aspect, or executes the software package construction method in the second aspect.
  • the memory can be integrated into the processor or can be independent of the processor.
  • the computing device may also include a bus.
  • the processor is connected to the memory via the bus.
  • the memory may include a readable memory and a random access memory.
  • the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, which, when executed on a computing device, causes the computing device to execute the operating steps of the software package construction method described in the first aspect or any one of the implementations of the first aspect, or to execute the operating steps of the software package construction method as in the second aspect.
  • the present application provides a computer program product comprising instructions, which, when executed on a computing device, causes the computing device to execute the operating steps of the software package construction method described in the first aspect or any one of the implementations of the first aspect, or to execute the operating steps of the software package construction method as in the second aspect.
  • FIG1 is a schematic diagram of the structure of an exemplary software package construction system provided by the present application.
  • FIG2 is a schematic diagram of a flow chart of a method for constructing a software package provided by the present application
  • FIG3 is a schematic diagram of historical construction information recorded by the software construction device 200.
  • FIG4 is a schematic diagram of breaking a dependency loop and obtaining a dependency chain
  • FIG5 is a schematic diagram of the structure of another exemplary software package construction system provided by the present application.
  • FIG6 is a flow chart of another method for constructing a software package provided by the present application.
  • FIG7 is a schematic diagram of the structure of a software package construction device provided by the present application.
  • FIG8 is a schematic diagram of the structure of another software package building device provided by the present application.
  • FIG9 is a schematic diagram of the hardware structure of a computing device provided by the present application.
  • FIG10 is a schematic diagram of the hardware structure of a computing device cluster provided in the present application.
  • the present application provides a software package building method, by determining all the software that needs to rebuild the software package among the multiple software, and preferentially building the source code of the first software corresponding to the dependent first software package, thereby reducing the number of times the source code of the first software is built, such as the source code of the first software is only built once, thereby avoiding invalid construction of the source code of the first software repeatedly, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project.
  • Source code also known as source program, refers to an uncompiled text file written in accordance with certain programming language specifications, including a series of computer language instructions.
  • Software refers to a collection of computer data and instructions organized in a specific order, including computer programs, procedures, rules, and possible files, documents, and data related to the operation of a computer system.
  • a software package is a group or multiple groups of programs that have specific functions and are used to complete specific tasks.
  • a software package can be obtained by compiling and packaging the source code, and the software package is used to implement all the functions of the software.
  • a sub-package refers to one or more sub-packages included in a software package, each of which is used to implement at least one function of the software.
  • FIG1 a schematic diagram of the structure of a software package construction system provided by the present application is shown.
  • 10 may include a client 100 and a software package construction device 200, and the client 100 and the software package construction device 200 may be interconnected via a network.
  • the software package construction device 200 may be deployed in the cloud to provide cloud services for building software packages for users (such as software developers, etc.).
  • the client 100 is used to interact with the user, such as receiving a new version of source code (or the storage location of the source code) provided by the user, and requesting the cloud-based software package construction device 200 to perform full or incremental construction of multiple software packages.
  • the client 100 can be an application running on a user-side device, or a web browser provided by the software package construction system 10.
  • the software package construction device 200 is used to construct a software package according to the source code (or the storage location of the source code) sent by the client 100.
  • the user can update the source code of some of the multiple software and submit the source code of the new version of the multiple software (or the storage location of the source code of the new version) to the software package construction device 200 through the client 100.
  • the source code of some of the software in the new version of the source code remains unchanged, and the source code of the other part of the software is updated by the user.
  • the software package construction device 200 can construct the corresponding software packages for the multiple software by incremental construction.
  • the software package construction device 200 obtains the software package related information constructed for the multiple software in the past time period, which is referred to as historical construction information below.
  • the historical construction information may include, for example, the identification of the software package constructed for the multiple software in the past time period, the identification of the sub-software package included in each software package, and the dependency relationship between the software packages.
  • the software package construction device 200 determines the first description information of the first software among the multiple software, the source code to be constructed of the first software is different from the constructed source code of the first software (that is, the source code submitted to the software package construction device 200 in the past time period), and the first description information may include, for example, the content identification and storage location of the source code to be constructed of the first software.
  • the software package construction device 200 also determines the second description information of the second software among the multiple software based on the historical construction information, the software package corresponding to the second software depends on the software package corresponding to the first software, and the second description information may include, for example, the content identification and storage location of the source code to be constructed of the second software.
  • the software package construction device 200 constructs the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information and the historical construction information, and obtains the software package corresponding to the first software and the software package corresponding to the second software.
  • the software package construction device 200 first constructs the first software package according to the source code to be constructed of the first software, and then constructs the second software package according to the source code to be constructed of the second software.
  • the software package building device 200 will first determine the description information of all the software (that is, the first software and the second software) in the multiple software that need to rebuild the software package, and then preferentially build the source code of the first software according to the dependency relationship between the software packages, this can effectively reduce the number of times the source code of the first software is built during the entire incremental building process.
  • the source code of the first software can be built only once, thereby avoiding invalid construction of the source code of the first software being repeated multiple times, thereby improving the incremental building efficiency of the software package and improving the overall development efficiency of the development project.
  • the software package construction device 200 can determine which software needs to be rebuilt, and the source code of each software can be built only once, the software package construction device 200 can estimate the total time required to build the software packages corresponding to the source codes of these software, and thus can estimate the end time of the incremental construction process, which is convenient for user perception, thereby improving user experience.
  • the software package construction device 200 may be implemented by software or hardware.
  • the software package construction device 200 when implemented by software, can be implemented by program code in a computing device, for example, it can be implemented by at least one of a virtual machine, a container, a bare metal server (BMS), a computing engine, etc.
  • the computing device can be a server located on the cloud, etc.
  • the software package construction device 200 when implemented by hardware, can be implemented by at least one physical device including a processor, such as a server, etc., and the physical device can be deployed on the cloud.
  • the processor can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, a data processing unit (DPU), and any processor core or any combination thereof.
  • the number of processors included in the software package construction device 200 can be one or more, and the type of processors included can be one or more. The number and type of processors can be set according to the business requirements of the actual application. This embodiment does not limit this.
  • the software package construction system 10 capable of providing software package construction cloud service shown in FIG. 1 is only used as an exemplary description.
  • the software package construction system may also include other devices, such as at least one database for storing source codes of multiple software, or storing software packages corresponding to multiple software, or storing the above historical construction information, etc.
  • the software package construction system may be deployed on a terminal device on the user side.
  • the software package construction system may provide users with a localized service for building software packages.
  • the software package construction system may not include a client, so that users can directly provide source codes of multiple software on the local terminal device, and the software package construction system executes the above processing for incrementally building software packages.
  • the operations performed by the software package construction device 200 may be performed collaboratively by multiple devices, such as by device 1 and device 2, wherein device 1 is used to determine the above-mentioned first description information and second description information based on historical construction information, specifically, device 1 is used to obtain the above-mentioned historical construction information, determine the first description information of the first software whose source code to be constructed is different from the constructed source code, and determine the second description information of the second software based on the historical construction information, and the second software package corresponding to the second software depends on the first software package corresponding to the first software; device 2 is used to construct the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the historical construction information, the first description information and the second description information, obtain the second software package corresponding to the first software and the second software package corresponding to the second software, and device 2 will first construct the first software package based on the source code to be constructed of the first software, and then construct the second software package based on the source code
  • FIG 2 is a schematic flow chart of a software package construction method provided by the present application.
  • the method can be applied to the software package construction system shown in Figure 1, or can be applied to other applicable software package construction systems.
  • the present method is applied to the software package construction system 10 shown in Figure 1 as an example for exemplary description.
  • the software package construction method shown in FIG2 may specifically include:
  • the client 100 sends a full build request to the software package building device 200 to request the software package building device 200 to build a software package for each software in the development project.
  • the user can use the software package construction system 10 to construct corresponding software packages for each software in the development project, and the software package corresponding to each software may include multiple sub-software packages.
  • the software package may be, for example, an RPM package, which may include one or more RPMs (i.e., sub-software packages), and each RPM may generally include an executable file, a configuration file, a library file, etc., wherein the executable file may be, for example, a binary file.
  • the constructed software package can be used to implement at least one function of the software, such as an image cropping function, an image zooming function, etc., and is managed by the RPM package manager in the software package construction device 200.
  • the user can provide the storage address of the source code of each software in the development project on the client 100, such as a uniform resource locator (URL). Then, the client 100 can generate a full build request according to the storage address of the source code of each software, and send it to the software package building device 200 to request the software package building device 200 to build the software package of each software.
  • a uniform resource locator URL
  • the software package construction device 200 responds to the received full construction request, constructs the software packages of each software, and generates historical construction information.
  • the software package construction device 200 can create a code warehouse and multiple databases, wherein the code warehouse is used to store the source code of each software, and the multiple databases are used to store different information in the software package construction process, such as database 1 is used to store the software packages corresponding to each software obtained by construction, and database 2 is used to store information such as the dependency relationship between different software packages.
  • the dependency relationship between software packages can also be called the dependency relationship between software, or the dependency relationship between software and the software packages of other software.
  • the software package construction device 200 can parse the storage address of the source code of each software from it. Then, the software package construction device 200 accesses the source code of each software according to the storage address and writes it into the created code warehouse. In this way, the software package construction device 200 can respectively construct the software packages corresponding to multiple software according to the source code stored in the code warehouse. Among them, the specific implementation of the software package obtained by construction according to the source code has already existed in the actual application scenario, and will not be repeated here.
  • the software package construction device 200 may store the software packages corresponding to the various software in the database 1; and the software package construction device 200 may also record the relevant information of the software packages constructed for the multiple software in the database 2, which is referred to as historical construction information below.
  • the historical construction information recorded by the software package construction device 200 in the database 2 may also include information related to the source code.
  • the historical construction information recorded by the software package construction device 200 may be as shown in FIG. 3. The specific information content included in the historical construction information is described in detail below.
  • each sub-package in each software package such as the identifier "pkg_id_a1" of the sub-package rpm a1 in Figure 3.
  • the identifier can be generated according to the information content in the sub-package using a digest algorithm.
  • the digest algorithm may be MD5 message-digest algorithm; or, the digest algorithm may be secure hash algorithm (SHA) 256, which uses a 256-bit string to identify the sub-package.
  • SHA secure hash algorithm
  • the software package construction device 200 may also generate the identification of the sub-package based on other types of algorithms, which is not limited thereto.
  • the recorded dependency relationship may be a dependency relationship at the software package level. For example, "software package A -> software package X" may be recorded in the database to indicate that software package A depends on software package X.
  • the recorded dependency relationship may be a dependency relationship at the sub-package granularity.
  • the software package corresponding to software A depends on the sub-package “pkg_id_x1” in the software package corresponding to software X and the sub-package “pkg_id_y1” in the software package corresponding to software Y. Accordingly, the software package corresponding to software A does not depend on other sub-packages in the software package corresponding to software X.
  • the content identifier of the source code may be a submission identifier when a user submits a new source code, that is, each time a user submits a source code, the source code may be configured with a unique submission identifier.
  • the content identifier of the source code may be a version number corresponding to the source code, or may be information generated by using a digest algorithm based on the information content in the sub-package.
  • the software package construction device 200 may also record more types of information, such as source code submission time, submission location, user identity, etc., which is not limited in this embodiment.
  • S203 The client 100 sends an incremental construction request to the software package construction apparatus 200 to request the software package construction apparatus 200 to perform incremental construction on the software packages of the multiple software included in the development project.
  • users may modify the source code of some software in the development project, such as optimizing the code logic in the source code of some software, etc. Since the source code of not all software will be modified, if the software package is rebuilt for all software, it is easy to generate a large number of invalid reconstruction processes. Therefore, the user can send an incremental build request to the software package building device 200 through the client 100 to request the software package building device 200 to incrementally build the software packages of multiple software included in the development project, that is, only a new software package can be built for some of the multiple software, and after the incremental build, the software packages corresponding to the multiple software can be the same as the software packages obtained by the full build (that is, the effect of the full build is achieved).
  • the software package construction apparatus 200 responds to the received incremental construction request and determines first description information of a first software among the multiple software, where the source code to be constructed of the first software is different from the constructed source code of the first software.
  • the source code that the software package construction device 200 has not yet determined to be constructed is called candidate source code
  • the source code that is currently determined to be constructed is called source code to be constructed
  • the source code that has been constructed in the last construction process is called constructed source code.
  • the candidate source code of the determined part of the software that is, the source code to be constructed, indicates that the software package needs to be constructed according to the source code to be constructed.
  • the first description information can be used to indicate the first software that needs to be rebuilt.
  • the first description information can be the identifier of the first software, or the content identifier of the source code to be built of the first software and the indication information of the storage location of the source code to be built.
  • the software package construction device 200 can determine the first software whose source code is updated from the multiple software. Exemplarily, this embodiment provides the following three implementation methods.
  • the user can enter The identifier of the software whose source code is updated, such as the software name.
  • the software whose source code is updated is referred to as the first software, and the first software can be one software or multiple software.
  • the client 100 can generate an incremental build request including the identifier of the first software, and send it to the software package construction device 200.
  • the software package construction device 200 can parse the identifier of the first software from the incremental build request, that is, determine the first description information of the first software whose source code is updated.
  • the software package construction device 200 can parse the storage address of the source code to be constructed of all software from the received incremental construction request, and access the candidate source code of each software according to the storage address, and take a snapshot of the content identifier of each candidate source code. Then, the software package construction device 200 can traverse each software, and compare the content identifier of the candidate source code of the currently traversed software with the content identifier of the constructed source code of the software in the last construction process (such as the full construction process in step S202), and determine whether there is a content difference between the candidate source code of the software and the constructed source code.
  • the software package construction device 200 can determine the software as the first software that needs to be repackaged, and record the first description information of the first software, such as the content identifier and storage address of the source code to be constructed of the first software, and use the candidate source code of the first software as the source code to be constructed, indicating that the software package needs to be rebuilt for the first software according to the candidate source code (that is, the source code to be constructed). If it does not exist, it indicates that there is no update in the source code of the software package, then the software package construction device 200 does not need to determine the software as the first software.
  • the software package construction device 200 can also verify whether the software package is constructed based on the constructed source code, and if the software package has been constructed, the software package construction device 200 may not need to determine it as the first software; and if the software package has not been constructed based on the constructed source code, such as the software package construction failure due to program running errors, etc., the software package construction device 200 can determine the software as the first software, and use the candidate source code of the first software as the source code to be constructed, so as to subsequently construct the corresponding software package based on the source code to be constructed of the first software.
  • the content identifier of the candidate source code may be, for example, a submission sequence number or a version number configured when the candidate source code is submitted by a user, or may be an identifier calculated using a digest algorithm.
  • the source code of some software in the development project may be modified multiple times within a period of time, and by taking a snapshot of the content identifier of the candidate source code, the source code of the latest version of each software in the development project can be determined.
  • the software package construction device 200 performs an incremental construction process according to the source code of the latest version, which can avoid the source code of the same software being modified multiple times during this period of time, resulting in the software package construction device 200 repeatedly performing an invalid incremental construction process.
  • the software package construction device 200 may not perform the incremental construction process temporarily; then, within this period of time, the source code of software A in the development project is updated for the second time, and the source code of software B in the development project is also updated, then, the software package construction device 200 can take a snapshot of the content identifier of the source code of the latest version of each software (such as the software package construction device 200 can take snapshots regularly), and perform an incremental construction process. In this way, the software package construction device 200 can avoid the invalid construction process performed when the source code of software A is updated for the first time.
  • the software package construction device 200 can directly compare the candidate source code of each software with the constructed source code to see if it is consistent, and determine the software whose candidate source code is inconsistent with the constructed source code as the first software that needs to be repackaged.
  • the software package construction device 200 can obtain the candidate source code of multiple software submitted by the user, and compare the candidate source code of each software with the constructed source code of the software in the code repository, so as to determine the first software whose candidate source code is inconsistent with the constructed source code.
  • the candidate source code of the first software that is, the source code to be constructed as the first software, indicates that the software package needs to be rebuilt for the first software based on the source code to be constructed.
  • the software package construction device 200 may add the first description information to a construction list, where the construction list is used to record the software/source code of the software package that needs to be rebuilt.
  • the software package construction device 200 determines second description information of a second software among the plurality of software according to the historical construction information, wherein a second software package corresponding to the second software depends on a first software package corresponding to the first software.
  • the part software is referred to as the second software, and the second software can be one software or multiple software.
  • the software package construction device 200 can detect whether there is a dependency relationship between the historical software packages corresponding to other software except the first software and the software package corresponding to the first software based on the historical construction information recorded in the database.
  • the historical software package of the first software refers to the software package that was constructed using the constructed source code of the first software during the previous construction process. software package; the historical software packages corresponding to the remaining software are similar.
  • the software package construction device 200 can determine the software as the second software that needs to rebuild the software package, and further determine the second description information of the second software.
  • the candidate source code of the second software represents the need to rebuild the software package for the second software based on the source code to be built.
  • the second description information can be used to indicate the second software that needs to rebuild the software package.
  • the second description information can be the identifier of the second software, or it can be the content identifier of the source code to be built of the second software and the indication information of the storage location of the source code to be built. If the historical software packages corresponding to other software do not depend on the historical software packages corresponding to the first software, the software package construction device 200 can determine not to rebuild the software package for the other software.
  • the software package construction device 200 can add the second description information to the construction list, so that the software package construction device 200 can subsequently reconstruct the software packages for the first software and the second software according to the description information recorded in the construction list.
  • the process of determining the first description information and the second description information is described by first determining the first software that has a source code update, and then determining the second software that depends on the first software according to the dependency relationship between the software packages.
  • the software package construction device 200 can traverse each software in the development project, and for the software A currently traversed, the software package construction device 200 can first verify whether the candidate source code of the software A is consistent with the constructed source code, such as by verifying through the content identifier. When the candidate source code is inconsistent with the constructed source code, the software package construction device 200 can add the description information of the software A (as the first software) to the construction list, and use the candidate source code of the first software as the source code to be constructed.
  • the software package construction device 200 can verify whether the source code of each software in the dependent environment corresponding to the software A has changed, specifically, according to the historical construction information, determine the historical software packages corresponding to other software (hereinafter referred to as candidate software) that the historical software package corresponding to the software A depends on, and verify whether the constructed source code of the candidate software is consistent with the candidate source code, for example, it can be verified whether the content identifier of the constructed source code corresponding to the candidate software is consistent with the content identifier of the candidate source code.
  • candidate software the historical software packages corresponding to other software that the historical software package corresponding to the software A depends on
  • the description information of software A (as the second software) and the description information of the candidate software (as the first software) are added to the build list; if they are consistent, representing that the source code of software A itself has not changed, and the source code of other software it depends on has not changed, it is determined not to rebuild the software package for software A.
  • the software package construction device 200 constructs the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information and the historical construction information to obtain a first software package corresponding to the first software and a second software package corresponding to the second software, wherein the source code to be constructed of the first software is constructed before the source code to be constructed of the second software.
  • the software package building device 200 can build the source code to be built of the software according to the description information of each software recorded in the building list to obtain the corresponding software package.
  • the software package construction device 200 can obtain the source code to be built of the software according to the description information of each software, and construct the corresponding software package according to the obtained source code to be built. Taking the construction of the first software package as an example, the software package construction device 200 can access the third-party hosting platform according to the indication information of the storage location of the source code to be built in the first description information, and pull the source code to be built of the first software according to the content identifier of the source code to be built included in the first description information, so that the software package construction device 200 can construct the first software package according to the obtained source code to be built of the first software. Similarly, the software package construction device 200 can construct the second software package according to the second description information recorded in the construction list.
  • the software package building device 200 can determine the dependency relationship between different software packages based on the historical building information, and based on the dependency relationship, give priority to completing the construction of the first software package that is dependent.
  • the software package building device 200 then builds the second software package based on the source code to be built of the second software. In this way, it is possible to avoid repeated construction of the second software package, that is, it is possible to avoid the need to rebuild the second software package due to the reconstruction of the first software package on which it depends after the second software package is built.
  • the source code of the first software does not need to be repeatedly built, thereby avoiding invalid construction of the source code of the first software by repeated construction, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project.
  • the software package construction device 200 is able to determine the source code of all software that needs to be rebuilt, and therefore can estimate the total time required to build the software packages corresponding to the source code of these software.
  • the software package construction device 200 can record the time required to build the corresponding software package for each software during the full build process (i.e., the build process described in steps S201 to S202), which can be recorded in the historical build information.
  • the software package construction device 200 determines the software that needs to be rebuilt, it can estimate the time required to build the software packages for these software by searching the historical build information, and thus estimate the time required to build the software packages according to the source code of each software.
  • the software package construction device 200 can predict the end time of the incremental construction process, which is convenient for users to perceive and thus improve user experience.
  • the software package construction device 200 may first construct the source code to be constructed of the first software package according to the first description information of the first software package to obtain the first software package, and determine whether the sub-software package in the first software package that the second software package depends on has changed according to the historical construction information, so that after the sub-software package that the second software package depends on has changed, the source code to be constructed of the second software package is constructed according to the second description information to obtain the second software package.
  • the software package construction device 200 can determine the identifier of the second sub-package in the historical software package corresponding to the first software that the historical software package corresponding to the second software depends on based on the historical construction information, and the historical software package is obtained by constructing the constructed source code. Then, the software package construction device 200 can detect whether there is a first sub-package that matches the second sub-package among the multiple sub-packages included in the newly constructed first software package based on the identifier of the second sub-package. For example, the software package construction device 200 can match the identifier of the second sub-package with the identifiers of each sub-package in the first software package, and the identifier can be calculated by the MD5 algorithm or the hash algorithm, for example.
  • the software package construction device 200 can reconstruct the software package according to the source code to be constructed of the second software package.
  • the software package construction device 200 may not build a new software package for the second software, for example, the second description information of the second software may be deleted from the construction list. In this way, the invalid re-construction of the source code of some software can be further avoided, and the incremental construction efficiency of the software package can be improved.
  • the number of software included in the development project may be large, such as including more than 100 software, and accordingly, the number of software packages that need to be rebuilt determined by the software package building device 200 may also be large.
  • the software package building device 200 can further speed up the overall efficiency of incremental building by building multiple software packages concurrently. For example, the following two implementation examples are provided in this embodiment.
  • the software package construction device 200 can group multiple software that need to build a software package according to the dependency relationship between the software packages, and there is a dependency relationship between the software packages corresponding to different software in each group, and there is no dependency relationship between the software packages corresponding to software in different groups. In this way, the software package construction device 200 can execute the process of building a software package for the software in multiple groups in parallel, thereby improving the concurrency of building the software package and improving the efficiency of incremental construction.
  • the overall duration of the incremental construction performed by the software package construction device 200 may be the maximum time required to construct software packages for the software in each group.
  • the multiple software to be constructed can be divided into three groups, namely, group A, group B, and group C, and the total time required by the software package construction device 200 to construct software packages for each software in group A is 5 minutes, the total time required to construct software packages for each software in group B is 8 minutes, and the total time required to construct software packages for each software in group C is 6 minutes, then the overall duration of the incremental construction performed by the software package construction device 200 may be 8 minutes, which is the total time required to construct software packages for all software in group B.
  • the software package construction device 200 can determine the dependency relationship between different software in the construction list (specifically, the dependency relationship between the software packages corresponding to different software), and the dependency relationship includes direct dependency and indirect dependency.
  • direct dependency means that the software package corresponding to software A directly depends on at least one sub-package in the software package corresponding to software B, and software A and software B have a direct dependency relationship.
  • Indirect dependency means that the software package corresponding to software C directly depends on at least one sub-package in the software package corresponding to software D, and the software package corresponding to software D directly depends on at least one sub-package in the software package corresponding to software E, and software C and software E have an indirect dependency relationship.
  • a dependency chain is formed between the multiple software, for example, software a depends on software b, software b depends on software c, software c depends on software d, software d depends on software e, and software e depends on software f, then software a, b, c, d, e, f form a dependency chain, which can be expressed as "a ⁇ b ⁇ c ⁇ d ⁇ e ⁇ f".
  • the software package construction device 200 can determine the number of multiple software included in the dependency chain. And, when the number of multiple software constituting serial dependencies exceeds a threshold value (such as 5, etc.), the software package construction device 200 can truncate the dependency chain to obtain multiple dependency chains (or sub-dependency chains), where two adjacent dependency chains have the same software, and when the software package corresponding to the software in each dependency chain is updated, there is no impact on the construction of the software packages corresponding to the software in the remaining dependency chains.
  • a threshold value such as 5, etc.
  • the software package construction device 200 can classify the first software package and the second software package into dependency chain 1, and classify the second software package and the second software package into dependency chain 2. In this way, after the software package corresponding to the second software is reconstructed, when sub-package 1 in the second software package changes, the remaining software in dependency chain 2 can be reconstructed according to the dependency relationship between the software packages.
  • the software package construction device 200 can decide whether to build the remaining software according to whether the source code of the remaining software in dependency chain 1 changes. In this way, the software package construction device 200 can build the source code to be built indicated by each dependency chain in parallel according to the description information and historical construction information of each software, and the construction order of the software packages corresponding to multiple software in each dependency chain is determined according to the dependency relationship between the software packages, so as to further improve the efficiency of incremental construction of software packages.
  • the software package construction device 200 can truncate the dependency chain to obtain dependency chain 1 "a ⁇ b ⁇ c" and dependency chain 2 "c ⁇ d ⁇ e ⁇ f", and then the software package construction device 200 can construct software packages for the software in dependency chain 1 and dependency chain 2 in parallel, such as the software package construction device 200 can simultaneously construct software packages for software c in dependency chain 1 and software f in dependency chain 2, etc.
  • the software package building device 200 can also use other methods to build multiple software packages in parallel.
  • the above two examples can be combined to build software packages for multiple groups in parallel, and software packages can be built in parallel according to multiple dependency chains in each group.
  • the software package construction device 200 can determine the sub-software packages in other software packages that the software package corresponding to each software package depends on based on historical construction information, and break the dependency loop according to changes in the sub-software packages in other software packages.
  • the software whose sub-software packages have not changed can be used as the breaking point, so that the dependency loop can be converted into a dependency chain, and the process of building the software package is executed according to the dependency relationships between the software packages indicated by the dependency chain, so as to avoid the software package construction device 200 repeatedly building software packages for multiple software in the dependency loop.
  • the software package construction device 200 can determine software c as the breaking point of the dependency loop, and convert the dependency loop into a dependency chain, such as the dependency chain "c ⁇ d ⁇ e ⁇ f ⁇ a ⁇ b ⁇ c" shown in FIG4. In this way, the software package construction device 200 can construct software packages for each software in the dependency chain in turn according to the dependency relationship between the software packages, so as to avoid the software package construction device from repeatedly constructing software packages for multiple software in the dependency loop.
  • the software package construction device 200 can break each dependency ring based on the above method, and build a software package for each software package in the dependency chain obtained after the break; or, the software package construction device 200 can first execute a software package construction process for the software in the build list, and then break each dependency ring based on the above method, and build a software package for each software package in the dependency chain obtained after the break.
  • the software package construction device 200 can create a database 1, and the database 1 is used to store software packages corresponding to multiple software. Then, after constructing new software packages for the first software and the second software, the software package construction device 200 can use the new software package to replace the old software package stored in the database 1.
  • the software package construction device 200 can use the first software package obtained based on the source code to be constructed to replace the historical software package corresponding to the first software in the database 1, and use the second software package obtained based on the source code to be constructed to replace the historical software package corresponding to the second software in the database 1, and the remaining software packages in the database 1 can remain unchanged. In this way, the software packages stored in the database 1 are the latest versions of the software packages corresponding to the multiple software, thereby realizing the update of the software packages of the multiple software.
  • users may update the source code of multiple software in a development project multiple times in different time periods, so that the user can request the software package construction device 200 to incrementally build the software packages corresponding to the multiple software through the client 100 multiple times. Therefore, after the software package construction device 200 constructs the first software package and the second software package, it can store the relevant information of the multiple software after this incremental construction, for example, it can create a new database 3 to store the content identifiers of the source code to be built of the multiple software, the identifiers of each sub-software package in the software package corresponding to each software, the dependency relationship between the software packages corresponding to different software, and other information.
  • the software package construction device 200 can Based on the latest recorded information in the database 3 (as new historical construction information), software packages are constructed for the multiple software increments.
  • the specific implementation method is described in the above related parts and will not be repeated here.
  • the software package building device 200 can create a new database to record the incremental build, and the content identifiers of the source codes of the multiple software, the identifiers of the sub-packages in the software package corresponding to each software, the dependency relationship between the software packages corresponding to different software, and other information can all be recorded in the database.
  • the software packages corresponding to the first software and the second software can be repeatedly built according to the information recorded in the database, so as to analyze the root cause of the problem according to the built software packages.
  • step S201 and step S202 may be deleted, or the user may directly send the source code to be built of each software to the software package building device 200 through the client 100.
  • the software package construction device 200 first determines the description information of all the softwares that need to rebuild the software packages among the multiple softwares, and then preferentially builds the source code of the first software according to the description information and the dependency relationship between the software packages, so that in the entire incremental construction process, the source code of the first software does not need to be repeatedly built multiple times, such as being built only once, so as to avoid invalid construction of the source code of the first software being repeatedly built multiple times, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project.
  • the software package construction device 200 can determine the source code of all the softwares that need to be rebuilt, and the source code of each software can be built only once, the software package construction device 200 can estimate the total time required to build the software packages corresponding to the source code of these softwares, so as to estimate the end time of the incremental construction process, which is convenient for user perception, thereby improving the user experience.
  • FIG. 5 shows a schematic diagram of the structure of another software package construction system
  • FIG. 6 shows a schematic diagram of the flow of another software package construction method.
  • the above-mentioned software package construction device 200 may include multiple services, namely project management service 201, code acquisition service 202, task management service 203, resource scheduling service 204, and database creation service 205.
  • the software package construction device 200 also includes a storage service 206 and an execution module 207, and can be connected to a third-party hosting platform 300 externally.
  • the project management service 201 is used to manage the development project, specifically, it can manage the storage address of the source code of each software in the development project on the third-party hosting platform 300, the software package corresponding to each software, the architecture supported by the development project (such as X86 architecture or ARM architecture, etc.), the database that the development project relies on, etc.
  • the project management service 201 is also used to interact with the client 100.
  • the code acquisition service 202 is used to pull the source codes of multiple software in the development project from the third-party hosting platform 300 .
  • the task management service 203 is used to generate full build tasks or incremental build tasks and issue tasks.
  • the resource scheduling service 204 is used to perform corresponding resource scheduling according to the received task to execute the task.
  • the database creation service 205 is used to create a database to store information generated during the full build or incremental build process.
  • the storage service 206 is used to store data, such as the source code, software package, the above historical build information, etc.
  • data such as the source code, software package, the above historical build information, etc.
  • the storage service 206 may include multiple databases, and different databases may be used to store different types of data, such as database 1 for storing source code, database 2 for storing software packages, and database 3 for storing the above historical build information, etc.
  • the execution module 207 is used to execute the corresponding full build task or incremental build task under the scheduling of the resource scheduling service 204.
  • the software package construction method shown in FIG. 6 may specifically include:
  • the user can submit new source code of some software in the development project to the third-party hosting platform 300 through the client 100, and after completing the submission of the new source code, request the software package construction device 200 to construct software packages for the multiple software increments through the client 100.
  • the incremental build request may include an identifier of a development project, so as to use the identifier to indicate the development project for which the multiple software packages are to be incrementally built.
  • this embodiment focuses on the process of incrementally building multiple software in the development project by the software building device 200.
  • the user can also send a full build request to the project management service 201 through the client 100 to request the software package to be built.
  • the construction device 200 builds a software package for the multiple software in full.
  • the code acquisition service 202 may take a snapshot of the acquired candidate source codes to obtain content identifiers of the candidate source codes of various software.
  • the project management service 201 instructs the code acquisition service 202 to acquire content identifiers of candidate source codes of all software in the development project.
  • the code acquisition service 202 accesses the third-party hosting platform 300 , obtains the content identifiers of the candidate source codes of all the software in the development project through a snapshot, and feeds back the content identifiers of the candidate source codes of each software to the project management service 201 .
  • the project management service 201 generates an incremental build task, and sends the incremental build task and the content identifiers corresponding to the candidate source codes of the plurality of software to the task management service 203 .
  • the task management service 203 generates a build list according to the content identifiers corresponding to the received candidate source codes of the multiple software and the historical build information recorded in the storage service 206.
  • the build list includes description information of the multiple software packages that need to be built.
  • the description information may include, for example, a content identifier and a storage address of the candidate source code of the software.
  • the specific implementation process of the task management service 203 generating the construction list can refer to the relevant description of the process of determining the description information of the first software and the second software in the embodiment shown in FIG. 2 , which will not be described in detail here.
  • the task management service 203 instructs the code acquisition service 202 to acquire the to-be-built source codes of the multiple softwares indicated in the build list according to the build list.
  • the candidate source codes of the multiple software indicated in the build list are determined as the source codes that need to be built, hereinafter referred to as the source codes to be built, indicating that the software packages need to be rebuilt for the multiple software according to the source codes to be built. Therefore, the task management service 203 can instruct the code acquisition service 202 to acquire the source codes to be built required for rebuilding the software packages.
  • the code acquisition service 202 pulls the source codes to be built of the multiple software indicated in the build list from the third-party hosting platform 300 , and saves the pulled source codes to be built in the storage service 206 .
  • the task management service 203 generates a task including the build list, and sends the task to the resource scheduling service 204 .
  • the resource scheduling service 204 performs corresponding resource scheduling for the task, and sends the task including the building list to the execution module 207 according to the resource scheduling result.
  • the execution module 207 executes the task, builds the corresponding software package according to the source code to be built and the build list stored in the storage service 206 , and feeds back the execution result to the database creation service 205 .
  • the specific implementation process of the execution module 207 building software packages for multiple software according to the description information in the construction list can refer to the relevant description of the process of building software packages for the first software and the second software in the embodiment shown in Figure 2 above, which will not be repeated here.
  • the execution result fed back by the execution module 207 may include information such as content identification of the source code, generated software packages, and dependencies between different software packages.
  • the database creation service 205 creates a new database in the storage service 206, and uses the new database to record the execution result.
  • the database creation service 205 feeds back the execution result to the task management service 203, thereby building software packages for multiple software increments in the development project.
  • the software package construction system when the software package construction system is deployed on the user's terminal device, multiple services in the software package construction device 200 can perform an incremental construction process on the local terminal device.
  • the software package construction system may not include the client 100 shown in Figure 5 above, so that the project management service 201 can start the incremental construction process based on the operation performed by the user on the terminal device, and the code acquisition service 202 can obtain the candidate source code from the third-party hosting platform 300, or the user can provide the candidate source code to the terminal device.
  • the operations performed by the remaining services in the software package construction device 200 during the incremental construction process can be described in the relevant parts shown in Figure 6 above, and will not be repeated here.
  • FIG. 7 a schematic diagram of the structure of a software package construction device is shown.
  • the software package construction device 700 shown in Fig. 7 may correspond to the software package construction device 200 shown in Fig. 2 and Fig. 5 above.
  • the software package construction device 700 may include:
  • An acquisition module 701 is used to acquire historical build information of multiple software, where the historical build information includes relevant information of software packages built for the multiple software within a historical time period;
  • the determination module 702 is used to determine first description information of a first software among the multiple software, where the source code to be built of the first software is different from the built source code of the first software; and to determine second description information of a second software among the multiple software according to the historical build information, where a second software package corresponding to the second software depends on a first software package corresponding to the first software;
  • the construction module 703 is used to construct the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information, and the historical construction information to obtain the first software package and the second software package, and the source code to be constructed of the first software is constructed before the source code to be constructed of the second software.
  • the construction module 703 is used to:
  • the source code to be built of the second software is built according to the second description information to obtain a second software package.
  • the first software package includes a plurality of sub-software packages, and each of the plurality of sub-software packages is used to implement at least one function of the first software;
  • Building block 703 is used to:
  • the plurality of software further includes a third software, and a software package corresponding to the third software package depends on the second software package;
  • Building block 703 is used to:
  • first dependency chain indicating that the source code to be built of the first software is built before the source code to be built of the second software
  • the second dependency chain indicating that the source code to be built of the second software is built before the source code to be built of the third software
  • the source code to be built indicated in the first dependency chain and the source code to be built indicated in the second dependency chain are built in parallel.
  • a third software package corresponding to the third software depends on a third sub-package in the second software package, and a fourth sub-package in the second software package depends on the first software package.
  • the sub-package on which the software package corresponding to the third software depends is changed to the third sub-package.
  • the historical build information further includes a content identifier of the built source code of the first software
  • the determination module 702 is used to:
  • first description information of the first software among the multiple software is determined, and the source code to be constructed of the first software is also the candidate source code.
  • the first description information includes the content identifier of the first software and indication information of the storage location of the constructed source code of the first software.
  • the historical build information includes a dependency relationship between a historical software package corresponding to the second software and a historical software package corresponding to the first software, the historical software package corresponding to the second software being obtained by building the built source code of the second software, and the historical software package corresponding to the first software being obtained by building the built source code of the first software;
  • the determination module 702 is used to:
  • the historical build information detecting from the plurality of software that there is a dependency relationship between the historical software package corresponding to the second software and the historical software package corresponding to the first software;
  • the software package construction device 700 further includes:
  • the storage module 704 is used to store the content identifier of the source code to be built of the first software, the identifier of the sub-package included in the first software package, the content identifier of the source code to be built of the second software, the identifier of the sub-package included in the second software package, and the dependency relationship between the first software package and the second software package.
  • the software package construction device 700 further includes:
  • a replacement module 705, configured to replace the historical software package corresponding to the first software in the second database with the first software package, and to replace the historical software package corresponding to the second software in the second database with the second software package;
  • the second database includes historical software packages corresponding to multiple software respectively.
  • the historical software package corresponding to the first software is obtained by constructing the constructed source code of the first software
  • the historical software package corresponding to the second software is obtained by constructing the constructed source code of the second software.
  • the software package construction device 700 shown in FIG. 7 corresponds to the software package construction device 200 in the method embodiment shown in FIG. 2 , the specific implementation of the software package construction device 700 shown in FIG. 7 and its technical effects can be found in the relevant descriptions in the aforementioned embodiments and will not be described in detail here.
  • the software package construction device 800 shown in Fig. 8 may correspond to the software package construction device 200 shown in Fig. 2, and may be used to execute steps S203 to S205 in the embodiment shown in Fig. 2.
  • the software package construction device 800 may specifically include:
  • An acquisition module 801 is used to acquire historical build information of multiple software, where the historical build information includes relevant information of software packages built for the multiple software within a historical time period;
  • the determination module 802 is used to determine first description information of a first software among the multiple software, where the source code to be built of the first software is different from the built source code of the first software; and to determine second description information of a second software among the multiple software according to the historical build information, where a second software package corresponding to the second software depends on a first software package corresponding to the first software;
  • the first description information and the second description information are used to indicate the construction of a first software package corresponding to the first software and a second software package corresponding to the second software.
  • the software package construction device 800 shown in FIG. 8 corresponds to the software package construction device 200 in the method embodiment shown in FIG. 2 , the specific implementation of the software package construction device 800 shown in FIG. 8 and its technical effects can be found in the relevant descriptions in the aforementioned embodiments and will not be described in detail here.
  • the software package construction device involved in the software package construction process may be software configured on a computing device or a computing device cluster, and by running the software on the computing device or the computing device cluster, the computing device or the computing device cluster may implement the functions of the software package construction device 200.
  • the software package construction device 200 involved in the software package construction process is described in detail.
  • FIG9 shows a schematic diagram of the structure of a computing device, on which the software package construction device 200 can be deployed.
  • the computing device can be a computing device in a cloud environment (such as a server), or a computing device in an edge environment, or a terminal device, etc., which can be specifically used to implement the functions of the software package construction device 200 in the embodiment shown in FIG2 .
  • the computing device 900 includes a processor 910, a memory 920, a communication interface 930, and a bus 940.
  • the processor 910, the memory 920, and the communication interface 930 communicate with each other through the bus 940.
  • the bus 940 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • the bus may be divided into an address bus, a data bus, a control bus, and the like.
  • FIG9 is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.
  • the communication interface 930 is used to communicate with the outside, such as receiving configuration information and batch information provided by the user.
  • the processor 910 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits.
  • the processor 910 may also be an integrated circuit chip having signal processing capabilities.
  • the functions of each module in the software package construction device 200 may be completed by hardware integrated logic circuits in the processor 910 or instructions in software form.
  • the processor 910 may also be a general-purpose processor, a digital signal processor (DSP), a field programmable gate array (FPGA), or a processor that can process signals.
  • DSP digital signal processor
  • FPGA field programmable gate array
  • Gate array, FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
  • the general processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the memory 920, and the processor 910 reads the information in the memory 920, and completes part or all of the functions in the software package construction device 200 in combination with its hardware.
  • the memory 920 may include a volatile memory, such as a random access memory (RAM).
  • the memory 920 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a HDD, or a SSD.
  • the memory 920 stores executable codes, and the processor 910 executes the executable codes to execute the method executed by the aforementioned software package construction device 200 .
  • the software or program code required to execute the functions of the software package construction device 200 of FIG. 2 is stored in the memory 920, and the interaction between the software package construction device 200 and other devices is implemented through the communication interface 930.
  • the processor is used to execute the instructions in the memory 920 to implement the method executed by the above-mentioned software package construction device 200.
  • FIG10 is a schematic diagram of the structure of a computing device cluster.
  • the computing device cluster 10 shown in FIG10 includes multiple computing devices, and the software package construction device 200 can be distributedly deployed on multiple computing devices in the computing device cluster 10.
  • the computing device cluster 10 includes multiple computing devices 1000, each computing device 1000 includes a memory 1020, a processor 1010, a communication interface 1030 and a bus 1040, wherein the memory 1020, the processor 1010, and the communication interface 1030 are connected to each other through the bus 1040.
  • the processor 1010 may be a CPU, a GPU, an ASIC or one or more integrated circuits.
  • the processor 1010 may also be an integrated circuit chip having signal processing capabilities. In the implementation process, some functions of the software package construction device 200 may be completed by the hardware integrated logic circuit or software instructions in the processor 1010.
  • the processor 1010 may also be a DSP, an FPGA, a general processor, other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and may implement or execute some of the methods, steps and logic block diagrams disclosed in the embodiments of the present application.
  • the general processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as a hardware decoding processor for execution, or may be executed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the memory 1020.
  • the processor 1010 reads the information in the memory 1020 and can complete part of the functions of the software package construction device 200 in combination with its hardware.
  • the memory 1020 may include ROM, RAM, static storage device, dynamic storage device, hard disk (e.g., SSD, HDD), etc.
  • the memory 1020 may store program codes, for example, part of the program codes for implementing the software package construction device 200, etc.
  • the processor 1010 executes part of the method executed by the software package construction device 200 based on the communication interface 1030, such as one part of the computing devices 1000 may be used to execute the method described in steps S203 to S205, and another part of the computing devices 1000 may be used to execute the method described in step S206.
  • the memory 1020 may also store data, for example: intermediate data or result data generated by the processor 1010 during the execution process, for example, the above-mentioned historical construction information, the first software package, the second software package, etc.
  • the communication interface 1030 in each computing device 1000 is used for communicating with the outside, such as interacting with other computing devices 1000 .
  • the bus 1040 may be a peripheral component interconnect standard bus or an extended industry standard architecture bus, etc.
  • the bus 1040 in each computing device 1000 in FIG. 10 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
  • the plurality of computing devices 1000 establish communication paths through a communication network to implement the functions of the software package construction apparatus 200.
  • Any computing device may be a computing device in a cloud environment (eg, a server), or a computing device in an edge environment, or a terminal device.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media.
  • the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
  • the computer-readable storage medium includes instructions, and the instructions instruct a computing device to execute the software package building method.
  • the embodiment of the present application also provides a computer program product.
  • the computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • wired e.g., coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless e.g., infrared, wireless, microwave, etc.
  • the computer program product may be a software installation package, which may be downloaded and executed on a computing device when any of the aforementioned software package construction methods is required.
  • the above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination.
  • the above embodiments can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode.
  • the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets.
  • the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium.
  • the semiconductor medium can be a solid-state hard disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

A software package building method and apparatus, and a related device, relating to the technical field of computers. The method comprises: acquiring historical build information of multiple pieces of software; determining first description information of first software among the multiple pieces of software; determining second description information of second software among the multiple pieces of software according to the historical build information, wherein a source code of the first software changes, and a second software package corresponding to the second software depends on a first software package corresponding to the first software; and respectively building source codes to be built of respective software according to the description information and the historical build information of respective software to obtain the first software package and the second software package, wherein the source code to be built of the first software is built preferentially. In this way, in the whole incremental building process, description information of all software, requiring re-building of software packages, among the multiple pieces of software can be determined firstly, so that repeated invalid building of the source code of the first software can be avoided, thereby improving the incremental building efficiency of software packages.

Description

软件包构建方法、装置及相关设备Software package construction method, device and related equipment

本申请要求于2023年6月9日提交国家知识产权局、申请号为202310684680.2、申请名称为“一种软件包构建方法”的中国专利申请的优先权,并要求于2023年8月2日提交国家知识产权局、申请号为202310970621.1、申请名称为“软件包构建方法、装置及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 9, 2023, with application number 202310684680.2 and application name “A method for building a software package”, and claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 2, 2023, with application number 202310970621.1 and application name “Software package building method, device and related equipment”, all contents of which are incorporated by reference in this application.

技术领域Technical Field

本申请涉及计算机技术领域,尤其涉及一种软件包构建方法、装置及相关设备。The present application relates to the field of computer technology, and in particular to a software package construction method, apparatus and related equipment.

背景技术Background Art

构建软件包,是指将软件的源代码转化成可执行的软件包的过程,其中,所得到的软件包,是指具有特定功能并且用来完成特定任务的一组或者多组程序。示例性地,软件包,例如可以包括一个或者多个红帽包管理器(red hat package manager,RPM),并且,每个RPM用于实现软件中的至少一个功能。在进行软件开发的过程中,开发人员可以利用构建工具构建出开发项目中的每个软件所对应的软件包。Building a software package refers to the process of converting the source code of the software into an executable software package, wherein the resulting software package refers to one or more groups of programs with specific functions and used to complete specific tasks. Exemplarily, a software package may include one or more Red Hat Package Managers (RPMs), and each RPM is used to implement at least one function in the software. In the process of software development, developers can use build tools to build software packages corresponding to each software in the development project.

实际应用场景中,开发项目中的部分软件的源代码可能会发生变化,如开发人员对该部分软件的代码逻辑做出优化等,此时,用户可以利用构建工具采用增量构建的方式,构建出该部分软件所对应的新的软件包。由于开发项目中的多个软件所对应的软件包之间通常存在依赖关系,如软件包a的构建依赖于软件包b先完成构建等,因此,构建工具每次在重新构建一个软件对应的软件包时,也会将依赖该软件包的其它所有软件包重新进行构建,这会导致构建工具执行较多次的无效重复构建软件包的过程,从而影响开发项目的整体开发效率。In actual application scenarios, the source code of some software in the development project may change, such as when the developer optimizes the code logic of this part of the software. At this time, the user can use the build tool to adopt the incremental build method to build a new software package corresponding to this part of the software. Since there are usually dependencies between the software packages corresponding to multiple software in the development project, such as the construction of software package a depends on the completion of the construction of software package b first, each time the build tool rebuilds the software package corresponding to a software, it will also rebuild all other software packages that depend on this software package, which will cause the build tool to execute a large number of invalid repeated software package construction processes, thereby affecting the overall development efficiency of the development project.

举例来说,假设开发项目中包括软件A、B、C以及D,基于这4个软件所构建出的软件包依次为软件包a、软件包b、软件包c以及软件包d,并且,软件包a的构建,依赖于软件包b、c、d先完成构建。当软件B、C、D的源代码发生变化时,构建工具可以根据软件B的源代码重新构建出新的软件包b,由于软件包a依赖于软件包b,因此,构建工具在重新构建出软件包b后,也会将依赖该软件包b的软件包a进行重新构建。然后,构建工具再根据软件C的源代码重新构建出新的软件包c,由于软件包a也依赖于软件包c,因此,构建工具会在构建出新的软件包c后,会再次重新构建软件包a。以此类推,构建工具在构建出新的软件包b、c、d的过程中,会重复执行三次构建软件包a的过程。其中,只有最后一次构建得到的软件包a有效,而之前两次所构建出的软件包a的过程属于无效的重复构建过程。For example, suppose that the development project includes software A, B, C, and D. The software packages constructed based on these four software are software package a, software package b, software package c, and software package d, respectively. Moreover, the construction of software package a depends on the completion of the construction of software packages b, c, and d first. When the source code of software B, C, and D changes, the construction tool can rebuild a new software package b based on the source code of software B. Since software package a depends on software package b, after rebuilding software package b, the construction tool will also rebuild software package a that depends on software package b. Then, the construction tool rebuilds a new software package c based on the source code of software C. Since software package a also depends on software package c, the construction tool will rebuild software package a again after building the new software package c. By analogy, the construction tool will repeat the process of building software package a three times in the process of building new software packages b, c, and d. Among them, only the software package a obtained by the last construction is valid, and the processes of building software package a twice before are invalid repeated construction processes.

因此,目前亟需一种尽可能避免无效重复构建软件包的方法。Therefore, there is an urgent need for a method to avoid invalid repeated construction of software packages as much as possible.

发明内容Summary of the invention

本申请提供了一种软件包构建方法,以尽可能避免执行无效重复构建软件包的过程,从而提高开发项目的整体开发效率。此外,本申请还提供了对应的软件包构建装置、计算设备、计算机可读存储介质以及计算机程序产品。The present application provides a software package construction method to avoid executing the process of invalid and repeated software package construction as much as possible, thereby improving the overall development efficiency of the development project. In addition, the present application also provides a corresponding software package construction device, a computing device, a computer-readable storage medium, and a computer program product.

第一方面,本申请提供一种软件包构建方法,该方法可以由相应的软件包构建装置执行,具体地,软件包构建装置获取多个软件的历史构建信息,该历史构建信息包括历史时间段内为多个软件所构建的软件包的相关信息,如可以是上一次对开发项目中的多个软件增量构建软件包的过程中为每个软件所构建出的软件包中每个子软件包的标识、不同软件包之间的依赖关系等信息;并且,软件包构建装置确定该多个软件中的第一软件的第一描述信息(如第一软件的标识、或者第一软件的源代码的存储位置等信息),该第一软件的待构建源代码与第一软件的已构建源代码存在差异,该待构建源代码是指当前增量构建过程中需要被重新构建软件包的源代码,该已构建源代码是指在历史时间段内构建出软件包所使用的源代码;然后,软件包构建装置根据获取的历史构建信息,确定多个软件中的第二软件的第二描述信息(如第二软件的标识、或者第二软件的源代码的存储位置等信息),其中,第二软件对应的第二软件包依赖第一软件对应的第一软件包;最后,软件包构建装置根据该第一描述信息、第二描述信息、以及历史构建信息,对第一软件的待构建源代码以及第二软件的待构建源代码分别进行构建,得到第一软件 包与第二软件包,该第一软件的待构建源代码先于第二软件的待构建源代码进行构建。其中,软件包构建装置可以根据第一描述信息以及第二描述信息从第三方托管平台中获取第一软件以及第二软件的待构建源代码,或者可以是在确定第一描述信息以及第二描述信息之前获取全部软件的待构建源代码,然后再从中筛选出第一软件以及第二软件的待构建源代码。In a first aspect, the present application provides a software package construction method, which can be executed by a corresponding software package construction device. Specifically, the software package construction device obtains historical construction information of multiple software, and the historical construction information includes relevant information of software packages constructed for the multiple software within a historical time period, such as the identification of each sub-software package in the software package constructed for each software in the process of incrementally constructing software packages for multiple software in a development project last time, the dependency relationship between different software packages, and other information; and the software package construction device determines first description information of a first software among the multiple software (such as the identification of the first software, or the storage location of the source code of the first software, etc.), the source code to be constructed of the first software and the information of the constructed source code of the first software There are differences in the source code to be built, the source code to be built refers to the source code of the software package that needs to be rebuilt in the current incremental build process, and the constructed source code refers to the source code used to build the software package in the historical time period; then, the software package building device determines the second description information of the second software among the multiple software (such as the identifier of the second software, or the storage location of the source code of the second software, etc.) according to the acquired historical build information, wherein the second software package corresponding to the second software depends on the first software package corresponding to the first software; finally, the software package building device builds the source code to be built of the first software and the source code to be built of the second software respectively according to the first description information, the second description information, and the historical build information, and obtains the first software package. The software package construction device may obtain the source code to be built of the first software and the second software from a third-party hosting platform according to the first description information and the second description information, or may obtain the source code to be built of all software before determining the first description information and the second description information, and then filter out the source code to be built of the first software and the second software.

由于在对多个软件进行增量构建的过程中,先确定该多个软件中需要重新构建软件包的全部软件(也即第一软件以及第二软件)的描述信息,并根据该描述信息以及历史构建信息优先对被依赖的第一软件包所对应的第一软件的源代码进行构建,这使得在整个增量构建过程中,第一软件的源代码可以仅被构建一次,以此可以避免第一软件的源代码被重复多次的无效构建,从而可以提高软件包的增量构建效率,提高开发项目的整体开发效率。并且,由于根据第一描述信息以及第二描述信息能够确定哪些软件需要重新构建软件包,并且,每个软件的源代码可以仅被构建一次,因此,可以预估出构建这些软件的源代码对应的软件包所需的耗时,从而可以预期增量构建过程的结束时间,提高用户体验。Since, in the process of incrementally building multiple software, the description information of all software (i.e., the first software and the second software) that need to rebuild the software package is first determined, and the source code of the first software corresponding to the first software package that is relied on is preferentially built according to the description information and the historical construction information, the source code of the first software can be built only once during the entire incremental building process, thereby avoiding invalid construction of the source code of the first software being repeated many times, thereby improving the incremental building efficiency of the software package and improving the overall development efficiency of the development project. In addition, since it is possible to determine which software needs to rebuild the software package according to the first description information and the second description information, and the source code of each software can be built only once, the time required to build the software packages corresponding to the source codes of these software can be estimated, thereby predicting the end time of the incremental building process and improving the user experience.

在一种可能的实施方式中,软件包构建装置在对第一软件的待构建源代码以及第二软件的待构建源代码分别进行构建时,具体可以是先根据第一描述信息,对第一软件的待构建源代码进行构建,得到第一软件包,并根据历史构建信息,确定第二软件包所依赖的第一软件包中的第一子软件包发生变化,从而软件包构建装置再根据第二描述信息,对第二软件的待构建源代码进行构建,得到第二软件包。可选地,如果第二软件包所依赖的第一软件包中的第一子软件包没有发生变化,则软件包构建装置可以无需为第二软件重新构建软件包。由于在确定第二软件包所依赖的第一软件包中的子软件包发生变化的情况下,才为第二软件重新构建软件包,这可以避免第二软件包被重复多次的无效构建,从而可以进一步提高软件包的增量构建效率,提高开发项目的整体开发效率。In a possible implementation, when the software package construction device constructs the source code to be constructed of the first software and the source code to be constructed of the second software, the software package construction device may first construct the source code to be constructed of the first software according to the first description information to obtain the first software package, and determine that the first sub-package in the first software package on which the second software package depends has changed according to the historical construction information, so that the software package construction device then constructs the source code to be constructed of the second software according to the second description information to obtain the second software package. Optionally, if the first sub-package in the first software package on which the second software package depends has not changed, the software package construction device may not need to rebuild the software package for the second software. Since the software package is rebuilt for the second software only when it is determined that the sub-package in the first software package on which the second software package depends has changed, this can avoid the invalid construction of the second software package being repeated multiple times, thereby further improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project.

在一种可能的实施方式中,第一软件包可以包括多个子软件包,每个子软件包例如可以是RPM等,并且,多个子软件包中的每个子软件包用于实现第一软件的至少一个功能,如图像裁剪功能、图像缩放功能等;这样,软件包构建装置在确定第二软件包所依赖的第一软件包中的子软件包发生变化时,具体可以是根据历史构建信息,确定第二软件对应的历史软件包依赖的第二子软件包的标识,其中,第二软件对应的历史软件包是通过对第二软件的已构建源代码进行构建得到的,从而软件包构建装置可以根据第二子软件包的标识,检测第一软件包中不存在与第二子软件包相匹配的第一子软件包,这表征第二软件对应的软件包所依赖的子软件包相较于之前发生变化,也即确定第二软件包所依赖的第一软件包中的子软件包发生变化。如此,软件包构建装置可以通过比对第二软件对应的软件包所依赖的子软件包是否发生变化,来确定是否为第二软件重新构建软件包,以便在其依赖的子软件包没有变化的情况下,可以避免为该第二软件无效构建软件包。In a possible implementation, the first software package may include multiple sub-packages, each of which may be, for example, RPM, etc., and each of the multiple sub-packages is used to implement at least one function of the first software, such as an image cropping function, an image zooming function, etc.; in this way, when the software package construction device determines that the sub-package in the first software package on which the second software package depends has changed, it may specifically determine the identifier of the second sub-package on which the historical software package corresponding to the second software depends based on the historical construction information, wherein the historical software package corresponding to the second software is obtained by building the constructed source code of the second software, so that the software package construction device may detect that there is no first sub-package matching the second sub-package in the first software package according to the identifier of the second sub-package, which indicates that the sub-package on which the software package corresponding to the second software depends has changed compared to before, that is, it is determined that the sub-package in the first software package on which the second software package depends has changed. In this way, the software package construction device can determine whether to rebuild the software package for the second software by comparing whether the sub-package on which the software package corresponding to the second software depends has changed, so as to avoid invalidly building the software package for the second software when the sub-package on which it depends has not changed.

在一种可能的实施方式中,增量构建过程中的多个软件除了包括第一软件、第二软件之外,还可以包括第三软件,并且,第三软件对应的软件包依赖第二软件包;这样,软件包构建装置在对第一软件的待构建源代码以及第二软件的待构建源代码分别进行构建时,具体可以是先根据历史构建信息,确定第一软件包、第二软件包以及第三软件包之间的依赖关系,并根据该第一软件包、第二软件包以及第三软件包之间的依赖关系,生成第一依赖链以及第二依赖链,其中,第一依赖链指示第一软件的待构建源代码先于第二软件的待构建源代码进行构建,而第二依赖链指示第二软件的待构建源代码先于第三软件的待构建源代码进行构建;从而,软件包构建装置可以根据第一描述信息、第二描述信息、第三软件的第三描述信息,并行构建第一依赖链中指示的待构建源代码以及第二依赖链中指示的待构建源代码。如此,软件包构建装置可以同时为多个依赖链中的软件构建软件包,这可以有效提高为多个软件构建软件包的效率,从而可以进一步提高开发项目的整体开发效率。实际应用时,软件包构建装置可以生成更多数量的依赖链,从而实现更高的并发度。In a possible implementation, the multiple software in the incremental construction process may include a third software in addition to the first software and the second software, and the software package corresponding to the third software depends on the second software package; in this way, when the software package construction device constructs the source code to be constructed of the first software and the source code to be constructed of the second software, it can be determined based on the historical construction information, and the dependency relationship between the first software package, the second software package and the third software package is generated according to the dependency relationship between the first software package, the second software package and the third software package. The first dependency chain indicates that the source code to be constructed of the first software is constructed before the source code to be constructed of the second software, and the second dependency chain indicates that the source code to be constructed of the second software is constructed before the source code to be constructed of the third software; thus, the software package construction device can construct the source code to be constructed indicated in the first dependency chain and the source code to be constructed indicated in the second dependency chain in parallel according to the first description information, the second description information, and the third description information of the third software. In this way, the software package construction device can simultaneously construct software packages for software in multiple dependency chains, which can effectively improve the efficiency of constructing software packages for multiple software, thereby further improving the overall development efficiency of the development project. In actual application, the software package construction device can generate a larger number of dependency chains to achieve a higher degree of concurrency.

在一种可能的实施方式中,第三软件对应的第三软件包依赖第二软件包中的第三子软件包,第二软件包中的第四子软件包依赖第一软件包,则,基于第二软件的待构建源代码构建得到第二软件包后,第三软件对应的软件包所依赖的子软件包变更为第三子软件包。如此,软件包构建装置为第一软件重新构建软件包,只会影响第二软件包中的第四子软件包,而不影响被第三软件包依赖的第三子软件包,从而可以不影响软件包构建装置为第三软件构建软件包的过程。这样,软件包构建装置并发为多个依赖链中的软件构建软件包的过程可以相互独立,在提高增量构建效率的同时,尽可能避免部分软件被重复多次 的无效构建。In one possible implementation, the third software package corresponding to the third software depends on the third sub-package in the second software package, and the fourth sub-package in the second software package depends on the first software package. Then, after the second software package is constructed based on the source code to be constructed of the second software, the sub-package on which the software package corresponding to the third software depends is changed to the third sub-package. In this way, when the software package construction device rebuilds the software package for the first software, it will only affect the fourth sub-package in the second software package, but will not affect the third sub-package on which the third software package depends, thereby not affecting the process of the software package construction device building the software package for the third software. In this way, the process of the software package construction device concurrently building software packages for software in multiple dependency chains can be independent of each other, while improving the efficiency of incremental construction and avoiding as much as possible the duplication of some software. Invalid build of .

在一种可能的实施方式中,历史构建信息还包括第一软件的已构建源代码的内容标识,则,软件包构建装置在确定多个软件中的第一软件的第一描述信息时,具体可以是先获取第一软件的候选源代码的内容标识,如可以通过对代码仓库中的信息进行快照的方式获取该内容标识等,示例性地,该内容标识例如可以是该候选源代码被用户提交时所被分配到的标识、版本号或者通过摘要算法所计算出的信息等;从而,当第一软件的候选源代码的内容标识与第一软件的已构建源代码的内容标识不一致时,软件包构建装置确定多个软件中的第一软件的第一描述信息,并将该候选源代码作为待构建源代码,即软件包构建装置会根据该候选源代码(也即待构建源代码)为第一软件重新构建软件包。其中,第一描述信息包括第一软件的内容标识、针对第一软件的已构建源代码的存储位置的指示信息。如此,软件包构建装置可以通过比较新、旧源代码分别对应的内容标识,确定源代码发生变化的软件,从而通过进一步确定该软件的描述信息来为该软件重新构建软件包。In a possible implementation, the historical construction information also includes the content identifier of the constructed source code of the first software. Then, when the software package construction device determines the first description information of the first software among the multiple software, it can specifically obtain the content identifier of the candidate source code of the first software first, such as by taking a snapshot of the information in the code repository. For example, the content identifier can be the identifier assigned to the candidate source code when it is submitted by the user, the version number, or the information calculated by the digest algorithm. Thus, when the content identifier of the candidate source code of the first software is inconsistent with the content identifier of the constructed source code of the first software, the software package construction device determines the first description information of the first software among the multiple software, and uses the candidate source code as the source code to be constructed, that is, the software package construction device will rebuild the software package for the first software according to the candidate source code (that is, the source code to be constructed). The first description information includes the content identifier of the first software and the indication information of the storage location of the constructed source code of the first software. In this way, the software package construction device can determine the software whose source code has changed by comparing the content identifiers corresponding to the new and old source codes, and thus rebuild the software package for the software by further determining the description information of the software.

在一种可能的实施方式中,历史构建信息包括第二软件对应的历史软件包与第一软件对应的历史软件包之间的依赖关系,其中,第二软件对应的历史软件包通过对第二软件的已构建源代码进行构建得到,而第一软件对应的历史软件包通过对第一软件的已构建源代码进行构建得到;这样,软件包构建装置在确定多个软件中的第二软件的第二描述信息时,具体可以是先根据历史构建信息,从多个软件中检测到存在第二软件对应的历史软件包与第一软件对应的历史软件包之间存在依赖关系,从而软件包构建装置可以确定第二软件的第二描述信息,该第二描述信息包括第二软件的内容标识、针对第二软件的已构建源代码的存储位置的指示信息。如此,软件包构建装置可以根据该多个软件在历史时间段内构建软件包时所记录的不同软件对应的历史软件包之间的依赖关系,确定多个软件中存在哪些软件对应的软件包会依赖第一软件对应软件包,并进一步确定该部分软件的描述信息,以便根据该描述信息确定源代码未发生变化但是仍需要重新构建软件包的软件。In a possible implementation, the historical build information includes a dependency relationship between a historical software package corresponding to the second software and a historical software package corresponding to the first software, wherein the historical software package corresponding to the second software is obtained by building the constructed source code of the second software, and the historical software package corresponding to the first software is obtained by building the constructed source code of the first software; thus, when the software package building device determines the second description information of the second software among the multiple software, it can specifically be firstly detected from the multiple software according to the historical build information that there is a dependency relationship between the historical software package corresponding to the second software and the historical software package corresponding to the first software, so that the software package building device can determine the second description information of the second software, and the second description information includes the content identifier of the second software and the indication information of the storage location of the constructed source code of the second software. In this way, the software package building device can determine which software packages among the multiple software will depend on the software package corresponding to the first software according to the dependency relationship between the historical software packages corresponding to different software recorded when the multiple software packages are built within the historical time period, and further determine the description information of the part of the software, so as to determine the software whose source code has not changed but still needs to be rebuilt according to the description information.

在一种可能的实施方式中,软件包构建装置还可以存储第一软件的待构建源代码的内容标识、第一软件包包括的子软件包的标识、第二软件的待构建源代码的内容标识、第二软件包包括的子软件包的标识、第一软件包与第二软件包之间的依赖关系。比如,软件包构建装置可以创建新的数据库来记录这些信息等。如此,当下一次需要为该多个软件增量构建软件包时,软件包构建装置可以根据所存储的信息,在尽可能避免出现软件被重复多次无效构建的情况下,实现为该多个软件增量构建软件包,以此提高下一次增量构建软件包的效率。并且,后续在对该多个软件进行问题追溯时,可以根据该数据库中记录的信息重复构建第一软件以及第二软件的分别对应的软件包,以便根据构建出的软件包分析问题根源。In a possible implementation, the software package construction device may also store the content identifier of the source code to be constructed of the first software, the identifier of the sub-package included in the first software package, the content identifier of the source code to be constructed of the second software, the identifier of the sub-package included in the second software package, and the dependency relationship between the first software package and the second software package. For example, the software package construction device may create a new database to record this information, etc. In this way, when it is necessary to incrementally construct software packages for the multiple software packages next time, the software package construction device may incrementally construct software packages for the multiple software packages based on the stored information, while avoiding the situation where the software is repeatedly and invalidly constructed as much as possible, so as to improve the efficiency of the next incremental construction of the software package. Moreover, when tracing problems for the multiple software packages later, the software packages corresponding to the first software and the second software may be repeatedly constructed based on the information recorded in the database, so as to analyze the root cause of the problem based on the constructed software packages.

在一种可能的实施方式中,软件包构建装置还可以利用第一软件包替换第二数据库中第一软件对应的历史软件包,利用第二软件包替换第二数据库中第二软件对应的历史软件包;其中,第二数据库包括多个软件分别对应的历史软件包,第一软件对应的历史软件包通过对第一软件的已构建源代码进行构建得到,第二软件对应的历史软件包通过对第二软件的已构建源代码进行构建得到。如此,第二数据库中所存储的软件包,为多个软件对应的最新版本的软件包,以此实现对多个软件的软件包的更新。In a possible implementation, the software package construction device can also use the first software package to replace the historical software package corresponding to the first software in the second database, and use the second software package to replace the historical software package corresponding to the second software in the second database; wherein the second database includes historical software packages corresponding to multiple software, the historical software package corresponding to the first software is obtained by constructing the constructed source code of the first software, and the historical software package corresponding to the second software is obtained by constructing the constructed source code of the second software. In this way, the software packages stored in the second database are the latest versions of the software packages corresponding to the multiple software, thereby realizing the update of the software packages of the multiple software.

第二方面,本申请提供了一种软件包构建方法,该方法可以由相应的软件包构建装置执行,具体地,软件包构建装置获取多个软件的历史构建信息,该历史构建信息包括历史时间段内为多个软件所构建的软件包的相关信息,如可以是上一次对开发项目中的多个软件增量构建软件包的过程中为每个软件构建出的软件包中每个子软件包的标识、不同软件包之间的依赖关系等信息;并且,软件包构建装置确定该多个软件中的第一软件的第一描述信息(如第一软件的标识、或者第一软件的源代码的存储位置等信息),该第一软件的待构建源代码与第一软件的已构建源代码存在差异,该待构建源代码是指当前增量构建过程中需要被重新构建软件包的源代码,该已构建源代码是指在历史时间段内构建出软件包所使用的源代码;其中,所确定的第一描述信息以及第二描述信息,用于指示对第一软件对应的第一软件包以及第二软件对应的第二软件包进行构建。如此,在对多个软件进行增量构建的过程中,软件包构建装置可以确定该多个软件中需要重新构建软件包的全部软件(也即第一软件以及第二软件)的描述信息,从而后续在根据这些软件的描述信息构建相应的软件包时,第一软件的源代码可以仅被构建一次,以此可以避免第一软件的源代码被重复多次的无效构建,从而可以提高软件包的增量构建效率,提高开发项目的整体开发效率。并且,由于根据第一描述信息以及第二描述信息能够确定哪些软件需要重新构建软件包,每 个软件的源代码可以仅被构建一次,因此,可以预估出构建这些软件的源代码对应的软件包所需的耗时,从而可以预期增量构建过程的结束时间,提高用户体验。In a second aspect, the present application provides a software package construction method, which can be executed by a corresponding software package construction device. Specifically, the software package construction device obtains historical construction information of multiple software, and the historical construction information includes relevant information of the software packages constructed for the multiple software within a historical time period, such as the identification of each sub-software package in the software package constructed for each software in the process of incrementally constructing software packages for multiple software in a development project last time, the dependency relationship between different software packages, and other information; and the software package construction device determines first description information of a first software among the multiple software (such as the identification of the first software, or the storage location of the source code of the first software, etc.), there is a difference between the source code to be constructed of the first software and the constructed source code of the first software, the source code to be constructed refers to the source code of the software package that needs to be reconstructed in the current incremental construction process, and the constructed source code refers to the source code used to construct the software package within the historical time period; wherein the determined first description information and second description information are used to indicate the construction of a first software package corresponding to the first software and a second software package corresponding to the second software. In this way, during the incremental construction of multiple software, the software package construction device can determine the description information of all the software (i.e., the first software and the second software) that need to rebuild the software package among the multiple software, so that when the corresponding software package is subsequently built according to the description information of these software, the source code of the first software can be built only once, thereby avoiding the invalid construction of the source code of the first software being repeated multiple times, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project. In addition, since it is possible to determine which software needs to rebuild the software package according to the first description information and the second description information, each The source code of each software can be built only once, so the time required to build the software packages corresponding to the source code of these software can be estimated, so that the end time of the incremental build process can be anticipated, improving the user experience.

第三方面,本申请提供一种软件包构建装置,所述软件包构建装置包括用于执行第一方面或第一方面任一种可能实现方式中的软件包构建方法的各个模块。In a third aspect, the present application provides a software package construction device, wherein the software package construction device includes modules for executing the software package construction method in the first aspect or any possible implementation of the first aspect.

第四方面,本申请提供一种软件包构建装置,所述软件包构建装置包括用于执行第一方面或第二方面所述的软件包构建方法的各个模块。In a fourth aspect, the present application provides a software package construction device, wherein the software package construction device includes modules for executing the software package construction method described in the first aspect or the second aspect.

第五方面,本申请提供一种计算设备,所述计算设备包括处理器、存储器。所述处理器、所述存储器进行相互的通信。所述处理器用于执行存储器中存储的指令,以使得计算设备执行如第一方面或第一方面的任一种实现方式中的软件包构建方法,或者执行如第二方面中的软件包构建方法。需要说明的是,该存储器可以集成于处理器中,也可以是独立于处理器之外。计算设备还可以包括总线。其中,处理器通过总线连接存储器。其中,存储器可以包括可读存储器以及随机存取存储器。In a fifth aspect, the present application provides a computing device, the computing device comprising a processor and a memory. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory, so that the computing device executes the software package construction method in the first aspect or any one of the implementations of the first aspect, or executes the software package construction method in the second aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include a readable memory and a random access memory.

第六方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算设备上运行时,使得计算设备执行上述第一方面或第一方面的任一种实现方式所述软件包构建方法的操作步骤,或者执行如第二方面中的软件包构建方法的操作步骤。In a sixth aspect, the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, which, when executed on a computing device, causes the computing device to execute the operating steps of the software package construction method described in the first aspect or any one of the implementations of the first aspect, or to execute the operating steps of the software package construction method as in the second aspect.

第七方面,本申请提供了一种包含指令的计算机程序产品,当其在计算设备上运行时,使得计算设备执行上述第一方面或第一方面的任一种实现方式所述软件包构建方法的操作步骤,或者执行如第二方面中的软件包构建方法的操作步骤。In a seventh aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device, causes the computing device to execute the operating steps of the software package construction method described in the first aspect or any one of the implementations of the first aspect, or to execute the operating steps of the software package construction method as in the second aspect.

本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请提供的一示例性软件包构建系统的结构示意图;FIG1 is a schematic diagram of the structure of an exemplary software package construction system provided by the present application;

图2为本申请提供的一种软件包构建方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a method for constructing a software package provided by the present application;

图3为软件构建装置200记录的历史构建信息的示意图;FIG3 is a schematic diagram of historical construction information recorded by the software construction device 200;

图4为对依赖环进行破环并得到依赖链的示意图;FIG4 is a schematic diagram of breaking a dependency loop and obtaining a dependency chain;

图5为本申请提供的另一示例性软件包构建系统的结构示意图;FIG5 is a schematic diagram of the structure of another exemplary software package construction system provided by the present application;

图6为本申请提供的另一种软件包构建方法的流程示意图;FIG6 is a flow chart of another method for constructing a software package provided by the present application;

图7为本申请提供的一种软件包构建装置的结构示意图;FIG7 is a schematic diagram of the structure of a software package construction device provided by the present application;

图8为本申请提供的另一种软件包构建装置的结构示意图;FIG8 is a schematic diagram of the structure of another software package building device provided by the present application;

图9为本申请提供的一种计算设备的硬件结构示意图;FIG9 is a schematic diagram of the hardware structure of a computing device provided by the present application;

图10为本申请提供的一种计算设备集群的硬件结构示意图。FIG10 is a schematic diagram of the hardware structure of a computing device cluster provided in the present application.

具体实施方式DETAILED DESCRIPTION

为了尽可能避免执行无效重复构建软件包的过程,本申请提供了一种软件包构建方法,通过确定该多个软件中需要重新构建软件包的全部软件,并优先对被依赖的第一软件包所对应的第一软件的源代码进行构建,减少第一软件的源代码被构建的次数,如第一软件的源代码仅被构建一次,以此可以避免第一软件的源代码被重复多次的无效构建,从而可以提高软件包的增量构建效率,提高开发项目的整体开发效率。In order to avoid executing the process of invalidly and repeatedly building a software package as much as possible, the present application provides a software package building method, by determining all the software that needs to rebuild the software package among the multiple software, and preferentially building the source code of the first software corresponding to the dependent first software package, thereby reducing the number of times the source code of the first software is built, such as the source code of the first software is only built once, thereby avoiding invalid construction of the source code of the first software repeatedly, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project.

为便于理解本申请的技术方案,下面先对本申请中涉及的相关技术术语进行解释说明。To facilitate understanding of the technical solution of the present application, the relevant technical terms involved in the present application are explained below.

源代码,也可称之为源程序,是指未编译的、按照一定的程序设计语言规范书写的文本文件,包括一系列计算机语言指令。Source code, also known as source program, refers to an uncompiled text file written in accordance with certain programming language specifications, including a series of computer language instructions.

软件(software),是指一系列按照特定顺序组织的计算机数据和指令的集合,包括与计算机系统操作有关的计算机程序、规程、规则,以及可能有的文件、文档及数据等。Software refers to a collection of computer data and instructions organized in a specific order, including computer programs, procedures, rules, and possible files, documents, and data related to the operation of a computer system.

软件包(software package),是指具有特定功能并且用来完成特定任务的一组或者多组程序。软件包可以通过对源代码进行编译、打包得到,并且,该软件包用于实现软件所具有的全部功能。A software package is a group or multiple groups of programs that have specific functions and are used to complete specific tasks. A software package can be obtained by compiling and packaging the source code, and the software package is used to implement all the functions of the software.

子软件包,是指软件包中包括的一个或者多个子包,每个子软件包用于实现软件的至少一个功能。A sub-package refers to one or more sub-packages included in a software package, each of which is used to implement at least one function of the software.

参见图1,示出了本申请提供了一种软件包构建系统的结构示意图。如图1所示,软件包构建系统 10可以包括客户端100、软件包构建装置200,并且,客户端100、软件包构建装置200之间可以通过网络互连。其中,软件包构建装置200可以部署于云端,用于为用户(如软件开发者等)提供构建软件包的云服务。Referring to FIG1 , a schematic diagram of the structure of a software package construction system provided by the present application is shown. 10 may include a client 100 and a software package construction device 200, and the client 100 and the software package construction device 200 may be interconnected via a network. The software package construction device 200 may be deployed in the cloud to provide cloud services for building software packages for users (such as software developers, etc.).

其中,客户端100,用于与用户进行交互,如接收用户提供的新版本的源代码(或者源代码的存储位置)等,并请求云端的软件包构建装置200对多个软件的软件包进行全量或者增量构建。示例性地,客户端100,具体可以是运行在用户侧设备上的应用程序(application),或者可以是软件包构建系统10对外提供的网络浏览器。The client 100 is used to interact with the user, such as receiving a new version of source code (or the storage location of the source code) provided by the user, and requesting the cloud-based software package construction device 200 to perform full or incremental construction of multiple software packages. Exemplarily, the client 100 can be an application running on a user-side device, or a web browser provided by the software package construction system 10.

软件包构建装置200,用于根据客户端100发送的源代码(或者源代码的存储位置)构建软件包,并且,在软件包构建装置200针对开发项目中的多个软件构建出相应的软件包后,用户可以对多个软件中的部分软件的源代码进行更新,并通过客户端100向软件包构建装置200提交该多个软件的新版本的源代码(或者该新版本的源代码的存储位置),该新版本的源代码中部分软件的源代码保持不变,另一部分软件的源代码被用户更新。此时,软件包构建装置200可以通过增量构建的方式为该多个软件构建出相应的软件包。The software package construction device 200 is used to construct a software package according to the source code (or the storage location of the source code) sent by the client 100. After the software package construction device 200 constructs the corresponding software packages for the multiple software in the development project, the user can update the source code of some of the multiple software and submit the source code of the new version of the multiple software (or the storage location of the source code of the new version) to the software package construction device 200 through the client 100. The source code of some of the software in the new version of the source code remains unchanged, and the source code of the other part of the software is updated by the user. At this time, the software package construction device 200 can construct the corresponding software packages for the multiple software by incremental construction.

具体实现时,软件包构建装置200获取在过去时间段内为该多个软件所构建的软件包相关信息,以下称之为历史构建信息,该历史构建信息例如可以包括在过去时间段内为该多个软件构建的软件包的标识、每个软件包包括的子软件包的标识、以及软件包之间的依赖关系等信息。然后,软件包构建装置200确定出该多个软件中的第一软件的第一描述信息,该第一软件的待构建源代码与第一软件的已构建源代码(即为在过去时间段内向软件包构建装置200提交的源代码)存在差异,该第一描述信息例如可以包括第一软件的待构建源代码的内容标识以及存储位置等。并且,软件包构建装置200还根据该历史构建信息,确定多个软件中的第二软件的第二描述信息,该第二软件对应的软件包依赖第一软件对应的软件包,该第二描述信息例如可以包括第二软件的待构建源代码的内容标识以及存储位置等。最后,软件包构建装置200根据第一描述信息、第二描述信息以及历史构建信息,对第一软件的待构建源代码、第二软件的待构建源代码分别进行构建,得到第一软件对应的软件包以及第二软件对应的软件包,并且,由于第二软件包依赖第一软件包,因此,在增量构建过程中,软件包构建装置200先根据第一软件的待构建源代码构建第一软件包,再根据第二软件的待构建源代码构建第二软件包。In specific implementation, the software package construction device 200 obtains the software package related information constructed for the multiple software in the past time period, which is referred to as historical construction information below. The historical construction information may include, for example, the identification of the software package constructed for the multiple software in the past time period, the identification of the sub-software package included in each software package, and the dependency relationship between the software packages. Then, the software package construction device 200 determines the first description information of the first software among the multiple software, the source code to be constructed of the first software is different from the constructed source code of the first software (that is, the source code submitted to the software package construction device 200 in the past time period), and the first description information may include, for example, the content identification and storage location of the source code to be constructed of the first software. In addition, the software package construction device 200 also determines the second description information of the second software among the multiple software based on the historical construction information, the software package corresponding to the second software depends on the software package corresponding to the first software, and the second description information may include, for example, the content identification and storage location of the source code to be constructed of the second software. Finally, the software package construction device 200 constructs the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information and the historical construction information, and obtains the software package corresponding to the first software and the software package corresponding to the second software. Moreover, since the second software package depends on the first software package, in the incremental construction process, the software package construction device 200 first constructs the first software package according to the source code to be constructed of the first software, and then constructs the second software package according to the source code to be constructed of the second software.

由于在对多个软件进行增量构建的过程中,软件包构建装置200会先确定该多个软件中需要重新构建软件包的全部软件(也即第一软件以及第二软件)的描述信息,然后再根据软件包之间的依赖关系优先对第一软件的源代码进行构建,这可以有效减少整个增量构建过程第一软件的源代码构建次数,如第一软件的源代码可以仅被构建一次,以此可以避免第一软件的源代码被重复多次的无效构建,从而可以提高软件包的增量构建效率,提高开发项目的整体开发效率。Since in the process of incrementally building multiple software, the software package building device 200 will first determine the description information of all the software (that is, the first software and the second software) in the multiple software that need to rebuild the software package, and then preferentially build the source code of the first software according to the dependency relationship between the software packages, this can effectively reduce the number of times the source code of the first software is built during the entire incremental building process. For example, the source code of the first software can be built only once, thereby avoiding invalid construction of the source code of the first software being repeated multiple times, thereby improving the incremental building efficiency of the software package and improving the overall development efficiency of the development project.

并且,由于软件包构建装置200能够确定哪些软件需要重新构建,并且,每个软件的源代码可以仅被构建一次,因此,软件包构建装置200可以预估出构建这些软件的源代码对应的软件包所需的总耗时,从而可以预估出增量构建过程的结束时间,方便用户感知,以此提高用户体验。Furthermore, since the software package construction device 200 can determine which software needs to be rebuilt, and the source code of each software can be built only once, the software package construction device 200 can estimate the total time required to build the software packages corresponding to the source codes of these software, and thus can estimate the end time of the incremental construction process, which is convenient for user perception, thereby improving user experience.

示例性地,上述软件包构建装置200可以通过软件或者硬件实现。Exemplarily, the software package construction device 200 may be implemented by software or hardware.

在第一种示例中,当通过软件实现时,软件包构建装置200例如可以通过计算设备中程序代码实现,例如可以通过虚拟机、容器、裸金属服务器(bare metal server,BMS)、计算引擎中的至少一种实现等,该计算设备可以是位于云上的服务器等。In the first example, when implemented by software, the software package construction device 200 can be implemented by program code in a computing device, for example, it can be implemented by at least one of a virtual machine, a container, a bare metal server (BMS), a computing engine, etc. The computing device can be a server located on the cloud, etc.

在第二种示例中,当通过硬件实现时,软件包构建装置200可以通过包括处理器的至少一个物理设备实现,如服务器等,并且,该物理设备可以被部署于云上。其中,处理器可以是中央处理器(central processing unit,CPU)、以及专用集成电路(application-SPE201cific integrated circuit,ASIC)、可编程逻辑器件(programmable logic device,PLD)、复杂程序逻辑器件(complex programmable logical device,CPLD)、现场可编程门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)、片上系统(system on chip,SoC)、软件定义架构(software-defined infrastructure,SDI)芯片、人工智能(artificial intelligence,AI)芯片、数据处理单元(Data processing unit,DPU)等任意一种处理器核或其任意组合。并且,软件包构建装置200中所包括的处理器的数量可以是一个或者多个,所包括的处理器的种类可以是一种或者多种,具体可以根据实际应用的业务需求设定处理器的数量和种类, 本实施例对此并不进行限定。In the second example, when implemented by hardware, the software package construction device 200 can be implemented by at least one physical device including a processor, such as a server, etc., and the physical device can be deployed on the cloud. Among them, the processor can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, a data processing unit (DPU), and any processor core or any combination thereof. In addition, the number of processors included in the software package construction device 200 can be one or more, and the type of processors included can be one or more. The number and type of processors can be set according to the business requirements of the actual application. This embodiment does not limit this.

值得注意的是,上述图1所示能够提供软件包构建云服务的软件包构建系统10仅作为一种示例性说明,在其它可能的实现方式中,软件包构建系统中还可以包括其它装置,如还可以包括至少一个数据库,用于存储多个软件的源代码、或者存储多个软件分别对应的软件包、或者存储上述历史构建信息等。或者,在其它可能的实现方式中,软件包构建系统可以部署于用户侧的终端设备上,此时,软件包构建系统可以为用户提供构建软件包的本地化服务,此时,软件包构建系统可以不包括客户端,从而用户可以直接在该本地的终端设备上提供多个软件的源代码,并由该软件包构建系统中执行上述针对增量构建软件包的处理过程。或者,在其它可能的实现方式中,软件包构建装置200所执行的操作可以由多个装置协同执行,如可以由装置1以及装置2协同执行等,其中,装置1用于根据历史构建信息,确定上述第一描述信息以及第二描述信息,具体地,装置1用于获取上述历史构建信息,确定待构建源代码与已构建源代码存在差异的第一软件的第一描述信息,并根据历史构建信息,确定第二软件的第二描述信息,该第二软件对应的第二软件包依赖第一软件对应的第一软件包;装置2,用于根据历史构建信息、第一描述信息以及第二描述信息,对第一软件的待构建源代码以及第二软件的待构建源代码分别进行构建,得到第一软件对应的第二软件包以及第二软件对应的第二软件包,并且,装置2会先根据第一软件的待构建源代码构建第一软件包,再根据第二软件的待构建源代码构建第二软件包等。本申请中对于软件包构建系统的具体架构及其部署方式并不进行限定。It is worth noting that the software package construction system 10 capable of providing software package construction cloud service shown in FIG. 1 is only used as an exemplary description. In other possible implementations, the software package construction system may also include other devices, such as at least one database for storing source codes of multiple software, or storing software packages corresponding to multiple software, or storing the above historical construction information, etc. Alternatively, in other possible implementations, the software package construction system may be deployed on a terminal device on the user side. In this case, the software package construction system may provide users with a localized service for building software packages. In this case, the software package construction system may not include a client, so that users can directly provide source codes of multiple software on the local terminal device, and the software package construction system executes the above processing for incrementally building software packages. Alternatively, in other possible implementations, the operations performed by the software package construction device 200 may be performed collaboratively by multiple devices, such as by device 1 and device 2, wherein device 1 is used to determine the above-mentioned first description information and second description information based on historical construction information, specifically, device 1 is used to obtain the above-mentioned historical construction information, determine the first description information of the first software whose source code to be constructed is different from the constructed source code, and determine the second description information of the second software based on the historical construction information, and the second software package corresponding to the second software depends on the first software package corresponding to the first software; device 2 is used to construct the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the historical construction information, the first description information and the second description information, obtain the second software package corresponding to the first software and the second software package corresponding to the second software, and device 2 will first construct the first software package based on the source code to be constructed of the first software, and then construct the second software package based on the source code to be constructed of the second software, etc. The specific architecture of the software package construction system and its deployment method are not limited in this application.

接下来,结合附图对本申请提供的软件包构建方法进行描述。Next, the software package construction method provided by the present application is described in conjunction with the accompanying drawings.

参见图2,图2为本申请提供的一种软件包构建方法流程示意图,该方法可以应用于图1所示的软件包构建系统,或者可以应用于其它可适用的软件包构建系统。为便于说明,以本方法应用于图1所示的软件包构建系统10为例进行示例性说明。See Figure 2, which is a schematic flow chart of a software package construction method provided by the present application. The method can be applied to the software package construction system shown in Figure 1, or can be applied to other applicable software package construction systems. For ease of description, the present method is applied to the software package construction system 10 shown in Figure 1 as an example for exemplary description.

其中,图2所示的软件包构建方法具体可以包括:The software package construction method shown in FIG2 may specifically include:

S201:客户端100向软件包构建装置200发送全量构建请求,以请求软件包构建装置200构建出开发项目中各个软件的软件包。S201: The client 100 sends a full build request to the software package building device 200 to request the software package building device 200 to build a software package for each software in the development project.

本实施例中,用户在进行软件开发的过程中,可以利用软件包构建系统10针对开发项目中的各个软件构建出相应的软件包,每个软件对应的软件包可以包括多个子软件包。示例性地,软件包例如可以是RPM包,该RPM包可以包括一个或者多个RPM(也即子软件包),每个RPM通常可以包括可执行文件、配置文件、库文件等,其中,可执行文件例如可以是二进制文件。所构建出的软件包,能够用于实现软件的至少一个功能,如图像裁剪功能、图像缩放功能等,并由软件包构建装置200中的RPM包管理器进行管理。In this embodiment, during the process of software development, the user can use the software package construction system 10 to construct corresponding software packages for each software in the development project, and the software package corresponding to each software may include multiple sub-software packages. Exemplarily, the software package may be, for example, an RPM package, which may include one or more RPMs (i.e., sub-software packages), and each RPM may generally include an executable file, a configuration file, a library file, etc., wherein the executable file may be, for example, a binary file. The constructed software package can be used to implement at least one function of the software, such as an image cropping function, an image zooming function, etc., and is managed by the RPM package manager in the software package construction device 200.

作为一种实现示例,用户可以在客户端100上提供开发项目中各个软件的源代码的存储地址,如统一资源定位符(uniform resource locator,URL)等。然后,客户端100可以根据各个软件的源代码的存储地址生成全量构建请求,并将其发送给软件包构建装置200,以请求软件包构建装置200构建出各个软件的软件包。As an implementation example, the user can provide the storage address of the source code of each software in the development project on the client 100, such as a uniform resource locator (URL). Then, the client 100 can generate a full build request according to the storage address of the source code of each software, and send it to the software package building device 200 to request the software package building device 200 to build the software package of each software.

S202:软件包构建装置200对接收到的全量构建请求进行响应,构建得到各个软件的软件包,并生成历史构建信息。S202: The software package construction device 200 responds to the received full construction request, constructs the software packages of each software, and generates historical construction information.

具体实现时,软件包构建装置200可以创建有代码仓库以及多个数据库,其中,代码仓库用于存储各个软件的源代码,多个数据库用于存储软件包构建过程中的不同信息,如数据库1用于存储构建得到的各个软件对应的软件包,数据库2用于存储不同软件包之间的依赖关系等信息。其中,软件包之间的依赖关系,也可以称之为软件之间的依赖关系,或者称之为软件与其它软件的软件包之间的依赖关系。如软件A对应的软件包a的构建依赖于软件B对应的软件包b先完成构建,则软件包a依赖软件包b,或者说软件A依赖软件B、或者说软件A依赖软件包b,对此并不限定。软件包构建装置200在接收到的全量构建请求后,可以从中解析出各个软件的源代码的存储地址。然后,软件包构建装置200根据该存储地址访问得到各个软件的源代码,并将其写入已创建的代码仓库中。如此,软件包构建装置200可以根据代码仓库中存储的源代码,分别构建出多个软件对应的软件包。其中,根据源代码构建得到的软件包的具体实现,在实际应用场景中已经存在相关应用,在此不做赘述。 In specific implementation, the software package construction device 200 can create a code warehouse and multiple databases, wherein the code warehouse is used to store the source code of each software, and the multiple databases are used to store different information in the software package construction process, such as database 1 is used to store the software packages corresponding to each software obtained by construction, and database 2 is used to store information such as the dependency relationship between different software packages. Among them, the dependency relationship between software packages can also be called the dependency relationship between software, or the dependency relationship between software and the software packages of other software. If the construction of software package a corresponding to software A depends on the completion of the construction of software package b corresponding to software B first, then software package a depends on software package b, or software A depends on software B, or software A depends on software package b, which is not limited to this. After receiving the full build request, the software package construction device 200 can parse the storage address of the source code of each software from it. Then, the software package construction device 200 accesses the source code of each software according to the storage address and writes it into the created code warehouse. In this way, the software package construction device 200 can respectively construct the software packages corresponding to multiple software according to the source code stored in the code warehouse. Among them, the specific implementation of the software package obtained by construction according to the source code has already existed in the actual application scenario, and will not be repeated here.

软件包构建装置200在构建得到各个软件对应的软件包后,可以在数据库1中存储各个软件对应的软件包;并且,软件包构建装置200还可以在数据库2中记录为该多个软件所构建出的软件包的相关信息,以下称之为历史构建信息。实际应用时,软件包构建装置200在数据库2中所记录的历史构建信息,还可以包括与源代码相关的信息。示例性地,软件包构建装置200所记录的历史构建信息可以如图3所示。下面对历史构建信息包括的具体信息内容进行详细说明。After constructing the software packages corresponding to the various software, the software package construction device 200 may store the software packages corresponding to the various software in the database 1; and the software package construction device 200 may also record the relevant information of the software packages constructed for the multiple software in the database 2, which is referred to as historical construction information below. In actual application, the historical construction information recorded by the software package construction device 200 in the database 2 may also include information related to the source code. Exemplarily, the historical construction information recorded by the software package construction device 200 may be as shown in FIG. 3. The specific information content included in the historical construction information is described in detail below.

1、记录每个软件包中各个子软件包的标识,如图3中的子软件包rpm a1的标识“pkg_id_a1”等,该标识例如可以是利用摘要算法根据子软件包中的信息内容进行生成。1. Record the identifier of each sub-package in each software package, such as the identifier "pkg_id_a1" of the sub-package rpm a1 in Figure 3. The identifier can be generated according to the information content in the sub-package using a digest algorithm.

示例性地,摘要算法,具体可以是MD5信息摘要算法(MD5 message-digest algorithm);或者,摘要算法,具体可以是安全散列算法(secure hash algorithm,SHA)256,即利用256个比特的字符串来标识子软件包。实际应用时,软件包构建装置200也可以基于其它类型的算法生成子软件包的标识等,对此并不进行限定。For example, the digest algorithm may be MD5 message-digest algorithm; or, the digest algorithm may be secure hash algorithm (SHA) 256, which uses a 256-bit string to identify the sub-package. In actual application, the software package construction device 200 may also generate the identification of the sub-package based on other types of algorithms, which is not limited thereto.

2、记录不同软件包之间的依赖关系。2. Record the dependencies between different software packages.

其中,所记录的依赖关系,可以是软件包粒度的依赖关系。比如,可以在数据库中记录“软件包A—>软件包X”,用于指示软件包A依赖软件包X。The recorded dependency relationship may be a dependency relationship at the software package level. For example, "software package A -> software package X" may be recorded in the database to indicate that software package A depends on software package X.

或者,所记录的依赖关系,可以是子软件包粒度的依赖关系。如图3所示,软件A对应的软件包依赖软件X对应的软件包中的子软件包“pkg_id_x1”、软件Y对应的软件包中的子软件包“pkg_id_y1”。相应地,软件A对应的软件包并不依赖软件X对应的软件包中的其它子软件包。Alternatively, the recorded dependency relationship may be a dependency relationship at the sub-package granularity. As shown in FIG3 , the software package corresponding to software A depends on the sub-package “pkg_id_x1” in the software package corresponding to software X and the sub-package “pkg_id_y1” in the software package corresponding to software Y. Accordingly, the software package corresponding to software A does not depend on other sub-packages in the software package corresponding to software X.

3、记录各个软件的源代码的内容标识,该内容标识能够对与源代码中的内容进行唯一标识。相应的,不同内容的源代码对应于不同的内容标识。3. Record the content identifier of the source code of each software, which can uniquely identify the content in the source code. Accordingly, source codes with different contents correspond to different content identifiers.

示例性地,源代码的内容标识,可以是用户提交新的源代码时的提交标识,即用户每次提交源代码时,该源代码可以被配置唯一的提交标识。或者,源代码的内容标识,可以是该源代码对应的版本号,也可以是利用摘要算法根据子软件包中的信息内容所生成的信息。For example, the content identifier of the source code may be a submission identifier when a user submits a new source code, that is, each time a user submits a source code, the source code may be configured with a unique submission identifier. Alternatively, the content identifier of the source code may be a version number corresponding to the source code, or may be information generated by using a digest algorithm based on the information content in the sub-package.

4、记录每个软件包、源代码分别所属的软件。4. Record the software to which each software package and source code belongs.

实际应用时,软件包构建装置200还可以记录更多类型的信息,如源代码的提交时间、提交位置、用户身份等信息,本实施例对此并不进行限定。In actual application, the software package construction device 200 may also record more types of information, such as source code submission time, submission location, user identity, etc., which is not limited in this embodiment.

S203:客户端100向软件包构建装置200发送增量构建请求,以请求软件包构建装置200对开发项目包括的多个软件的软件包进行增量构建。S203: The client 100 sends an incremental construction request to the software package construction apparatus 200 to request the software package construction apparatus 200 to perform incremental construction on the software packages of the multiple software included in the development project.

实际应用场景中,用户可能会对开发项目中的部分软件的源代码进行修改,如优化部分软件的源代码中的代码逻辑等,由于并非所有软件的源代码均会被修改,如果为全部软件重新构建软件包,则容易产生大量的无效重建过程。因此,用户可以通过客户端100向软件包构建装置200发送增量构建请求,以请求软件包构建装置200对开发项目包括的多个软件的软件包进行增量构建,即可以仅为该多个软件中的部分软件构建得到新的软件包,并且,经过增量构建后该多个软件对应的软件包能够与采用全量构建所得到的软件包相同(也即达到全量构建的效果)。In actual application scenarios, users may modify the source code of some software in the development project, such as optimizing the code logic in the source code of some software, etc. Since the source code of not all software will be modified, if the software package is rebuilt for all software, it is easy to generate a large number of invalid reconstruction processes. Therefore, the user can send an incremental build request to the software package building device 200 through the client 100 to request the software package building device 200 to incrementally build the software packages of multiple software included in the development project, that is, only a new software package can be built for some of the multiple software, and after the incremental build, the software packages corresponding to the multiple software can be the same as the software packages obtained by the full build (that is, the effect of the full build is achieved).

S204:软件包构建装置200对接收到的增量构建请求进行响应,确定多个软件中的第一软件的第一描述信息,该第一软件的待构建源代码与第一软件的已构建源代码存在差异。S204: The software package construction apparatus 200 responds to the received incremental construction request and determines first description information of a first software among the multiple software, where the source code to be constructed of the first software is different from the constructed source code of the first software.

本实施例中,为便于区分和描述,将软件包构建装置200当前尚未确定进行构建的源代码称之为候选源代码,将当前确定需要进行构建的源代码称之为待构建源代码,并将上一次构建过程中完成构建的源代码称之为已构建源代码。实际应用时,由于增量构建过程中,软件包构建装置200可以从多个软件中确定出需要重新构建软件包的软件,则,所确定出的该部分软件的候选源代码,即作为待构建源代码,表征需要根据该待构建源代码构建软件包。In this embodiment, for the convenience of distinction and description, the source code that the software package construction device 200 has not yet determined to be constructed is called candidate source code, the source code that is currently determined to be constructed is called source code to be constructed, and the source code that has been constructed in the last construction process is called constructed source code. In actual application, since the software package construction device 200 can determine the software that needs to be rebuilt from multiple software in the incremental construction process, the candidate source code of the determined part of the software, that is, the source code to be constructed, indicates that the software package needs to be constructed according to the source code to be constructed.

其中,第一描述信息,能够用于指示需要重新构建软件包的第一软件。比如,第一描述信息可以是第一软件的标识,或者可以是第一软件的待构建源代码的内容标识以及该待构建源代码的存储位置的指示信息等。The first description information can be used to indicate the first software that needs to be rebuilt. For example, the first description information can be the identifier of the first software, or the content identifier of the source code to be built of the first software and the indication information of the storage location of the source code to be built.

软件包构建装置200在获得增量构建请求后,可以从多个软件中确定出源代码发生更新的第一软件。示例性地,本实施例提供了以下三种实现方式。After obtaining the incremental construction request, the software package construction device 200 can determine the first software whose source code is updated from the multiple software. Exemplarily, this embodiment provides the following three implementation methods.

在第一种实现方式中,由于源代码是由用户进行修改并提交,因此,用户可以在客户端100上输入 源代码发生更新的软件的标识,如软件名称等。为便于区分和描述,本实施例中将源代码发生更新的软件称之为第一软件,该第一软件可以是一个软件,也可以包括多个软件。然后,客户端100可以生成包括第一软件的标识的增量构建请求,并将其发送给软件包构建装置200。这样,软件包构建装置200可以从增量构建请求中解析出第一软件的标识,也即可以确定源代码发生更新的第一软件的第一描述信息。In the first implementation, since the source code is modified and submitted by the user, the user can enter The identifier of the software whose source code is updated, such as the software name. For the convenience of distinction and description, in this embodiment, the software whose source code is updated is referred to as the first software, and the first software can be one software or multiple software. Then, the client 100 can generate an incremental build request including the identifier of the first software, and send it to the software package construction device 200. In this way, the software package construction device 200 can parse the identifier of the first software from the incremental build request, that is, determine the first description information of the first software whose source code is updated.

在第二种实现方式中,软件包构建装置200可以从接收到的增量构建请求中解析出所有软件的待构建源代码的存储地址,并根据该存储地址访问各个软件的候选源代码,并对各个候选源代码的内容标识进行快照(snapshot)。然后,软件包构建装置200可以遍历每个软件,并将当前遍历的软件的候选源代码的内容标识,与上一次构建过程(如步骤S202中的全量构建过程)中该软件的已构建源代码的内容标识进行比较,确定该软件的候选源代码与已构建源代码之间是否存在内容差异。如果存在,表征该软件的源代码发生更新,则软件包构建装置200可以将该软件确定为需要重新软件包的第一软件,并记录该第一软件的第一描述信息,如第一软件的待构建源代码的内容标识以及存储地址等,并将该第一软件的候选源代码作为待构建源代码,表征需要根据该候选源代码(也即待构建源代码)为第一软件重新构建软件包。如果不存在,表征该软件包的源代码未存在更新,则软件包构建装置200可以无需将该软件确定为第一软件。或者,当候选源代码与已构建源代码之间不存在差异时,软件包构建装置200还可以校验该软件是否基于已构建源代码构建得到软件包,并且,如果已经构建得到软件包,则软件包构建装置200可以无需将其确定为第一软件;而如果尚未基于已构建源代码构建得到软件包,如可能因为程序运行错误等原因导致软件包构建失败等,则软件包构建装置200可以将该软件确定为第一软件,并将该第一软件的候选源代码作为待构建源代码,以便后续基于第一软件的待构建源代码构建出相应的软件包。In the second implementation, the software package construction device 200 can parse the storage address of the source code to be constructed of all software from the received incremental construction request, and access the candidate source code of each software according to the storage address, and take a snapshot of the content identifier of each candidate source code. Then, the software package construction device 200 can traverse each software, and compare the content identifier of the candidate source code of the currently traversed software with the content identifier of the constructed source code of the software in the last construction process (such as the full construction process in step S202), and determine whether there is a content difference between the candidate source code of the software and the constructed source code. If there is, it indicates that the source code of the software has been updated, then the software package construction device 200 can determine the software as the first software that needs to be repackaged, and record the first description information of the first software, such as the content identifier and storage address of the source code to be constructed of the first software, and use the candidate source code of the first software as the source code to be constructed, indicating that the software package needs to be rebuilt for the first software according to the candidate source code (that is, the source code to be constructed). If it does not exist, it indicates that there is no update in the source code of the software package, then the software package construction device 200 does not need to determine the software as the first software. Alternatively, when there is no difference between the candidate source code and the constructed source code, the software package construction device 200 can also verify whether the software package is constructed based on the constructed source code, and if the software package has been constructed, the software package construction device 200 may not need to determine it as the first software; and if the software package has not been constructed based on the constructed source code, such as the software package construction failure due to program running errors, etc., the software package construction device 200 can determine the software as the first software, and use the candidate source code of the first software as the source code to be constructed, so as to subsequently construct the corresponding software package based on the source code to be constructed of the first software.

其中,候选源代码的内容标识,例如可以是候选源代码在被用户提交时所配置的提交序号、版本号等,或者可以是利用摘要算法所计算出的标识等。The content identifier of the candidate source code may be, for example, a submission sequence number or a version number configured when the candidate source code is submitted by a user, or may be an identifier calculated using a digest algorithm.

实际应用场景中,开发项目中的部分软件的源代码可能在一段时间段内被多次修改,而通过对候选源代码的内容标识进行快照,可以确定开发项目中的各个软件的最新版本的源代码。这样,软件包构建装置200根据该最新版本的源代码执行增量构建过程,这可以避免同一软件的源代码在这段时间段内被多次修改而导致软件包构建装置200重复执行无效的增量构建过程。比如,假设在一段时间内,开发项目中的软件A的源代码首先发生第一次更新,此时,软件包构建装置200可以暂不执行增量构建过程;然后,在该段时间内,开发项目中的软件A的源代码发生第二次更新,并且,开发项目中的软件B的源代码也发生更新,则,软件包构建装置200可以对各个软件的最新版本的源代码的内容标识进行快照(如软件包构建装置200可以定期进行快照),并执行增量构建过程。如此,软件包构建装置200可以避免在软件A的源代码发生第一次更新时所执行的无效构建过程。In actual application scenarios, the source code of some software in the development project may be modified multiple times within a period of time, and by taking a snapshot of the content identifier of the candidate source code, the source code of the latest version of each software in the development project can be determined. In this way, the software package construction device 200 performs an incremental construction process according to the source code of the latest version, which can avoid the source code of the same software being modified multiple times during this period of time, resulting in the software package construction device 200 repeatedly performing an invalid incremental construction process. For example, assuming that within a period of time, the source code of software A in the development project is first updated for the first time, at this time, the software package construction device 200 may not perform the incremental construction process temporarily; then, within this period of time, the source code of software A in the development project is updated for the second time, and the source code of software B in the development project is also updated, then, the software package construction device 200 can take a snapshot of the content identifier of the source code of the latest version of each software (such as the software package construction device 200 can take snapshots regularly), and perform an incremental construction process. In this way, the software package construction device 200 can avoid the invalid construction process performed when the source code of software A is updated for the first time.

在第三种实现方式中,软件包构建装置200可以针对每个软件,直接比较该软件的候选源代码与已构建源代码是否一致,并将候选源代码与已构建源代码不一致的软件,确定为需要重新软件包的第一软件。比如,软件包构建装置200可以获取用户提交的多个软件的候选源代码,并将各个软件的候选源代码与代码仓库中该软件的已构建源代码进行比较,以此确定候选源代码与已构建源代码不一致的第一软件。此时,第一软件的候选源代码,即作为第一软件的待构建源代码,表征需要根据该待构建源代码为第一软件重新构建软件包。In a third implementation, the software package construction device 200 can directly compare the candidate source code of each software with the constructed source code to see if it is consistent, and determine the software whose candidate source code is inconsistent with the constructed source code as the first software that needs to be repackaged. For example, the software package construction device 200 can obtain the candidate source code of multiple software submitted by the user, and compare the candidate source code of each software with the constructed source code of the software in the code repository, so as to determine the first software whose candidate source code is inconsistent with the constructed source code. At this time, the candidate source code of the first software, that is, the source code to be constructed as the first software, indicates that the software package needs to be rebuilt for the first software based on the source code to be constructed.

实际应用时,软件包构建装置200在确定出第一软件的第一描述信息后,可以将该第一描述信息添加至构建列表中,该构建列表用于记录需要重新构建软件包的软件/源代码。In actual application, after determining the first description information of the first software, the software package construction device 200 may add the first description information to a construction list, where the construction list is used to record the software/source code of the software package that needs to be rebuilt.

S205:软件包构建装置200根据历史构建信息,确定多个软件中的第二软件的第二描述信息,该第二软件对应的第二软件包依赖第一软件对应的第一软件包。S205: The software package construction device 200 determines second description information of a second software among the plurality of software according to the historical construction information, wherein a second software package corresponding to the second software depends on a first software package corresponding to the first software.

可以理解,由于不同软件包之间可能存在依赖关系,因此,当存在部分软件的软件包依赖第一软件对应的软件包,并且第一软件因为源代码存在更新而需要重新构建软件包时,该部分软件通常也需要适应性的重新构建软件包。为便于区分和描述,本实施例中将该部分软件称之为第二软件,该第二软件可以是一个软件,也可以包括多个软件。It is understandable that, since different software packages may have dependencies, when a software package of some software depends on a software package corresponding to a first software, and the first software needs to rebuild the software package because of source code updates, the software package of the part software usually also needs to be adaptively rebuilt. For ease of distinction and description, in this embodiment, the part software is referred to as the second software, and the second software can be one software or multiple software.

作为一种确定第二软件的示例性实现方式,软件包构建装置200可以根据数据库中记录的历史构建信息,检测除了第一软件之外的其它软件对应的历史软件包,与第一软件对应的软件包之间是否存在依赖关系。其中,第一软件的历史软件包,是指上一次构建过程中利用第一软件的已构建源代码构建得到 的软件包;其余的软件对应的历史软件包类似。当存在一个软件对应的历史软件包依赖第一软件对应的历史软件时,软件包构建装置200可以将该软件确定为需要重新构建软件包的第二软件,并进一步确定该第二软件的第二描述信息,此时,第二软件的候选源代码,即作为第二软件的待构建源代码,表征需要根据该待构建源代码为第二软件重新构建软件包。其中,第二描述信息,能够用于指示需要重新构建软件包的第二软件。比如,第二描述信息可以是第二软件的标识,或者可以是第二软件的待构建源代码的内容标识以及该待构建源代码的存储位置的指示信息等。而如果其它软件对应的历史软件包不依赖第一软件对应的历史软件包时,软件包构建装置200可以确定不为该其它软件重新构建软件包。As an exemplary implementation method for determining the second software, the software package construction device 200 can detect whether there is a dependency relationship between the historical software packages corresponding to other software except the first software and the software package corresponding to the first software based on the historical construction information recorded in the database. The historical software package of the first software refers to the software package that was constructed using the constructed source code of the first software during the previous construction process. software package; the historical software packages corresponding to the remaining software are similar. When there is a historical software package corresponding to a software that depends on the historical software corresponding to the first software, the software package construction device 200 can determine the software as the second software that needs to rebuild the software package, and further determine the second description information of the second software. At this time, the candidate source code of the second software, that is, the source code to be built as the second software, represents the need to rebuild the software package for the second software based on the source code to be built. Among them, the second description information can be used to indicate the second software that needs to rebuild the software package. For example, the second description information can be the identifier of the second software, or it can be the content identifier of the source code to be built of the second software and the indication information of the storage location of the source code to be built. If the historical software packages corresponding to other software do not depend on the historical software packages corresponding to the first software, the software package construction device 200 can determine not to rebuild the software package for the other software.

实际应用时,软件包构建装置200在确定出第二软件的第二描述信息后,可以将该第二描述信息添加至构建列表中,以便后续软件包构建装置200根据构建列表中记录的各描述信息,为第一软件以及第二软件重新构建软件包。In actual application, after determining the second description information of the second software, the software package construction device 200 can add the second description information to the construction list, so that the software package construction device 200 can subsequently reconstruct the software packages for the first software and the second software according to the description information recorded in the construction list.

上述确定第一描述信息以及第二描述信息的过程,是以先确定发生源代码更新的第一软件,再根据软件包之间的依赖关系确定依赖第一软件的第二软件为例进行说明。在其它可能的实施方式中,软件包构建装置200可以遍历开发项目中的各个软件,并且,针对当前所遍历到的软件A,软件包构建装置200可以先校验该软件A的候选源代码与已构建源代码是否一致,如可以通过内容标识进行校验等。当候选源代码与已构建源代码不一致时,软件包构建装置200可以将该软件A(作为第一软件)的描述信息添加至构建列表中,并将第一软件的候选源代码作为待构建源代码。而当候选源代码与已构建源代码一致时,软件包构建装置200可以校验软件A对应的依赖环境中的各个软件的源代码是否发生变化,具体可以根据历史构建信息,确定该软件A对应的历史软件包所依赖的其它软件(以下称之为候选软件)对应的历史软件包,并校验该候选软件的已构建源代码与候选源代码是否一致,例如可以校验该候选软件对应的已构建源代码的内容标识与候选源代码的内容标识是否一致。如果不一致,则将该软件A(作为第二软件)的描述信息以及该候选软件(作为第一软件)的描述信息添加至构建列表中;如果一致,表征软件A自身的源代码未发生变化,并且其依赖的其它软件的源代码也未发生变化,则确定不为该软件A重新构建软件包。The process of determining the first description information and the second description information is described by first determining the first software that has a source code update, and then determining the second software that depends on the first software according to the dependency relationship between the software packages. In other possible implementations, the software package construction device 200 can traverse each software in the development project, and for the software A currently traversed, the software package construction device 200 can first verify whether the candidate source code of the software A is consistent with the constructed source code, such as by verifying through the content identifier. When the candidate source code is inconsistent with the constructed source code, the software package construction device 200 can add the description information of the software A (as the first software) to the construction list, and use the candidate source code of the first software as the source code to be constructed. When the candidate source code is consistent with the constructed source code, the software package construction device 200 can verify whether the source code of each software in the dependent environment corresponding to the software A has changed, specifically, according to the historical construction information, determine the historical software packages corresponding to other software (hereinafter referred to as candidate software) that the historical software package corresponding to the software A depends on, and verify whether the constructed source code of the candidate software is consistent with the candidate source code, for example, it can be verified whether the content identifier of the constructed source code corresponding to the candidate software is consistent with the content identifier of the candidate source code. If they are inconsistent, the description information of software A (as the second software) and the description information of the candidate software (as the first software) are added to the build list; if they are consistent, representing that the source code of software A itself has not changed, and the source code of other software it depends on has not changed, it is determined not to rebuild the software package for software A.

S206:软件包构建装置200根据第一描述信息、第二描述信息以及历史构建信息,对第一软件的待构建源代码以及第二软件的待构建源代码分别进行构建,得到第一软件对应的第一软件包以及第二软件对应的第二软件包,该第一软件的待构建源代码先于第二软件的待构建源代码进行构建。S206: The software package construction device 200 constructs the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information and the historical construction information to obtain a first software package corresponding to the first software and a second software package corresponding to the second software, wherein the source code to be constructed of the first software is constructed before the source code to be constructed of the second software.

对于需要重新构建软件包的第一软件以及第二软件,软件包构建装置200可以根据构建列表中记录的各个软件的描述信息,对该软件的待构建源代码进行构建,以得到相应的软件包。For the first software and the second software that need to rebuild the software package, the software package building device 200 can build the source code to be built of the software according to the description information of each software recorded in the building list to obtain the corresponding software package.

示例性地,软件包构建装置200可以根据各个软件的描述信息,获取该软件的待够建源代码,并根据获取的待构建源代码构建得到相应的软件包。以构建第一软件包为例,软件包构建装置200可以根据第一描述信息中待构建源代码的存储位置的指示信息,访问第三方托管平台,并根据第一描述信息中包括的待构建源代码的内容标识,拉取第一软件的待构建源代码,从而软件包构建装置200可以根据所获取的第一软件的待构建源代码构建得到第一软件包。类似地,软件包构建装置200可以根据构建列表中记录的第二描述信息,构建得到第二软件包。Exemplarily, the software package construction device 200 can obtain the source code to be built of the software according to the description information of each software, and construct the corresponding software package according to the obtained source code to be built. Taking the construction of the first software package as an example, the software package construction device 200 can access the third-party hosting platform according to the indication information of the storage location of the source code to be built in the first description information, and pull the source code to be built of the first software according to the content identifier of the source code to be built included in the first description information, so that the software package construction device 200 can construct the first software package according to the obtained source code to be built of the first software. Similarly, the software package construction device 200 can construct the second software package according to the second description information recorded in the construction list.

其中,由于第二软件包依赖于第一软件包,因此,在构建软件包的过程中,软件包构建装置200可以根据历史构建信息,确定不同软件包之间的依赖关系,并根据该依赖关系,优先完成对被依赖的第一软件包的构建。在根据第一软件的待构建源代码构建得到第一软件包后,软件包构建装置200再根据第二软件的待构建源代码构建得到第二软件包。如此,可以避免第二软件包发生重复构建,即避免在先构建出第二软件包后,由于其依赖的第一软件包重新构建而导致第二软件包也需要重新构建。Among them, since the second software package depends on the first software package, therefore, in the process of building the software package, the software package building device 200 can determine the dependency relationship between different software packages based on the historical building information, and based on the dependency relationship, give priority to completing the construction of the first software package that is dependent. After the first software package is built based on the source code to be built of the first software, the software package building device 200 then builds the second software package based on the source code to be built of the second software. In this way, it is possible to avoid repeated construction of the second software package, that is, it is possible to avoid the need to rebuild the second software package due to the reconstruction of the first software package on which it depends after the second software package is built.

如此,在整个增量构建过程中,第一软件的源代码可以不用被重复构建,以此可以避免第一软件的源代码被重复多次的无效构建,从而可以提高软件包的增量构建效率,提高开发项目的整体开发效率。In this way, during the entire incremental construction process, the source code of the first software does not need to be repeatedly built, thereby avoiding invalid construction of the source code of the first software by repeated construction, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project.

并且,软件包构建装置200能够确定需要重新构建的全部软件的源代码,因此,可以预估出构建这些软件的源代码对应的软件包所需的总耗时。比如,软件包构建装置200可以记录在全量构建过程中(也即步骤S201至步骤S202所述的构建过程)为每个软件构建相应的软件包所需的耗时,例如可以是记录在历史构建信息中。这样,在增量构建过程中,软件包构建装置200在确定出所需重新构建软件包的软件后,可以通过查找历史构建信息,预估为这些软件构建软件包所需的耗时,从而根据该各个软件对应 的耗时计算出总耗时。如此,软件包构建装置200可以预测出增量构建过程的结束时间,方便用户感知,以此提高用户体验。Furthermore, the software package construction device 200 is able to determine the source code of all software that needs to be rebuilt, and therefore can estimate the total time required to build the software packages corresponding to the source code of these software. For example, the software package construction device 200 can record the time required to build the corresponding software package for each software during the full build process (i.e., the build process described in steps S201 to S202), which can be recorded in the historical build information. In this way, during the incremental build process, after the software package construction device 200 determines the software that needs to be rebuilt, it can estimate the time required to build the software packages for these software by searching the historical build information, and thus estimate the time required to build the software packages according to the source code of each software. In this way, the software package construction device 200 can predict the end time of the incremental construction process, which is convenient for users to perceive and thus improve user experience.

实际应用时,由于第一软件包可能包括多个子软件包,并且,在重新构建第一软件包时,该多个子软件包中的部分子软件包发生变化,而其余子软件包未发生变化(如软件中的部分功能被优化,其余功能保持不变等)。因此,在进一步可能的实施方式中,软件包构建装置200可以先根据第一软件的第一描述信息,对第一软件的待构建源代码进行构建,得到第一软件包,并根据历史构建信息确定该第一软件包中被第二软件包依赖的子软件包是否发生变化,从而在第二软件包所依赖的子软件包发生变化后,根据第二描述信息,对第二软件包的待构建源代码进行构建,得到第二软件包。In actual application, since the first software package may include multiple sub-software packages, and when the first software package is rebuilt, some of the multiple sub-software packages change, while the other sub-software packages do not change (e.g., some functions in the software are optimized, while the other functions remain unchanged, etc.), therefore, in a further possible implementation, the software package construction device 200 may first construct the source code to be constructed of the first software package according to the first description information of the first software package to obtain the first software package, and determine whether the sub-software package in the first software package that the second software package depends on has changed according to the historical construction information, so that after the sub-software package that the second software package depends on has changed, the source code to be constructed of the second software package is constructed according to the second description information to obtain the second software package.

作为一种实现示例,软件包构建装置200可以根据历史构建信息,确定第二软件对应的历史软件包所依赖的第一软件对应的历史软件包中的第二子软件包的标识,该历史软件包是通过对已构建的源代码进行构建得到。然后,软件包构建装置200可以根据第二子软件包的标识,检测新构建得到的第一软件包所包括的多个子软件包中,是否存在与第二子软件包相匹配的第一子软件包,比如,软件包构建装置200可以将第二子软件包的标识,与第一软件包中的各个子软件包的标识进行匹配,该标识例如可以通过MD5算法或者哈希算法计算得到。As an implementation example, the software package construction device 200 can determine the identifier of the second sub-package in the historical software package corresponding to the first software that the historical software package corresponding to the second software depends on based on the historical construction information, and the historical software package is obtained by constructing the constructed source code. Then, the software package construction device 200 can detect whether there is a first sub-package that matches the second sub-package among the multiple sub-packages included in the newly constructed first software package based on the identifier of the second sub-package. For example, the software package construction device 200 can match the identifier of the second sub-package with the identifiers of each sub-package in the first software package, and the identifier can be calculated by the MD5 algorithm or the hash algorithm, for example.

当第一软件包中不存在与第二子软件包相匹配的子软件包,表征第一软件包中被第二软件包依赖的子软件包发生变化,则,软件包构建装置200可以根据第二软件的待构建源代码重新构建出软件包。When there is no sub-package matching the second sub-package in the first software package, indicating that the sub-package in the first software package that the second software package depends on has changed, the software package construction device 200 can reconstruct the software package according to the source code to be constructed of the second software package.

而当第一软件包中存在第一子软件包与第二子软件包相匹配,表征第一软件包中被第二软件包依赖的子软件包未发生变化,此时,第一软件包的重建对于第二软件包并未产生影响。因此,软件包构建装置200可以不为第二软件构建新的软件包,例如可以在构建列表中删除第二软件的第二描述信息等。如此,可以进一步避免部分软件的源代码被无效重复构建,提高软件包的增量构建效率。When the first sub-package in the first software package matches the second sub-package, it indicates that the sub-package in the first software package that the second software package depends on has not changed. At this time, the reconstruction of the first software package has no effect on the second software package. Therefore, the software package construction device 200 may not build a new software package for the second software, for example, the second description information of the second software may be deleted from the construction list. In this way, the invalid re-construction of the source code of some software can be further avoided, and the incremental construction efficiency of the software package can be improved.

实际应用时,开发项目中所包括的软件数量可能较多,如包括多个100个软件等,相应的,软件包构建装置200所确定的需要重新构建软件包的数量也可能较多。此时,软件包构建装置200可以通过并发构建多个软件包的方式,来进一步加快增量构建的整体效率。示例性地,本实施例中提供了以下两种实现示例。In actual application, the number of software included in the development project may be large, such as including more than 100 software, and accordingly, the number of software packages that need to be rebuilt determined by the software package building device 200 may also be large. In this case, the software package building device 200 can further speed up the overall efficiency of incremental building by building multiple software packages concurrently. For example, the following two implementation examples are provided in this embodiment.

在第一种实现示例中,软件包构建装置200可以根据软件包之间的依赖关系,对需要构建软件包的多个软件进行分组,每个分组内的不同软件对应的软件包之间存在依赖关系,不同分组内的软件对应的软件包之间不存在依赖关系。这样,软件包构建装置200可以并行对多个分组内的软件执行构建软件包的过程,以此提高构建软件包的并发性,提高增量构建的效率。In the first implementation example, the software package construction device 200 can group multiple software that need to build a software package according to the dependency relationship between the software packages, and there is a dependency relationship between the software packages corresponding to different software in each group, and there is no dependency relationship between the software packages corresponding to software in different groups. In this way, the software package construction device 200 can execute the process of building a software package for the software in multiple groups in parallel, thereby improving the concurrency of building the software package and improving the efficiency of incremental construction.

相应地,软件包构建装置200执行增量构建的整体时长,即可以是为各个分组内的软件构建软件包所需耗时的最大值。如假设需要构建的多个软件可以划分为3组,分别为A组、B组以及C组,并且,软件包构建装置200为A组内的各个软件构建软件包所需的总耗时为5分钟,为B组内的各个软件构建软件包所需的总耗时为8分钟,为C组内的各个软件构建软件包所需的总耗时为6分钟,则,软件包构建装置200执行增量构建的整体时长可以是8分钟,也即为B组内的所有软件构建软件包所需的总耗时。Accordingly, the overall duration of the incremental construction performed by the software package construction device 200 may be the maximum time required to construct software packages for the software in each group. For example, assuming that the multiple software to be constructed can be divided into three groups, namely, group A, group B, and group C, and the total time required by the software package construction device 200 to construct software packages for each software in group A is 5 minutes, the total time required to construct software packages for each software in group B is 8 minutes, and the total time required to construct software packages for each software in group C is 6 minutes, then the overall duration of the incremental construction performed by the software package construction device 200 may be 8 minutes, which is the total time required to construct software packages for all software in group B.

在第二种实现示例中,软件包构建装置200可以确定构建列表中的不同软件之间的依赖关系(具体为不同软件对应的软件包之间的依赖关系),该依赖关系,包括直接依赖和间接依赖。其中,直接依赖,是指软件A对应的软件包直接依赖软件B对应的软件包中的至少一个子软件包,则软件A与软件B之间具有直接依赖关系。间接依赖,是指软件C对应的软件包直接依赖软件D对应的软件包中的至少一个子软件包,而软件D对应的软件包直接依赖软件E对应的软件包中的至少一个子软件包,则软件C与软件E之间具有间接依赖关系。并且,当多个软件之间依次具有依赖关系时,则多个软件之间构成依赖链,比如,软件a依赖软件b,软件b依赖软件c,软件c依赖软件d、软件d依赖软件e、软件e依赖软件f,则软件a、b、c、d、e、f之间构成依赖链,例如可以表示为“a→b→c→d→e→f”。In the second implementation example, the software package construction device 200 can determine the dependency relationship between different software in the construction list (specifically, the dependency relationship between the software packages corresponding to different software), and the dependency relationship includes direct dependency and indirect dependency. Wherein, direct dependency means that the software package corresponding to software A directly depends on at least one sub-package in the software package corresponding to software B, and software A and software B have a direct dependency relationship. Indirect dependency means that the software package corresponding to software C directly depends on at least one sub-package in the software package corresponding to software D, and the software package corresponding to software D directly depends on at least one sub-package in the software package corresponding to software E, and software C and software E have an indirect dependency relationship. In addition, when multiple software have dependencies in sequence, a dependency chain is formed between the multiple software, for example, software a depends on software b, software b depends on software c, software c depends on software d, software d depends on software e, and software e depends on software f, then software a, b, c, d, e, f form a dependency chain, which can be expressed as "a→b→c→d→e→f".

然后,软件包构建装置200可以确定依赖链包括的多个软件的数量。并且,当构成串行依赖的多个软件的数量超过阈值(如5等),软件包构建装置200可以对该依赖链进行截断,得到多个依赖链(或者称之为子依赖链),相邻两个依赖链之间具有相同的软件,并且,每个依赖链中的软件对应的软件包发生更新,对于构建其余依赖链中的软件对应的软件包不存在影响。比如,假设开发项目中包括第一软 件包、第二软件包以及第三软件包,并且第三软件包依赖第二软件包中的子软件包1、第二软件包中的子软件包2依赖第一软件包,则,软件包构建装置200可以将第一软件包以及第二软件包划入依赖链1,将第二软件包以及第二软件包划入依赖链2。这样,在重新构建出第二软件对应的软件包后,当第二软件包中的子软件包1发生变化,则依赖链2中的其余软件可以按照软件包之间的依赖关系重新构建软件包。而当子软件包1未发生变化,则软件包构建装置200可以根据依赖链1中的其余软件的源代码是否发生变化而决定是否构建其余软件。如此,软件包构建装置200可以根据各个软件的描述信息以及历史构建信息,并行构建各个依赖链所指示的待构建源代码,每个依赖链中的多个软件对应的软件包的构建先后顺序根据软件包之间的依赖关系进行确定,以此可以进一步提高增量构建软件包的效率。Then, the software package construction device 200 can determine the number of multiple software included in the dependency chain. And, when the number of multiple software constituting serial dependencies exceeds a threshold value (such as 5, etc.), the software package construction device 200 can truncate the dependency chain to obtain multiple dependency chains (or sub-dependency chains), where two adjacent dependency chains have the same software, and when the software package corresponding to the software in each dependency chain is updated, there is no impact on the construction of the software packages corresponding to the software in the remaining dependency chains. For example, suppose the development project includes the first software If there is a first software package, a second software package and a third software package, and the third software package depends on sub-package 1 in the second software package, and sub-package 2 in the second software package depends on the first software package, then the software package construction device 200 can classify the first software package and the second software package into dependency chain 1, and classify the second software package and the second software package into dependency chain 2. In this way, after the software package corresponding to the second software is reconstructed, when sub-package 1 in the second software package changes, the remaining software in dependency chain 2 can be reconstructed according to the dependency relationship between the software packages. When sub-package 1 does not change, the software package construction device 200 can decide whether to build the remaining software according to whether the source code of the remaining software in dependency chain 1 changes. In this way, the software package construction device 200 can build the source code to be built indicated by each dependency chain in parallel according to the description information and historical construction information of each software, and the construction order of the software packages corresponding to multiple software in each dependency chain is determined according to the dependency relationship between the software packages, so as to further improve the efficiency of incremental construction of software packages.

以依赖链为“a→b→c→d→e→f”为例,假设软件b对应的软件包依赖软件c对应的软件包中的子软件包1,软件c对应的软件包中的子软件包2依赖软件d对应的软件包,则软件d对应的软件包发生更新时,可以不影响软件c对应的软件包中的子软件包1,从而不影响软件b对应的软件包。因此,软件包构建装置200可以对该依赖链进行截断,得到依赖链1“a→b→c”以及依赖链2“c→d→e→f”,则软件包构建装置200为依赖链1以及依赖链2中的软件并行构建软件包,如软件包构建装置200可以同时为依赖链1中的软件c以及依赖链2中的软件f构建软件包等。Taking the dependency chain of "a→b→c→d→e→f" as an example, assuming that the software package corresponding to software b depends on sub-package 1 in the software package corresponding to software c, and sub-package 2 in the software package corresponding to software c depends on the software package corresponding to software d, then when the software package corresponding to software d is updated, it may not affect sub-package 1 in the software package corresponding to software c, and thus does not affect the software package corresponding to software b. Therefore, the software package construction device 200 can truncate the dependency chain to obtain dependency chain 1 "a→b→c" and dependency chain 2 "c→d→e→f", and then the software package construction device 200 can construct software packages for the software in dependency chain 1 and dependency chain 2 in parallel, such as the software package construction device 200 can simultaneously construct software packages for software c in dependency chain 1 and software f in dependency chain 2, etc.

可以理解,上述两种并行构建软件包的实现示例仅作为一种示例性说明,在其它实施例中,软件包构建装置200也可以采用其它方式并行构建多个软件包,如可以结合上述两个实例,为多个分组并行化构建软件包的同时,根据每个分组内的多个依赖链并行构建软件包。It can be understood that the above two implementation examples of building software packages in parallel are only used as an exemplary description. In other embodiments, the software package building device 200 can also use other methods to build multiple software packages in parallel. For example, the above two examples can be combined to build software packages for multiple groups in parallel, and software packages can be built in parallel according to multiple dependency chains in each group.

实际应用时,可能存在多个软件对应的软件包之间的依赖关系构成依赖环,如图4所示的依赖环,此时,软件包构建装置200可以根据历史构建信息,确定每个软件对应的软件包所依赖其它软件包中的子软件包,并根据其它软件包中的子软件包的变化对依赖环进行破环处理,具体可以将所依赖的子软件包未发生变化的软件作为破环点,以此可以将依赖环转换成依赖链,并根据依赖链所指示的软件包之间的依赖关系执行构建软件包的过程,以避免软件包构建装置200为依赖环中的多个软件重复构建软件包。In actual application, there may be dependency relationships between software packages corresponding to multiple software, forming a dependency loop, such as the dependency loop shown in FIG4 . In this case, the software package construction device 200 can determine the sub-software packages in other software packages that the software package corresponding to each software package depends on based on historical construction information, and break the dependency loop according to changes in the sub-software packages in other software packages. Specifically, the software whose sub-software packages have not changed can be used as the breaking point, so that the dependency loop can be converted into a dependency chain, and the process of building the software package is executed according to the dependency relationships between the software packages indicated by the dependency chain, so as to avoid the software package construction device 200 repeatedly building software packages for multiple software in the dependency loop.

以图4所示的依赖环为例,假设软件b对应的软件包依赖软件c对应的软件包中的子软件包1,软件c对应的软件包中的子软件包2依赖软件d对应的软件包,则软件d对应的软件包发生更新时,可以不影响软件c对应的软件包中的子软件包1,从而不影响软件b对应的软件包。此时,软件包构建装置200可以确定软件c作为该依赖环的破环点,并将依赖环转换成依赖链,如图4所示的依赖链“c→d→e→f→a→b→c”。如此,软件包构建装置200可以根据软件包之间的依赖关系,依次为该依赖链中的各个软件构建软件包,以此可以避免软件包构建装置为该依赖环中的多个软件循环重复构建软件包。Taking the dependency loop shown in FIG4 as an example, assuming that the software package corresponding to software b depends on sub-package 1 in the software package corresponding to software c, and sub-package 2 in the software package corresponding to software c depends on the software package corresponding to software d, when the software package corresponding to software d is updated, it may not affect sub-package 1 in the software package corresponding to software c, and thus will not affect the software package corresponding to software b. At this time, the software package construction device 200 can determine software c as the breaking point of the dependency loop, and convert the dependency loop into a dependency chain, such as the dependency chain "c→d→e→f→a→b→c" shown in FIG4. In this way, the software package construction device 200 can construct software packages for each software in the dependency chain in turn according to the dependency relationship between the software packages, so as to avoid the software package construction device from repeatedly constructing software packages for multiple software in the dependency loop.

进一步地,当构建列表中的部分软件属于多个依赖环中的软件时,该多个软件可以会构成复杂的依赖环,此时,软件包构建装置200可以基于上述方式对各个依赖环进行破环,并对破环后得到的依赖链中的各个软件包构建软件包;或者,软件包构建装置200可以先为构建列表中的软件执行一次软件包的构建过程,然后再基于上述方式对各个依赖环进行破环,并对破环后得到的依赖链中的各个软件包构建软件包。Furthermore, when some of the software in the build list belongs to software in multiple dependency rings, the multiple software may form a complex dependency ring. At this time, the software package construction device 200 can break each dependency ring based on the above method, and build a software package for each software package in the dependency chain obtained after the break; or, the software package construction device 200 can first execute a software package construction process for the software in the build list, and then break each dependency ring based on the above method, and build a software package for each software package in the dependency chain obtained after the break.

本实施例中,软件包构建装置200可以创建有数据库1,并且,该数据库1用于存储多个软件对应的软件包。则,在为第一软件以及第二软件构建出新的软件包后,软件包构建装置200可以利用该新的软件包对数据库1中存储的旧的软件包进行替换。具体实现时,软件包构建装置200可以利用基于待构建源代码得到的第一软件包替换数据库1中第一软件对应的历史软件包,并利用基于待构建源代码得到的第二软件包替换数据库1中第二软件对应的历史软件包,该数据库1中的其余软件包可以保持不变。如此,数据库1中所存储的软件包,为多个软件对应的最新版本的软件包,以此实现对多个软件的软件包的更新。In this embodiment, the software package construction device 200 can create a database 1, and the database 1 is used to store software packages corresponding to multiple software. Then, after constructing new software packages for the first software and the second software, the software package construction device 200 can use the new software package to replace the old software package stored in the database 1. In specific implementation, the software package construction device 200 can use the first software package obtained based on the source code to be constructed to replace the historical software package corresponding to the first software in the database 1, and use the second software package obtained based on the source code to be constructed to replace the historical software package corresponding to the second software in the database 1, and the remaining software packages in the database 1 can remain unchanged. In this way, the software packages stored in the database 1 are the latest versions of the software packages corresponding to the multiple software, thereby realizing the update of the software packages of the multiple software.

实际应用场景中,用户可能针对开发项目中的多个软件,在不同的时间段内多次对该多个软件的源代码进行更新,从而用户可以通过客户端100多次请求软件包构建装置200对该多个软件对应的软件包进行增量构建。因此,软件包构建装置200在构建得到第一软件包以及第二软件包后,可以存储本次增量构建后该多个软件的相关信息,例如可以是创建新的数据库3来存储该多个软件的待构建源代码的内容标识、每个软件对应的软件包中的各个子软件包的标识、不同软件对应的软件包之间的依赖关系等信息。如此,当用户再次通过客户端100请求为该多个软件增量构建软件包时,软件包构建装置200可以 基于数据库3中最新记录的信息(作为新的历史构建信息),为该多个软件增量构建软件包,其具体实现方式参见上述相关之处描述,在此不做重述。In actual application scenarios, users may update the source code of multiple software in a development project multiple times in different time periods, so that the user can request the software package construction device 200 to incrementally build the software packages corresponding to the multiple software through the client 100 multiple times. Therefore, after the software package construction device 200 constructs the first software package and the second software package, it can store the relevant information of the multiple software after this incremental construction, for example, it can create a new database 3 to store the content identifiers of the source code to be built of the multiple software, the identifiers of each sub-software package in the software package corresponding to each software, the dependency relationship between the software packages corresponding to different software, and other information. In this way, when the user requests to incrementally build software packages for the multiple software again through the client 100, the software package construction device 200 can Based on the latest recorded information in the database 3 (as new historical construction information), software packages are constructed for the multiple software increments. The specific implementation method is described in the above related parts and will not be repeated here.

并且,每次增量构建过程中,软件包构建装置200均可以创建新的数据库来记录增量构建后,该多个软件的源代码的内容标识、每个软件对应的软件包中的各个子软件包的标识、不同软件对应的软件包之间的依赖关系等信息均可以记录在该数据库中。这样,后续在对该多个软件进行问题追溯时,可以根据该数据库中记录的信息重复构建第一软件以及第二软件的分别对应的软件包,以便根据构建出的软件包分析问题根源。Furthermore, during each incremental build process, the software package building device 200 can create a new database to record the incremental build, and the content identifiers of the source codes of the multiple software, the identifiers of the sub-packages in the software package corresponding to each software, the dependency relationship between the software packages corresponding to different software, and other information can all be recorded in the database. In this way, when tracing problems of the multiple software later, the software packages corresponding to the first software and the second software can be repeatedly built according to the information recorded in the database, so as to analyze the root cause of the problem according to the built software packages.

需要说明的是,图2所示的方法步骤仅作为一种示例性说明,在其它可能的实施例中,可以在图2所示的方法步骤的基础上,增加、或者删除、或者替换部分步骤,如可以删除步骤S201以及步骤S202,或者用户可以直接通过客户端100向软件包构建装置200发送各个软件的待构建源代码等。It should be noted that the method steps shown in FIG. 2 are only used as an exemplary description. In other possible embodiments, on the basis of the method steps shown in FIG. 2 , some steps may be added, deleted, or replaced. For example, step S201 and step S202 may be deleted, or the user may directly send the source code to be built of each software to the software package building device 200 through the client 100.

本实施例中,由于在为多个软件增量构建软件包的过程中,软件包构建装置200会先确定该多个软件中需要重新构建软件包的全部软件的描述信息,然后再根据该描述信息以及软件包之间的依赖关系优先对第一软件的源代码进行构建,这使得在整个增量构建过程中,第一软件的源代码可以不用被重复多次构建,如可以仅被构建一次,以此可以避免第一软件的源代码被重复多次的无效构建,从而可以提高软件包的增量构建效率,提高开发项目的整体开发效率。并且,由于软件包构建装置200能够确定需要重新构建的全部软件的源代码,并且,每个软件的源代码可以仅被构建一次,因此,软件包构建装置200可以预估出构建这些软件的源代码对应的软件包所需的总耗时,从而可以预估出增量构建过程的结束时间,方便用户感知,以此提高用户体验。In this embodiment, in the process of incrementally building software packages for multiple softwares, the software package construction device 200 first determines the description information of all the softwares that need to rebuild the software packages among the multiple softwares, and then preferentially builds the source code of the first software according to the description information and the dependency relationship between the software packages, so that in the entire incremental construction process, the source code of the first software does not need to be repeatedly built multiple times, such as being built only once, so as to avoid invalid construction of the source code of the first software being repeatedly built multiple times, thereby improving the incremental construction efficiency of the software package and improving the overall development efficiency of the development project. In addition, since the software package construction device 200 can determine the source code of all the softwares that need to be rebuilt, and the source code of each software can be built only once, the software package construction device 200 can estimate the total time required to build the software packages corresponding to the source code of these softwares, so as to estimate the end time of the incremental construction process, which is convenient for user perception, thereby improving the user experience.

下面结合具体的应用场景,对本发明的技术方案进行示例性说明。The technical solution of the present invention is exemplarily described below in conjunction with specific application scenarios.

参见图5以及图6,其中,图5示出了另一种软件包构建系统的结构示意图,图6示出了另一种软件包构建方法的流程示意图。5 and 6 , wherein FIG. 5 shows a schematic diagram of the structure of another software package construction system, and FIG. 6 shows a schematic diagram of the flow of another software package construction method.

如图5所示,上述软件包构建装置200可以包括多个服务,分别为项目管理服务201、代码获取服务202、任务管理服务203、资源调度服务204、数据库创建服务205,并且,软件包构建装置200还包括存储服务206以及执行模块207,并且可以对外连接第三方托管平台300。As shown in Figure 5, the above-mentioned software package construction device 200 may include multiple services, namely project management service 201, code acquisition service 202, task management service 203, resource scheduling service 204, and database creation service 205. In addition, the software package construction device 200 also includes a storage service 206 and an execution module 207, and can be connected to a third-party hosting platform 300 externally.

其中,项目管理服务201,用于对开发项目进行管理,具体可以是管理该开发项目中各个软件的源代码在第三方托管平台300上的存储地址、各个软件对应的软件包、开发项目所支持的架构(如X86架构或者ARM架构等)、该开发项目所依赖的数据库等。并且,项目管理服务201,还用于与客户端100进行交互。The project management service 201 is used to manage the development project, specifically, it can manage the storage address of the source code of each software in the development project on the third-party hosting platform 300, the software package corresponding to each software, the architecture supported by the development project (such as X86 architecture or ARM architecture, etc.), the database that the development project relies on, etc. In addition, the project management service 201 is also used to interact with the client 100.

代码获取服务202,用于从第三方托管平台300中拉取开发项目中的多个软件的源代码。The code acquisition service 202 is used to pull the source codes of multiple software in the development project from the third-party hosting platform 300 .

任务管理服务203,用于生成全量构建任务或者增量构建任务,并下发任务。The task management service 203 is used to generate full build tasks or incremental build tasks and issue tasks.

资源调度服务204,用于根据接收到的任务进行相应的资源调度,以执行该任务。The resource scheduling service 204 is used to perform corresponding resource scheduling according to the received task to execute the task.

数据库创建服务205,用于创建数据库,以存储全量构建或者增量构建过程中所生成的信息。The database creation service 205 is used to create a database to store information generated during the full build or incremental build process.

存储服务206,用于存储数据,如存储软件的源代码、软件包、上述历史构建信息等。示例性地,存储服务206,可以包括多个数据库,并且不同数据库可以用于存储不同类型的数据,如数据库1用于存储源代码、数据库2用于存储软件包、数据库3用于存储上述历史构建信息等。The storage service 206 is used to store data, such as the source code, software package, the above historical build information, etc. Exemplarily, the storage service 206 may include multiple databases, and different databases may be used to store different types of data, such as database 1 for storing source code, database 2 for storing software packages, and database 3 for storing the above historical build information, etc.

执行模块207,用于在资源调度服务204的调度下,执行相应的全量构建任务或者增量构建任务。The execution module 207 is used to execute the corresponding full build task or incremental build task under the scheduling of the resource scheduling service 204.

参见图6,图6所示的软件包构建方法具体可以包括:Referring to FIG. 6 , the software package construction method shown in FIG. 6 may specifically include:

S601:项目管理服务201接收用户通过客户端100发送的增量构建请求。S601 : the project management service 201 receives an incremental build request sent by a user through the client 100 .

实际应用时,用户可以通过客户端100向第三方托管平台300提交开发项目中的部分软件的新的源代码,并在完成新的源代码的提交后,通过客户端100请求软件包构建装置200为该多个软件增量构建软件包。In actual application, the user can submit new source code of some software in the development project to the third-party hosting platform 300 through the client 100, and after completing the submission of the new source code, request the software package construction device 200 to construct software packages for the multiple software increments through the client 100.

示例性地,增量构建请求中可以包括开发项目的标识,以便利用该标识指示对哪个开发项目中包括的多个软件进行增量构建软件包。Exemplarily, the incremental build request may include an identifier of a development project, so as to use the identifier to indicate the development project for which the multiple software packages are to be incrementally built.

需要说明的是,本实施例中重点介绍软件构建装置200对开发项目中的多个软件进行增量构建的过程,实际应用时,用户也可以通过客户端100向项目管理服务201发送全量构建请求,以请求软件包构 建装置200为该多个软件全量构建软件包。It should be noted that this embodiment focuses on the process of incrementally building multiple software in the development project by the software building device 200. In actual application, the user can also send a full build request to the project management service 201 through the client 100 to request the software package to be built. The construction device 200 builds a software package for the multiple software in full.

其中,代码获取服务202可以对获取的候选源代码进行快照,得到各个软件的候选源代码的内容标识。The code acquisition service 202 may take a snapshot of the acquired candidate source codes to obtain content identifiers of the candidate source codes of various software.

S602:项目管理服务201指示代码获取服务202获取开发项目中的全部软件的候选源代码的内容标识。S602: The project management service 201 instructs the code acquisition service 202 to acquire content identifiers of candidate source codes of all software in the development project.

S603:代码获取服务202访问第三方托管平台300,快照得到开发项目中的全部软件的候选源代码的内容标识,并将各个软件的候选源代码的内容标识反馈给项目管理服务201。S603 : the code acquisition service 202 accesses the third-party hosting platform 300 , obtains the content identifiers of the candidate source codes of all the software in the development project through a snapshot, and feeds back the content identifiers of the candidate source codes of each software to the project management service 201 .

S604:项目管理服务201生成增量构建任务,并将增量构建任务以及多个软件的候选源代码分别对应的内容标识下发给任务管理服务203。S604: the project management service 201 generates an incremental build task, and sends the incremental build task and the content identifiers corresponding to the candidate source codes of the plurality of software to the task management service 203 .

S605:任务管理服务203根据接收到的多个软件的候选源代码分别对应的内容标识、存储服务206中记录的历史构建信息,生成构建列表,该构建列表包括需要构建软件包的多个软件的描述信息。S605: The task management service 203 generates a build list according to the content identifiers corresponding to the received candidate source codes of the multiple software and the historical build information recorded in the storage service 206. The build list includes description information of the multiple software packages that need to be built.

示例性地,该描述信息例如可以包括软件的候选源代码的内容标识以及存储地址等。Exemplarily, the description information may include, for example, a content identifier and a storage address of the candidate source code of the software.

其中,任务管理服务203生成构建列表的具体实现过程,可以参见上述图2所示实施例中确定第一软件以及第二软件的描述信息的过程的相关之处描述,在此不做赘述。The specific implementation process of the task management service 203 generating the construction list can refer to the relevant description of the process of determining the description information of the first software and the second software in the embodiment shown in FIG. 2 , which will not be described in detail here.

S606:任务管理服务203根据构建列表,指示代码获取服务202获取构建列表所指示的多个软件的待构建源代码。S606: The task management service 203 instructs the code acquisition service 202 to acquire the to-be-built source codes of the multiple softwares indicated in the build list according to the build list.

此时,构建列表中所指示的多个软件的候选源代码即作为确定需要进行构建的源代码,以下称之为待构建源代码,表征需要根据该待构建源代码为该多个软件重新构建软件包。因此,任务管理服务203可以指示代码获取服务202,获取重新构建软件包所需的待构建源代码。At this time, the candidate source codes of the multiple software indicated in the build list are determined as the source codes that need to be built, hereinafter referred to as the source codes to be built, indicating that the software packages need to be rebuilt for the multiple software according to the source codes to be built. Therefore, the task management service 203 can instruct the code acquisition service 202 to acquire the source codes to be built required for rebuilding the software packages.

S607:代码获取服务202从第三方托管平台300拉取构建列表中所指示的多个软件的待构建源代码,并将拉取的待构建源代码保存在存储服务206中。S607 : the code acquisition service 202 pulls the source codes to be built of the multiple software indicated in the build list from the third-party hosting platform 300 , and saves the pulled source codes to be built in the storage service 206 .

S608:任务管理服务203生成包括该构建列表的任务,并将该任务下发给资源调度服务204。S608 : The task management service 203 generates a task including the build list, and sends the task to the resource scheduling service 204 .

S609:资源调度服务204为该任务执行相应的资源调度,并根据资源调度结果将包括构建列表的任务下发给执行模块207。S609: the resource scheduling service 204 performs corresponding resource scheduling for the task, and sends the task including the building list to the execution module 207 according to the resource scheduling result.

S610:执行模块207执行任务,根据存储服务206中保存的待构建源代码以及构建列表,构建相应的软件包,并向数据库创建服务205反馈执行结果。S610 : the execution module 207 executes the task, builds the corresponding software package according to the source code to be built and the build list stored in the storage service 206 , and feeds back the execution result to the database creation service 205 .

其中,执行模块207根据构建列表中的描述信息为多个软件构建软件包的具体实现过程,可以参见上述图2所示实施例中为第一软件以及第二软件构建软件包的过程的相关之处描述,在此不做赘述。Among them, the specific implementation process of the execution module 207 building software packages for multiple software according to the description information in the construction list can refer to the relevant description of the process of building software packages for the first software and the second software in the embodiment shown in Figure 2 above, which will not be repeated here.

执行模块207所反馈的执行结果,可以包括源代码的内容标识、所生成的软件包、不同软件包之间的依赖关系等信息。The execution result fed back by the execution module 207 may include information such as content identification of the source code, generated software packages, and dependencies between different software packages.

S611:数据库创建服务205在存储服务206中创建新的数据库,并利用该新的数据库记录该执行结果。S611: The database creation service 205 creates a new database in the storage service 206, and uses the new database to record the execution result.

S612:数据库创建服务205向任务管理服务203反馈执行结果,以此实现为开发项目中的多个软件增量构建软件包。S612: The database creation service 205 feeds back the execution result to the task management service 203, thereby building software packages for multiple software increments in the development project.

如此,在整个增量构建过程中,可以避免开发项目中的部分软件的源代码被重复多次的无效构建,从而可以提高软件包的增量构建效率,提高开发项目的整体开发效率。In this way, during the entire incremental build process, the invalid construction of the source code of some software in the development project can be avoided by repeated construction, thereby improving the incremental build efficiency of the software package and improving the overall development efficiency of the development project.

实际应用时,当软件包构建系统部署于用户的终端设备上时,软件包构建装置200中的多个服务,可以在本地的终端设备上执行增量构建过程,此时,该软件包构建系统可以不包括上述图5所示的客户端100,从而项目管理服务201可以基于用户在该终端设备上所执行的操作,开始执行增量构建过程,而代码获取服务202可以第三方托管平台300获取候选源代码,也可以是由用户向该终端设备提供候选源代码。软件包构建装置200中的其余服务在增量构建过程中所执行的操作,可以参见上述图6所示的相关之处描述,在此不做赘述。In actual application, when the software package construction system is deployed on the user's terminal device, multiple services in the software package construction device 200 can perform an incremental construction process on the local terminal device. At this time, the software package construction system may not include the client 100 shown in Figure 5 above, so that the project management service 201 can start the incremental construction process based on the operation performed by the user on the terminal device, and the code acquisition service 202 can obtain the candidate source code from the third-party hosting platform 300, or the user can provide the candidate source code to the terminal device. The operations performed by the remaining services in the software package construction device 200 during the incremental construction process can be described in the relevant parts shown in Figure 6 above, and will not be repeated here.

值得注意的是,本领域的技术人员根据以上描述的内容,能够想到的其他合理的步骤组合,也属于本申请的保护范围内。其次,本领域技术人员也应该熟悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请所必须的。It is worth noting that other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be familiar with the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.

以上结合图1至图6对本申请实施例提供的软件包构建方法进行介绍,接下来结合附图对本申请实 施例提供的软件包构建装置的功能以及实现该软件包构建装置的计算设备进行介绍。The software package construction method provided in the embodiment of the present application is introduced above in conjunction with Figures 1 to 6. Next, the software package construction method provided in the embodiment of the present application is introduced in conjunction with the accompanying drawings. The functions of the software package construction device provided by the embodiment and the computing device implementing the software package construction device are introduced.

参见图7,示出了一种软件包构建装置的结构示意图。图7所示的软件包构建装置700可以对应于上述图2以及图5所示的软件包构建装置200。Referring to Fig. 7, a schematic diagram of the structure of a software package construction device is shown. The software package construction device 700 shown in Fig. 7 may correspond to the software package construction device 200 shown in Fig. 2 and Fig. 5 above.

如图7所示,软件包构建装置700可以包括:As shown in FIG. 7 , the software package construction device 700 may include:

获取模块701,用于获取多个软件的历史构建信息,历史构建信息包括历史时间段内为多个软件所构建的软件包的相关信息;An acquisition module 701 is used to acquire historical build information of multiple software, where the historical build information includes relevant information of software packages built for the multiple software within a historical time period;

确定模块702,用于确定多个软件中的第一软件的第一描述信息,第一软件的待构建源代码与第一软件的已构建源代码存在差异;根据历史构建信息,确定多个软件中的第二软件的第二描述信息,第二软件对应的第二软件包依赖第一软件对应的第一软件包;The determination module 702 is used to determine first description information of a first software among the multiple software, where the source code to be built of the first software is different from the built source code of the first software; and to determine second description information of a second software among the multiple software according to the historical build information, where a second software package corresponding to the second software depends on a first software package corresponding to the first software;

构建模块703,用于根据第一描述信息、第二描述信息、以及历史构建信息,对第一软件的待构建源代码以及第二软件的待构建源代码分别进行构建,得到第一软件包与第二软件包,第一软件的待构建源代码先于第二软件的待构建源代码进行构建。The construction module 703 is used to construct the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information, and the historical construction information to obtain the first software package and the second software package, and the source code to be constructed of the first software is constructed before the source code to be constructed of the second software.

在一种可能的实施方式中,构建模块703,用于:In a possible implementation, the construction module 703 is used to:

根据第一描述信息,对第一软件的待构建源代码进行构建,得到第一软件包;Building the source code to be built of the first software according to the first description information to obtain a first software package;

根据历史构建信息,确定第二软件包所依赖的第一软件包中的子软件包发生变化;Determining, according to the historical build information, that a sub-package in the first software package on which the second software package depends has changed;

根据第二描述信息,对第二软件的待构建源代码进行构建,得到第二软件包。The source code to be built of the second software is built according to the second description information to obtain a second software package.

在一种可能的实施方式中,第一软件包包括多个子软件包,多个子软件包中的每个子软件包用于实现第一软件的至少一个功能;In a possible implementation, the first software package includes a plurality of sub-software packages, and each of the plurality of sub-software packages is used to implement at least one function of the first software;

构建模块703,用于:Building block 703 is used to:

根据历史构建信息,确定第二软件对应的历史软件包依赖的第二子软件包的标识,历史软件包通过对第二软件的已构建源代码进行构建得到;Determine, according to the historical build information, an identifier of a second sub-software package that a historical software package corresponding to the second software depends on, where the historical software package is obtained by building the built source code of the second software;

根据第二子软件包的标识,检测第一软件包中不存在与第二子软件包相匹配的第一子软件包。According to the identifier of the second sub-software package, it is detected that no first sub-software package matching the second sub-software package exists in the first software package.

在一种可能的实施方式中,多个软件还包括第三软件,第三软件对应的软件包依赖第二软件包;In a possible implementation, the plurality of software further includes a third software, and a software package corresponding to the third software package depends on the second software package;

构建模块703,用于:Building block 703 is used to:

根据历史构建信息,确定第一软件包、第二软件包以及第三软件包之间的依赖关系;Determine, according to the historical build information, a dependency relationship between the first software package, the second software package, and the third software package;

根据第一软件包、第二软件包以及第三软件包之间的依赖关系,生成第一依赖链以及第二依赖链,第一依赖链指示第一软件的待构建源代码先于第二软件的待构建源代码进行构建,第二依赖链指示第二软件的待构建源代码先于第三软件的待构建源代码进行构建;Generate a first dependency chain and a second dependency chain according to the dependency relationship between the first software package, the second software package, and the third software package, the first dependency chain indicating that the source code to be built of the first software is built before the source code to be built of the second software, and the second dependency chain indicating that the source code to be built of the second software is built before the source code to be built of the third software;

根据第一描述信息、第二描述信息、第三软件的第三描述信息,并行构建第一依赖链中指示的待构建源代码以及第二依赖链中指示的待构建源代码。According to the first description information, the second description information, and the third description information of the third software, the source code to be built indicated in the first dependency chain and the source code to be built indicated in the second dependency chain are built in parallel.

在一种可能的实施方式中,第三软件对应的第三软件包依赖第二软件包中的第三子软件包,第二软件包中的第四子软件包依赖第一软件包,则,基于第二软件的待构建源代码构建得到第二软件包后,第三软件对应的软件包所依赖的子软件包变更为第三子软件包。In a possible implementation, a third software package corresponding to the third software depends on a third sub-package in the second software package, and a fourth sub-package in the second software package depends on the first software package. After the second software package is built based on the source code to be built of the second software package, the sub-package on which the software package corresponding to the third software depends is changed to the third sub-package.

在一种可能的实施方式中,历史构建信息还包括第一软件的已构建源代码的内容标识;In a possible implementation, the historical build information further includes a content identifier of the built source code of the first software;

确定模块702,用于:The determination module 702 is used to:

获取第一软件的候选源代码的内容标识;Obtaining a content identifier of a candidate source code of the first software;

当第一软件的候选源代码的内容标识与第一软件的已构建源代码的内容标识不一致时,确定多个软件中的第一软件的第一描述信息,该第一软件的待构建源代码也即为该候选源代码,第一描述信息包括第一软件的内容标识、针对第一软件的已构建源代码的存储位置的指示信息。When the content identifier of the candidate source code of the first software is inconsistent with the content identifier of the constructed source code of the first software, first description information of the first software among the multiple software is determined, and the source code to be constructed of the first software is also the candidate source code. The first description information includes the content identifier of the first software and indication information of the storage location of the constructed source code of the first software.

在一种可能的实施方式中,历史构建信息包括第二软件对应的历史软件包与第一软件对应的历史软件包之间的依赖关系,第二软件对应的历史软件包通过对第二软件的已构建源代码进行构建得到,第一软件对应的历史软件包通过对第一软件的已构建源代码进行构建得到;In a possible implementation, the historical build information includes a dependency relationship between a historical software package corresponding to the second software and a historical software package corresponding to the first software, the historical software package corresponding to the second software being obtained by building the built source code of the second software, and the historical software package corresponding to the first software being obtained by building the built source code of the first software;

确定模块702,用于:The determination module 702 is used to:

根据历史构建信息,从多个软件中检测到存在第二软件对应的历史软件包与第一软件对应的历史软件包之间存在依赖关系;According to the historical build information, detecting from the plurality of software that there is a dependency relationship between the historical software package corresponding to the second software and the historical software package corresponding to the first software;

确定第二软件的第二描述信息,第二描述信息包括第二软件的内容标识、针对第二软件的已构建源 代码的存储位置的指示信息。Determine second description information of the second software, the second description information including the content identifier of the second software, the built source code of the second software An indication of where the code is stored.

在一种可能的实施方式中,软件包构建装置700还包括:In a possible implementation, the software package construction device 700 further includes:

存储模块704,用于存储第一软件的待构建源代码的内容标识、第一软件包包括的子软件包的标识、第二软件的待构建源代码的内容标识、第二软件包包括的子软件包的标识、第一软件包与第二软件包之间的依赖关系。The storage module 704 is used to store the content identifier of the source code to be built of the first software, the identifier of the sub-package included in the first software package, the content identifier of the source code to be built of the second software, the identifier of the sub-package included in the second software package, and the dependency relationship between the first software package and the second software package.

在一种可能的实施方式中,软件包构建装置700还包括:In a possible implementation, the software package construction device 700 further includes:

替换模块705,用于利用第一软件包替换第二数据库中第一软件对应的历史软件包,利用第二软件包替换第二数据库中第二软件对应的历史软件包;A replacement module 705, configured to replace the historical software package corresponding to the first software in the second database with the first software package, and to replace the historical software package corresponding to the second software in the second database with the second software package;

其中,第二数据库包括多个软件分别对应的历史软件包,第一软件对应的历史软件包通过对第一软件的已构建源代码进行构建得到,第二软件对应的历史软件包通过对第二软件的已构建源代码进行构建得到。The second database includes historical software packages corresponding to multiple software respectively. The historical software package corresponding to the first software is obtained by constructing the constructed source code of the first software, and the historical software package corresponding to the second software is obtained by constructing the constructed source code of the second software.

由于图7所示的软件包构建装置700对应于图2所示的方法实施例中的软件包构建装置200,故图7所示的软件包构建装置700的具体实现方式及其所具有的技术效果,可以参见前述实施例中的相关之处描述,在此不做赘述。Since the software package construction device 700 shown in FIG. 7 corresponds to the software package construction device 200 in the method embodiment shown in FIG. 2 , the specific implementation of the software package construction device 700 shown in FIG. 7 and its technical effects can be found in the relevant descriptions in the aforementioned embodiments and will not be described in detail here.

参见图8,示出了一种软件包构建装置的结构示意图。图8所示的软件包构建装置800可以对应于上述图2所示的软件包构建装置200,具体可以是用于执行图2所示实施例中的步骤S203至步骤S205。Referring to Fig. 8, a schematic diagram of the structure of a software package construction device is shown. The software package construction device 800 shown in Fig. 8 may correspond to the software package construction device 200 shown in Fig. 2, and may be used to execute steps S203 to S205 in the embodiment shown in Fig. 2.

如图8所示,软件包构建装置800具体可以包括:As shown in FIG8 , the software package construction device 800 may specifically include:

获取模块801,用于获取多个软件的历史构建信息,历史构建信息包括历史时间段内为多个软件所构建的软件包的相关信息;An acquisition module 801 is used to acquire historical build information of multiple software, where the historical build information includes relevant information of software packages built for the multiple software within a historical time period;

确定模块802,用于确定多个软件中的第一软件的第一描述信息,第一软件的待构建源代码与第一软件的已构建源代码存在差异;根据历史构建信息,确定多个软件中的第二软件的第二描述信息,第二软件对应的第二软件包依赖第一软件对应的第一软件包;The determination module 802 is used to determine first description information of a first software among the multiple software, where the source code to be built of the first software is different from the built source code of the first software; and to determine second description information of a second software among the multiple software according to the historical build information, where a second software package corresponding to the second software depends on a first software package corresponding to the first software;

其中,第一描述信息以及第二描述信息,用于指示对第一软件对应的第一软件包以及第二软件对应的第二软件包进行构建。The first description information and the second description information are used to indicate the construction of a first software package corresponding to the first software and a second software package corresponding to the second software.

由于图8所示的软件包构建装置800对应于图2所示的方法实施例中的软件包构建装置200,故图8所示的软件包构建装置800的具体实现方式及其所具有的技术效果,可以参见前述实施例中的相关之处描述,在此不做赘述。Since the software package construction device 800 shown in FIG. 8 corresponds to the software package construction device 200 in the method embodiment shown in FIG. 2 , the specific implementation of the software package construction device 800 shown in FIG. 8 and its technical effects can be found in the relevant descriptions in the aforementioned embodiments and will not be described in detail here.

上述图7以及图8所示实施例中,针对软件包构建过程中所涉及到的软件包构建装置可以是配置于计算设备或者计算设备集群上的软件,并且,通过在计算设备或者计算设备集群上运行该软件,可以使得计算设备或者计算设备集群实现上述软件包构建装置200所具有的功能。下面,基于硬件设备实现的角度,对软件包构建的过程中所涉及的软件包构建装置200进行详细介绍。In the embodiments shown in FIG. 7 and FIG. 8 , the software package construction device involved in the software package construction process may be software configured on a computing device or a computing device cluster, and by running the software on the computing device or the computing device cluster, the computing device or the computing device cluster may implement the functions of the software package construction device 200. Below, based on the perspective of hardware device implementation, the software package construction device 200 involved in the software package construction process is described in detail.

图9示出了一种计算设备的结构示意图,上述软件包构建装置200可以部署在该计算设备上,该计算设备可以是云环境中的计算设备(如服务器),或边缘环境中的计算设备,或终端设备等具体可以用于实现上述图2所示实施例中软件包构建装置200的功能。FIG9 shows a schematic diagram of the structure of a computing device, on which the software package construction device 200 can be deployed. The computing device can be a computing device in a cloud environment (such as a server), or a computing device in an edge environment, or a terminal device, etc., which can be specifically used to implement the functions of the software package construction device 200 in the embodiment shown in FIG2 .

如图9所示,计算设备900包括处理器910、存储器920、通信接口930和总线940。处理器910、存储器920和通信接口930之间通过总线940通信。总线940可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。通信接口930用于与外部通信,例如接收用户提供的配置信息、分批信息等。As shown in FIG9 , the computing device 900 includes a processor 910, a memory 920, a communication interface 930, and a bus 940. The processor 910, the memory 920, and the communication interface 930 communicate with each other through the bus 940. The bus 940 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, FIG9 is represented by only one thick line, but it does not mean that there is only one bus or one type of bus. The communication interface 930 is used to communicate with the outside, such as receiving configuration information and batch information provided by the user.

其中,处理器910可以为中央处理器(central processing unit,CPU)、专用集成电路(application specific integrated circuit,ASIC)、图形处理器(graphics processing unit,GPU)或者一个或多个集成电路。处理器910还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,软件包构建装置200中各个模块的功能可以通过处理器910中的硬件的集成逻辑电路或者软件形式的指令完成。处理器910还可以是通用处理器、数据信号处理器(digital signal process,DSP)、现场可编程逻辑门阵列(field programmable  gate array,FPGA)或者其他可编程逻辑器件,分立门或者晶体管逻辑器件,分立硬件组件,可以实现或者执行本申请实施例中公开的方法、步骤及逻辑框图。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,结合本申请实施例所公开的方法可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器、闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器920,处理器910读取存储器920中的信息,结合其硬件完成软件包构建装置200中的部分或全部功能。The processor 910 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits. The processor 910 may also be an integrated circuit chip having signal processing capabilities. In the implementation process, the functions of each module in the software package construction device 200 may be completed by hardware integrated logic circuits in the processor 910 or instructions in software form. The processor 910 may also be a general-purpose processor, a digital signal processor (DSP), a field programmable gate array (FPGA), or a processor that can process signals. Gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. Among them, the general processor can be a microprocessor or the processor can also be any conventional processor, etc., and the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 920, and the processor 910 reads the information in the memory 920, and completes part or all of the functions in the software package construction device 200 in combination with its hardware.

存储器920可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器920还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,HDD或SSD。The memory 920 may include a volatile memory, such as a random access memory (RAM). The memory 920 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a HDD, or a SSD.

存储器920中存储有可执行代码,处理器910执行该可执行代码以执行前述软件包构建装置200所执行的方法。The memory 920 stores executable codes, and the processor 910 executes the executable codes to execute the method executed by the aforementioned software package construction device 200 .

具体地,在实现图2所示实施例的情况下,且图2所示实施例中所描述的软件包构建装置200为通过软件实现的情况下,执行图2的软件包构建装置200的功能所需的软件或程序代码存储在存储器920中,软件包构建装置200与其它设备的交互通过通信接口930实现,处理器用于执行存储器920中的指令,实现上述软件包构建装置200所执行的方法。Specifically, in the case of implementing the embodiment shown in FIG. 2 , and in the case where the software package construction device 200 described in the embodiment shown in FIG. 2 is implemented by software, the software or program code required to execute the functions of the software package construction device 200 of FIG. 2 is stored in the memory 920, and the interaction between the software package construction device 200 and other devices is implemented through the communication interface 930. The processor is used to execute the instructions in the memory 920 to implement the method executed by the above-mentioned software package construction device 200.

图10示出的一种计算设备集群的结构示意图。其中,图10所示的计算设备集群10包括多个计算设备,上述软件包构建装置200可以分布式地部署在该计算设备集群10中的多个计算设备上。如图10所示,计算设备集群10包括多个计算设备1000,每个计算设备1000包括存储器1020、处理器1010、通信接口1030以及总线1040,其中,存储器1020、处理器1010、通信接口1030通过总线1040实现彼此之间的通信连接。FIG10 is a schematic diagram of the structure of a computing device cluster. The computing device cluster 10 shown in FIG10 includes multiple computing devices, and the software package construction device 200 can be distributedly deployed on multiple computing devices in the computing device cluster 10. As shown in FIG10 , the computing device cluster 10 includes multiple computing devices 1000, each computing device 1000 includes a memory 1020, a processor 1010, a communication interface 1030 and a bus 1040, wherein the memory 1020, the processor 1010, and the communication interface 1030 are connected to each other through the bus 1040.

处理器1010可以采用CPU、GPU、ASIC或者一个或多个集成电路。处理器1010还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,软件包构建装置200的部分功能可用通过处理器1010中的硬件的集成逻辑电路或者软件形式的指令完成。处理器1010还可以是DSP、FPGA、通用处理器、其他可编程逻辑器件,分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的部分方法、步骤及逻辑框图。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器、闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1020,在每个计算设备1000中,处理器1010读取存储器1020中的信息,结合其硬件可以完成软件包构建装置200的部分功能。The processor 1010 may be a CPU, a GPU, an ASIC or one or more integrated circuits. The processor 1010 may also be an integrated circuit chip having signal processing capabilities. In the implementation process, some functions of the software package construction device 200 may be completed by the hardware integrated logic circuit or software instructions in the processor 1010. The processor 1010 may also be a DSP, an FPGA, a general processor, other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and may implement or execute some of the methods, steps and logic block diagrams disclosed in the embodiments of the present application. Among them, the general processor may be a microprocessor or the processor may also be any conventional processor, etc., and the steps of the method disclosed in the embodiments of the present application may be directly embodied as a hardware decoding processor for execution, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1020. In each computing device 1000, the processor 1010 reads the information in the memory 1020 and can complete part of the functions of the software package construction device 200 in combination with its hardware.

存储器1020可以包括ROM、RAM、静态存储设备、动态存储设备、硬盘(例如SSD、HDD)等。存储器1020可以存储程序代码,例如,用于实现软件包构建装置200的部分程序代码等。针对每个计算设备1000,当存储器1020中存储的程序代码被处理器1010执行时,处理器1010基于通信接口1030执行软件包构建装置200所执行的部分方法,如其中一部分计算设备1000可以用于执行上述步骤S203至步骤S205所述的方法,另一部分计算设备1000用于执行上述步骤S206所述的方法。存储器1020还可以存储数据,例如:处理器1010在执行过程中产生的中间数据或结果数据,例如,上述历史构建信息、第一软件包、第二软件包等。The memory 1020 may include ROM, RAM, static storage device, dynamic storage device, hard disk (e.g., SSD, HDD), etc. The memory 1020 may store program codes, for example, part of the program codes for implementing the software package construction device 200, etc. For each computing device 1000, when the program codes stored in the memory 1020 are executed by the processor 1010, the processor 1010 executes part of the method executed by the software package construction device 200 based on the communication interface 1030, such as one part of the computing devices 1000 may be used to execute the method described in steps S203 to S205, and another part of the computing devices 1000 may be used to execute the method described in step S206. The memory 1020 may also store data, for example: intermediate data or result data generated by the processor 1010 during the execution process, for example, the above-mentioned historical construction information, the first software package, the second software package, etc.

每个计算设备1000中的通信接口1030用于与外部通信,例如与其它计算设备1000进行交互等。The communication interface 1030 in each computing device 1000 is used for communicating with the outside, such as interacting with other computing devices 1000 .

总线1040可以是外设部件互连标准总线或扩展工业标准结构总线等。为便于表示,图10中每个计算设备1000内的总线1040仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 1040 may be a peripheral component interconnect standard bus or an extended industry standard architecture bus, etc. For ease of representation, the bus 1040 in each computing device 1000 in FIG. 10 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

上述多个计算设备1000之间通过通信网络建立通信通路,以实现软件包构建装置200的功能。任一计算设备可以是云环境中的计算设备(例如,服务器),或边缘环境中的计算设备,或终端设备。The plurality of computing devices 1000 establish communication paths through a communication network to implement the functions of the software package construction apparatus 200. Any computing device may be a computing device in a cloud environment (eg, a server), or a computing device in an edge environment, or a terminal device.

本申请实施例还提供了一种计算机可读存储介质。所述计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘)等。 该计算机可读存储介质包括指令,所述指令指示计算设备执行上述软件包构建方法。The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions, and the instructions instruct a computing device to execute the software package building method.

本申请实施例还提供了一种计算机程序产品。所述计算机程序产品包括一个或多个计算机指令。在计算设备上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。The embodiment of the present application also provides a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.

所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机或数据中心进行传输。The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

所述计算机程序产品可以为一个软件安装包,在需要使用前述软件包构建方法的任一方法的情况下,可以下载该计算机程序产品并在计算设备上执行该计算机程序产品。The computer program product may be a software installation package, which may be downloaded and executed on a computing device when any of the aforementioned software package construction methods is required.

上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘。The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。 The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims (23)

一种软件包构建方法,其特征在于,所述方法包括:A method for building a software package, characterized in that the method comprises: 获取所述多个软件的历史构建信息,所述历史构建信息包括历史时间段内为所述多个软件所构建的软件包的相关信息;Acquire historical construction information of the plurality of software, wherein the historical construction information includes relevant information of software packages constructed for the plurality of software within a historical time period; 确定所述多个软件中的第一软件的第一描述信息,所述第一软件的待构建源代码与所述第一软件的已构建源代码存在差异;Determine first description information of a first software among the plurality of software, where source code to be built of the first software is different from the built source code of the first software; 根据所述历史构建信息,确定所述多个软件中的第二软件的第二描述信息,所述第二软件对应的第二软件包依赖所述第一软件对应的第一软件包;Determining, according to the historical build information, second description information of second software among the multiple software, where a second software package corresponding to the second software package depends on a first software package corresponding to the first software package; 根据所述第一描述信息、所述第二描述信息、以及所述历史构建信息,对所述第一软件的待构建源代码以及所述第二软件的待构建源代码分别进行构建,得到所述第一软件包与所述第二软件包,所述第一软件的待构建源代码先于所述第二软件的待构建源代码进行构建。According to the first description information, the second description information, and the historical construction information, the source code to be built of the first software and the source code to be built of the second software are respectively built to obtain the first software package and the second software package, and the source code to be built of the first software is built before the source code to be built of the second software. 根据权利要求1所述的方法,其特征在于,所述根据所述第一描述信息、所述第二描述信息、以及所述历史构建信息,对所述第一软件的待构建源代码以及所述第二软件的待构建源代码分别进行构建,包括:The method according to claim 1, characterized in that the step of constructing the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information, and the historical construction information comprises: 根据所述第一描述信息,对所述第一软件的待构建源代码进行构建,得到所述第一软件包;Building the source code to be built of the first software according to the first description information to obtain the first software package; 根据所述历史构建信息,确定所述第二软件包所依赖的所述第一软件包中的第一子软件包发生变化;Determining, according to the historical build information, that a first sub-package in the first package on which the second package depends has changed; 根据所述第二描述信息,对所述第二软件的待构建源代码进行构建,得到所述第二软件包。The source code to be built of the second software is built according to the second description information to obtain the second software package. 根据权利要求2所述的方法,其特征在于,所述第一软件包包括多个子软件包,所述多个子软件包中的每个子软件包用于实现所述第一软件的至少一个功能;The method according to claim 2, characterized in that the first software package includes a plurality of sub-software packages, each of the plurality of sub-software packages is used to implement at least one function of the first software; 所述根据所述历史构建信息,确定所述第二软件包所依赖的所述第一软件包中的子软件包发生变化,包括:The determining, according to the historical build information, that a sub-package in the first software package on which the second software package depends has changed includes: 根据所述历史构建信息,确定所述第二软件对应的历史软件包依赖的第二子软件包的标识,所述历史软件包通过对所述第二软件的已构建源代码进行构建得到;Determining, according to the historical build information, an identifier of a second sub-software package that a historical software package corresponding to the second software depends on, wherein the historical software package is obtained by building the built source code of the second software; 根据所述第二子软件包的标识,检测所述第一软件包中不存在与所述第二子软件包相匹配的第一子软件包。According to the identifier of the second sub-software package, it is detected that no first sub-software package matching the second sub-software package exists in the first software package. 根据权利要求1至3任一项所述的方法,其特征在于,所述多个软件还包括第三软件,所述第三软件对应的软件包依赖所述第二软件包;The method according to any one of claims 1 to 3, characterized in that the plurality of software further includes a third software, and the software package corresponding to the third software is dependent on the second software package; 所述根据所述第一描述信息、所述第二描述信息、以及所述历史构建信息,对所述第一软件的待构建源代码以及所述第二软件的待构建源代码分别进行构建,包括:The step of constructing the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information, and the historical construction information includes: 根据所述历史构建信息,确定所述第一软件包、所述第二软件包以及所述第三软件包之间的依赖关系;Determining, according to the historical build information, a dependency relationship among the first software package, the second software package, and the third software package; 根据所述第一软件包、所述第二软件包以及所述第三软件包之间的依赖关系,生成第一依赖链以及第二依赖链,所述第一依赖链指示所述第一软件的待构建源代码先于所述第二软件的待构建源代码进行构建,所述第二依赖链指示所述第二软件的待构建源代码先于所述第三软件的待构建源代码进行构建;Generate a first dependency chain and a second dependency chain according to the dependency relationship between the first software package, the second software package, and the third software package, wherein the first dependency chain indicates that the source code to be built of the first software is built before the source code to be built of the second software, and the second dependency chain indicates that the source code to be built of the second software is built before the source code to be built of the third software; 根据所述第一描述信息、所述第二描述信息、所述第三软件的第三描述信息,并行构建所述第一依赖链中指示的待构建源代码以及所述第二依赖链中指示的待构建源代码。According to the first description information, the second description information, and the third description information of the third software, the source code to be constructed indicated in the first dependency chain and the source code to be constructed indicated in the second dependency chain are constructed in parallel. 根据权利要求4所述的方法,其特征在于,所述第三软件对应的第三软件包依赖所述第二软件包中的第三子软件包,所述第二软件包中的第四子软件包依赖所述第一软件包,则,基于所述第二软件的待构建源代码构建得到所述第二软件包后,所述第三软件对应的软件包所依赖的子软件包变更为所述第三子软件包。The method according to claim 4 is characterized in that a third software package corresponding to the third software depends on a third sub-package in the second software package, and a fourth sub-package in the second software package depends on the first software package. Then, after the second software package is constructed based on the source code to be constructed of the second software package, the sub-package on which the software package corresponding to the third software depends is changed to the third sub-package. 根据权利要求1至5任一项所述的方法,其特征在于,所述历史构建信息还包括所述第一软件的已构建源代码的内容标识,所述确定所述多个软件中的第一软件的第一描述信息,包括:The method according to any one of claims 1 to 5, characterized in that the historical build information further includes a content identifier of a built source code of the first software, and the determining the first description information of the first software among the plurality of software includes: 获取所述第一软件的候选源代码的内容标识;Obtaining a content identifier of a candidate source code of the first software; 当所述第一软件的候选源代码的内容标识与所述第一软件的已构建源代码的内容标识不一致时,确定所述多个软件中的第一软件的第一描述信息,所述第一软件的待构建源代码为所述候选源代码,所述 第一描述信息包括所述第一软件的内容标识、针对所述第一软件的已构建源代码的存储位置的指示信息。When the content identifier of the candidate source code of the first software is inconsistent with the content identifier of the constructed source code of the first software, determining the first description information of the first software among the multiple software, the source code to be constructed of the first software is the candidate source code, The first description information includes a content identifier of the first software and indication information of a storage location of a constructed source code of the first software. 根据权利要求1至6任一项所述的方法,其特征在于,所述历史构建信息包括所述第二软件对应的历史软件包与所述第一软件对应的历史软件包之间的依赖关系,所述第二软件对应的历史软件包通过对所述第二软件的已构建源代码进行构建得到,所述第一软件对应的历史软件包通过对所述第一软件的已构建源代码进行构建得到;The method according to any one of claims 1 to 6, characterized in that the historical build information includes a dependency relationship between a historical software package corresponding to the second software and a historical software package corresponding to the first software, the historical software package corresponding to the second software is obtained by building the built source code of the second software, and the historical software package corresponding to the first software is obtained by building the built source code of the first software; 所述根据所述历史构建信息,确定所述多个软件中的第二软件的第二描述信息,包括:The determining, according to the historical construction information, second description information of a second software among the plurality of software includes: 根据所述历史构建信息,从所述多个软件中检测到存在所述第二软件对应的历史软件包与所述第一软件对应的历史软件包之间存在依赖关系;According to the historical build information, detecting from the plurality of software that there is a dependency relationship between the historical software package corresponding to the second software and the historical software package corresponding to the first software; 确定所述第二软件的第二描述信息,所述第二描述信息包括所述第二软件的内容标识、针对所述第二软件的已构建源代码的存储位置的指示信息。Second description information of the second software is determined, where the second description information includes a content identifier of the second software and indication information of a storage location of a constructed source code of the second software. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 7, characterized in that the method further comprises: 存储所述第一软件的待构建源代码的内容标识、所述第一软件包包括的子软件包的标识、所述第二软件的待构建源代码的内容标识、所述第二软件包包括的子软件包的标识、所述第一软件包与所述第二软件包之间的依赖关系。Store the content identifier of the source code to be built of the first software, the identifier of the sub-package included in the first software package, the content identifier of the source code to be built of the second software, the identifier of the sub-package included in the second software package, and the dependency relationship between the first software package and the second software package. 根据权利要求1至8任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 8, characterized in that the method further comprises: 利用所述第一软件包替换第二数据库中所述第一软件对应的历史软件包,利用所述第二软件包替换所述第二数据库中所述第二软件对应的历史软件包;Using the first software package to replace the historical software package corresponding to the first software in the second database, and using the second software package to replace the historical software package corresponding to the second software in the second database; 其中,所述第二数据库包括所述多个软件分别对应的历史软件包,所述第一软件对应的历史软件包通过对所述第一软件的已构建源代码进行构建得到,所述第二软件对应的历史软件包通过对所述第二软件的已构建源代码进行构建得到。The second database includes historical software packages corresponding to the multiple software respectively, the historical software package corresponding to the first software is obtained by building the built source code of the first software, and the historical software package corresponding to the second software is obtained by building the built source code of the second software. 一种软件包构建方法,其特征在于,所述方法包括:A method for constructing a software package, characterized in that the method comprises: 获取所述多个软件的历史构建信息,所述历史构建信息包括历史时间段内为所述多个软件所构建的软件包的相关信息;Acquire historical construction information of the plurality of software, wherein the historical construction information includes relevant information of software packages constructed for the plurality of software within a historical time period; 确定所述多个软件中的第一软件的第一描述信息,所述第一软件的待构建源代码与所述第一软件的已构建源代码存在差异;Determine first description information of a first software among the plurality of software, where source code to be built of the first software is different from the built source code of the first software; 根据所述历史构建信息,确定所述多个软件中的第二软件的第二描述信息,所述第二软件对应的第二软件包依赖所述第一软件对应的第一软件包;Determining, according to the historical build information, second description information of second software among the multiple software, where a second software package corresponding to the second software package depends on a first software package corresponding to the first software package; 其中,所述第一描述信息以及所述第二描述信息,用于指示对所述第一软件对应的第一软件包以及所述第二软件对应的第二软件包进行构建。The first description information and the second description information are used to indicate that a first software package corresponding to the first software and a second software package corresponding to the second software are to be constructed. 一种软件包构建装置,其特征在于,所述装置包括:A software package construction device, characterized in that the device comprises: 获取模块,用于获取所述多个软件的历史构建信息,所述历史构建信息包括历史时间段内为所述多个软件所构建的软件包的相关信息;An acquisition module, configured to acquire historical construction information of the plurality of software, wherein the historical construction information includes relevant information of software packages constructed for the plurality of software within a historical time period; 确定模块,用于确定所述多个软件中的第一软件的第一描述信息,所述第一软件的待构建源代码与所述第一软件的已构建源代码存在差异;根据所述历史构建信息,确定所述多个软件中的第二软件的第二描述信息,所述第二软件对应的第二软件包依赖所述第一软件对应的第一软件包;a determination module, configured to determine first description information of a first software among the plurality of software, where source code to be constructed of the first software differs from source code already constructed of the first software; and determine second description information of a second software among the plurality of software according to the historical construction information, where a second software package corresponding to the second software package depends on a first software package corresponding to the first software package; 构建模块,用于根据所述第一描述信息、所述第二描述信息、以及所述历史构建信息,对所述第一软件的待构建源代码以及所述第二软件的待构建源代码分别进行构建,得到所述第一软件包与所述第二软件包,所述第一软件的待构建源代码先于所述第二软件的待构建源代码进行构建。A construction module is used to construct the source code to be constructed of the first software and the source code to be constructed of the second software respectively according to the first description information, the second description information, and the historical construction information to obtain the first software package and the second software package, and the source code to be constructed of the first software is constructed before the source code to be constructed of the second software. 根据权利要求11所述的装置,其特征在于,所述构建模块,用于:The device according to claim 11, characterized in that the building module is used to: 根据所述第一描述信息,对所述第一软件的待构建源代码进行构建,得到所述第一软件包;Building the source code to be built of the first software according to the first description information to obtain the first software package; 根据所述历史构建信息,确定所述第二软件包所依赖的所述第一软件包中的子软件包发生变化;Determining, according to the historical build information, that a sub-package in the first software package on which the second software package depends has changed; 根据所述第二描述信息,对所述第二软件的待构建源代码进行构建,得到所述第二软件包。The source code to be built of the second software is built according to the second description information to obtain the second software package. 根据权利要求12所述的装置,其特征在于,所述第一软件包包括多个子软件包,所述多个子软件包中的每个子软件包用于实现所述第一软件的至少一个功能;The device according to claim 12, characterized in that the first software package includes a plurality of sub-software packages, each of the plurality of sub-software packages is used to implement at least one function of the first software; 所述构建模块,用于:The building blocks are used to: 根据所述历史构建信息,确定所述第二软件对应的历史软件包依赖的第二子软件包的标识,所述历 史软件包通过对所述第二软件的已构建源代码进行构建得到;Determine, according to the historical build information, an identifier of a second sub-software package that the historical software package corresponding to the second software depends on, wherein the historical software package The historical software package is obtained by building the built source code of the second software; 根据所述第二子软件包的标识,检测所述第一软件包中不存在与所述第二子软件包相匹配的第一子软件包。According to the identifier of the second sub-package, it is detected that no first sub-package matching the second sub-package exists in the first package. 根据权利要求11至13任一项所述的装置,其特征在于,所述多个软件还包括第三软件,所述第三软件对应的软件包依赖所述第二软件包;The device according to any one of claims 11 to 13, characterized in that the plurality of software further includes a third software, and a software package corresponding to the third software package depends on the second software package; 所述构建模块,用于:The building blocks are used to: 根据所述历史构建信息,确定所述第一软件包、所述第二软件包以及所述第三软件包之间的依赖关系;Determining, according to the historical build information, a dependency relationship among the first software package, the second software package, and the third software package; 根据所述第一软件包、所述第二软件包以及所述第三软件包之间的依赖关系,生成第一依赖链以及第二依赖链,所述第一依赖链指示所述第一软件的待构建源代码先于所述第二软件的待构建源代码进行构建,所述第二依赖链指示所述第二软件的待构建源代码先于所述第三软件的待构建源代码进行构建;Generate a first dependency chain and a second dependency chain according to the dependency relationship between the first software package, the second software package, and the third software package, wherein the first dependency chain indicates that the source code to be built of the first software is built before the source code to be built of the second software, and the second dependency chain indicates that the source code to be built of the second software is built before the source code to be built of the third software; 根据所述第一描述信息、所述第二描述信息、所述第三软件的第三描述信息,并行构建所述第一依赖链中指示的待构建源代码以及所述第二依赖链中指示的待构建源代码。According to the first description information, the second description information, and the third description information of the third software, the source code to be constructed indicated in the first dependency chain and the source code to be constructed indicated in the second dependency chain are constructed in parallel. 根据权利要求11至14任一项所述的装置,其特征在于,所述第三软件对应的第三软件包依赖所述第二软件包中的第三子软件包,所述第二软件包中的第四子软件包依赖所述第一软件包,则,基于所述第二软件的待构建源代码构建得到所述第二软件包后,所述第三软件对应的软件包所依赖的子软件包变更为所述第三子软件包。The device according to any one of claims 11 to 14 is characterized in that a third software package corresponding to the third software depends on a third sub-package in the second software package, and a fourth sub-package in the second software package depends on the first software package. Then, after the second software package is constructed based on the source code to be constructed of the second software package, the sub-package on which the software package corresponding to the third software depends is changed to the third sub-package. 根据权利要求11至15任一项所述的装置,其特征在于,所述历史构建信息还包括所述第一软件的已构建源代码的内容标识;The device according to any one of claims 11 to 15, characterized in that the historical build information further includes a content identifier of the built source code of the first software; 所述确定模块,用于:The determining module is used to: 获取所述第一软件的候选源代码的内容标识;Obtaining a content identifier of a candidate source code of the first software; 当所述第一软件的候选源代码的内容标识与所述第一软件的已构建源代码的内容标识不一致时,确定所述多个软件中的第一软件的第一描述信息,所述第一软件的待构建源代码为所述候选源代码,所述第一描述信息包括所述第一软件的内容标识、针对所述第一软件的已构建源代码的存储位置的指示信息。When the content identifier of the candidate source code of the first software is inconsistent with the content identifier of the constructed source code of the first software, first description information of the first software among the multiple software is determined, the source code to be constructed of the first software is the candidate source code, and the first description information includes the content identifier of the first software and indication information of the storage location of the constructed source code of the first software. 根据权利要求11至16任一项所述的装置,其特征在于,所述历史构建信息包括所述第二软件对应的历史软件包与所述第一软件对应的历史软件包之间的依赖关系,所述第二软件对应的历史软件包通过对所述第二软件的已构建源代码进行构建得到,所述第一软件对应的历史软件包通过对所述第一软件的已构建源代码进行构建得到;The device according to any one of claims 11 to 16, characterized in that the historical construction information includes a dependency relationship between a historical software package corresponding to the second software and a historical software package corresponding to the first software, the historical software package corresponding to the second software is obtained by constructing the constructed source code of the second software, and the historical software package corresponding to the first software is obtained by constructing the constructed source code of the first software; 所述确定模块,用于:The determining module is used to: 根据所述历史构建信息,从所述多个软件中检测到存在所述第二软件对应的历史软件包与所述第一软件对应的历史软件包之间存在依赖关系;According to the historical build information, detecting from the plurality of software that there is a dependency relationship between the historical software package corresponding to the second software and the historical software package corresponding to the first software; 确定所述第二软件的第二描述信息,所述第二描述信息包括所述第二软件的内容标识、针对所述第二软件的已构建源代码的存储位置的指示信息。Second description information of the second software is determined, where the second description information includes a content identifier of the second software and indication information of a storage location of a constructed source code of the second software. 根据权利要求11至17任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 11 to 17, characterized in that the device further comprises: 存储模块,用于所述第一软件的待构建源代码的内容标识、所述第一软件包包括的子软件包的标识、所述第二软件的待构建源代码的内容标识、所述第二软件包包括的子软件包的标识、所述第一软件包与所述第二软件包之间的依赖关系。A storage module is used for the content identifier of the source code to be built of the first software, the identifier of the sub-package included in the first software package, the content identifier of the source code to be built of the second software, the identifier of the sub-package included in the second software package, and the dependency relationship between the first software package and the second software package. 根据权利要求11至18任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 11 to 18, characterized in that the device further comprises: 替换模块,用于利用所述第一软件包替换第二数据库中所述第一软件对应的历史软件包,利用所述第二软件包替换所述第二数据库中所述第二软件对应的历史软件包;A replacement module, configured to replace a historical software package corresponding to the first software in a second database with the first software package, and to replace a historical software package corresponding to the second software in the second database with the second software package; 其中,所述第二数据库包括所述多个软件分别对应的历史软件包,所述第一软件对应的历史软件包通过对所述第一软件的已构建源代码进行构建得到,所述第二软件对应的历史软件包通过对所述第二软件的已构建源代码进行构建得到。The second database includes historical software packages corresponding to the multiple software respectively, the historical software package corresponding to the first software is obtained by building the built source code of the first software, and the historical software package corresponding to the second software is obtained by building the built source code of the second software. 一种软件包构建装置,其特征在于,所述装置包括:A software package construction device, characterized in that the device comprises: 获取模块,用于获取所述多个软件的历史构建信息,所述历史构建信息包括历史时间段内为所述多个软件所构建的软件包的相关信息; An acquisition module, configured to acquire historical construction information of the plurality of software, wherein the historical construction information includes relevant information of software packages constructed for the plurality of software within a historical time period; 确定模块,用于确定所述多个软件中的第一软件的第一描述信息,所述第一软件的待构建源代码与所述第一软件的已构建源代码存在差异;根据所述历史构建信息,确定所述多个软件中的第二软件的第二描述信息,所述第二软件对应的第二软件包依赖所述第一软件对应的第一软件包;a determination module, configured to determine first description information of a first software among the plurality of software, where source code to be constructed of the first software differs from source code already constructed of the first software; and determine second description information of a second software among the plurality of software according to the historical construction information, where a second software package corresponding to the second software package depends on a first software package corresponding to the first software package; 其中,所述第一描述信息以及所述第二描述信息,用于指示对所述第一软件对应的第一软件包以及所述第二软件对应的第二软件包进行构建。The first description information and the second description information are used to indicate that a first software package corresponding to the first software and a second software package corresponding to the second software are to be constructed. 一种计算设备,其特征在于,包括处理器、存储器;A computing device, comprising a processor and a memory; 所述处理器用于执行所述存储器中存储的指令,以使所述计算设备执行如权利要求1至10任一项所述方法的步骤。The processor is configured to execute instructions stored in the memory so as to enable the computing device to perform the steps of the method according to any one of claims 1 to 10. 一种计算机可读存储介质,其特征在于,包括指令,当其在计算设备上运行时,使得所述计算设备执行如权利要求1至10中任一项所述方法的步骤。A computer-readable storage medium, characterized in that it includes instructions, which, when executed on a computing device, enable the computing device to perform the steps of the method according to any one of claims 1 to 10. 一种包含指令的计算机程序产品,其特征在于,当其在至少一个计算设备上运行时,使得所述至少一个计算设备执行如权利要求1至10中任一项所述的方法。 A computer program product comprising instructions, characterized in that when the computer program product is run on at least one computing device, the at least one computing device is caused to perform the method according to any one of claims 1 to 10.
PCT/CN2024/082421 2023-06-09 2024-03-19 Software package building method and apparatus, and related device WO2024250792A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202310684680 2023-06-09
CN202310684680.2 2023-06-09
CN202310970621.1 2023-08-02
CN202310970621.1A CN119105789A (en) 2023-06-09 2023-08-02 Software package construction method, device and related equipment

Publications (1)

Publication Number Publication Date
WO2024250792A1 true WO2024250792A1 (en) 2024-12-12

Family

ID=93714743

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/082421 WO2024250792A1 (en) 2023-06-09 2024-03-19 Software package building method and apparatus, and related device

Country Status (2)

Country Link
CN (1) CN119105789A (en)
WO (1) WO2024250792A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9690553B1 (en) * 2016-09-26 2017-06-27 International Business Machines Corporation Identifying software dependency relationships
US20170206067A1 (en) * 2008-08-20 2017-07-20 International Business Machines Corporation Using build history information to optimize a software build process
US20170357485A1 (en) * 2016-06-10 2017-12-14 International Business Machines Corporation Optimizing a build process by scaling build agents based on system need
US20180136933A1 (en) * 2015-05-28 2018-05-17 Hewlett Packard Enterprise Development Lp Dependency rank based on commit history
US20200089485A1 (en) * 2018-09-17 2020-03-19 International Business Machines Corporation Recommending software project dependency upgrades
US11144438B1 (en) * 2018-11-26 2021-10-12 Yourbase Inc. Incremental build system using an inferred dependency graph collected with a system monitor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170206067A1 (en) * 2008-08-20 2017-07-20 International Business Machines Corporation Using build history information to optimize a software build process
US20180136933A1 (en) * 2015-05-28 2018-05-17 Hewlett Packard Enterprise Development Lp Dependency rank based on commit history
US20170357485A1 (en) * 2016-06-10 2017-12-14 International Business Machines Corporation Optimizing a build process by scaling build agents based on system need
US9690553B1 (en) * 2016-09-26 2017-06-27 International Business Machines Corporation Identifying software dependency relationships
US20200089485A1 (en) * 2018-09-17 2020-03-19 International Business Machines Corporation Recommending software project dependency upgrades
US11144438B1 (en) * 2018-11-26 2021-10-12 Yourbase Inc. Incremental build system using an inferred dependency graph collected with a system monitor

Also Published As

Publication number Publication date
CN119105789A (en) 2024-12-10

Similar Documents

Publication Publication Date Title
US10019256B2 (en) Systems and methods for incremental software development
CN111176717B (en) Method and device for generating installation package and electronic equipment
US8713526B2 (en) Assigning runtime artifacts to software components
CN110737584A (en) Service data testing method and device based on block chain and computer equipment
JP6534402B2 (en) Method for handling data quality exceptions, computer programs and exception engines
US20200110905A1 (en) Security hardened software footprint in a computing environment
US20120296878A1 (en) File set consistency verification system, file set consistency verification method, and file set consistency verification program
EP2335151A1 (en) Method and system for sharing performance data between different information technology product/solution deployments
CN111538651B (en) Interface testing method, device, server and storage medium
CN107729227A (en) Application testing range determining method, system, server and storage medium
CN112769706B (en) Componentized routing method and system
CN109462507B (en) Configuration updating method, device and system and electronic equipment
CN111290738A (en) Resource processing method, device and equipment of application program and storage medium
CN117034821A (en) Regression verification method and medium for chip design front-end simulation verification
CN113515303A (en) Project transformation method, device and equipment
CN113553098A (en) Method, device and computer equipment for submitting Flink SQL job
WO2021077916A1 (en) Method and device for acquiring mirror image file
CN113568604B (en) Method and device for updating wind control strategy and computer readable storage medium
CN119396406A (en) An automatic incremental compilation method and system for Java development
WO2024250792A1 (en) Software package building method and apparatus, and related device
US11256602B2 (en) Source code file retrieval
JP6045707B2 (en) License management apparatus, license management method, and program
CN115686535A (en) Inspection method and device for Kubernets cluster and application
CN114968270B (en) Deployment method and system for heterogeneous server clusters for hyperledger blockchain
CN119149648B (en) A distributed incremental data synchronization method and device based on Flink

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24818329

Country of ref document: EP

Kind code of ref document: A1