Software package processing method, apparatus, device, and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE FOURTH PARADIGM BEIJING TECH CO LTD
- Filing Date
- 2021-10-15
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]现阶段,在业务系统的开发过程中,程序开发人员可以将开发完成后,将本次开发完成的资源对象打包发送至资源库中,导致代码打包过程都是各自为战的,难于对资源对象进行统一管理
[0018]本公开实施例提供的技术方案与现有技术相比具有如下优点:
Smart Images

Figure CN115981704B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a software package processing method, apparatus, device, and medium. Background Technology
[0002] With the development of computer technology, how to develop business systems has become an important issue.
[0003] Currently, during the development of business systems, developers can package the completed resource objects and send them to the resource repository after development is complete. This results in each developer working independently to package the code, making it difficult to manage resource objects in a unified manner. Summary of the Invention
[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a software package processing method, apparatus, device and medium.
[0005] In a first aspect, this disclosure provides a software package processing method, including:
[0006] If the target business system meets the packaging conditions, search for the target management file corresponding to the packaging function from multiple management files of the target business system. The target management file stores the associated resource directory.
[0007] Retrieve associated resource objects from the associated resource directory. Associated resource objects are resource objects managed by other management files besides the target management file.
[0008] Based on the associated resource objects, generate the system software package for the target business system.
[0009] Secondly, this disclosure provides a software package processing apparatus, comprising:
[0010] The file search module is configured to search for the target management file corresponding to the packaging function from multiple management files of the target business system when the target business system meets the packaging conditions. The target management file stores the associated resource directory.
[0011] The resource object retrieval module is configured to retrieve associated resource objects involved in the associated resource directory. The associated resource objects are resource objects managed by other management files besides the target management file in multiple management files.
[0012] The software package generation module is configured to generate system software packages for the target business system based on associated resource objects.
[0013] Thirdly, this disclosure provides a software package processing apparatus, including:
[0014] processor;
[0015] Memory, used to store executable instructions;
[0016] The processor is used to read executable instructions from memory and execute the executable instructions to implement the software package processing method of the first aspect.
[0017] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the software package processing method of the first aspect.
[0018] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0019] The software package processing method, apparatus, device, and medium of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull associated resource objects to generate a system software package for the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure can package the associated resource objects based on multiple management files of the business system, thereby generating a system software package from the resource objects of the target business system, thus realizing unified management of the resource objects of the target business system. Attached Figure Description
[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0021] Figure 1 This diagram illustrates the development process of a resource object in a related technology.
[0022] Figure 2 This illustration shows a schematic diagram of the development process of a resource object provided in an embodiment of the present disclosure;
[0023] Figure 3 This illustration shows a schematic diagram of an exemplary set of management files for a target business system provided in an embodiment of this disclosure;
[0024] Figure 4 A schematic diagram of the structure of a software package processing system provided in an embodiment of this disclosure is shown;
[0025] Figure 5 A schematic diagram of another software package processing system provided in an embodiment of this disclosure is shown;
[0026] Figure 6 A flowchart illustrating a software package processing method provided in an embodiment of this disclosure is shown.
[0027] Figure 7 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown;
[0028] Figure 8 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown;
[0029] Figure 9 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown;
[0030] Figure 10 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown;
[0031] Figure 11 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown;
[0032] Figure 12 A schematic diagram of the structure of a software package processing apparatus provided in an embodiment of this disclosure is shown;
[0033] Figure 13 A schematic diagram of the structure of a software package processing device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0034] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0035] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0036] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0037] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0038] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0039] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0040] Currently, with the development of business platforms, they no longer meet the development needs of single business scenarios and are thus evolving towards multi-business scenario development. In multi-business scenario development, the business platform can be divided into multiple business systems according to different business scenarios. For example, a recommendation platform could include a "You May Like" recommendation system, a "You've Seen More" recommendation system, and so on.
[0041] During the development of a business system, developers can develop task resource objects for that system. Before introducing the software package processing scheme of this disclosure, the following section will briefly describe the resource object development technology.
[0042] Figure 1 A schematic diagram of the development process for resource objects in a related technology is shown.
[0043] like Figure 1 As shown, in this related technology, the development process of a multi-resource object mainly includes the following steps.
[0044] S110, Manually create a resource object. Specifically, developers can manually create a resource object, such as a Job resource.
[0045] S120, Resource Definition. Specifically, developers can define the resource objects they create. For example, in this process, they can define the key, group, and class values of the resource objects.
[0046] S130, Edit resource object.
[0047] S140, Select the template type for the resource object.
[0048] S150, Write the script for the resource.
[0049] S160, Debug resource object.
[0050] S170: Determine if the resource object has been developed. If developed, proceed to S180 to export and migrate the developed resource object to the resource library. If the development of the resource object is not complete, repeat S130 to S170 to repeatedly debug the code until the resource object is developed. Furthermore, if other resource objects need to be developed after the development of this resource object is complete, repeat S110 to S170 until all resource objects to be developed in this process are completed.
[0051] In this type of technology, multiple resource objects need to be developed one by one. If there are many resource objects, the above steps need to be repeated many times, resulting in low development efficiency. Furthermore, the management and migration of resource objects is very cumbersome and prone to omissions.
[0052] To optimize the resource development process, Figure 2 A schematic diagram of the development process of a resource object provided in an embodiment of this disclosure is shown.
[0053] like Figure 2 As shown, the development process of resource objects in this embodiment may include the following steps.
[0054] S210, create N resource objects based on the management file, where N can be an integer greater than or equal to 1.
[0055] In one embodiment, the management file may be a file such as a repo that can manage the various functions or resource objects of the business management system.
[0056] In one embodiment, in S210, N resource objects can be created at once by adding N resource directories simultaneously to the management file. For example, taking a repo file as the management file, N Job resources can be configured at once by creating a Job.yaml-formatted resource directory within the repo.
[0057] S220, Debug Resource Objects. Specifically, after the code of N resource objects can be pulled to the programmer's client through the management file, the programmer can debug the code of the N resource objects in S220.
[0058] S230: Determine whether the development of N resource objects is complete. If the development of N resources is not complete, repeat S220 to develop and debug the resource objects until the development of N resource objects is complete, then continue to execute S240.
[0059] S240, package and store in the target repository. Specifically, management files can be used to package N completed resource objects, and the resulting package can be published to the target repository, thereby achieving one-time configuration of N resource objects.
[0060] In one embodiment, after completing the development of N resource objects, programmers can submit the source code files of the N resource objects to a code repository. The packaging management platform then retrieves the completed source code files from the code repository, packages them, and sends them to the target resource repository. For example, programmers can submit the source code files of the N resource objects to a GitLab repository (i.e., a code management repository), and the packaging management platform can then extract the source code files of the N resources from the GitLab repository, perform continuous integration (CI) packaging to obtain a mirror package, and store this mirror package in Flowengine Hub (i.e., a resource repository).
[0061] Compared to the aforementioned related technologies, the embodiments of this disclosure utilize management files to configure and develop multiple Job resources at once, improving the development efficiency of resource objects. Furthermore, management files allow for unified management of tasks such as code retrieval, software packaging, and software release for multiple resource objects.
[0062] After a preliminary introduction to the above-mentioned resource object development technology, the following embodiments of this disclosure will provide a detailed description of the software package development scheme.
[0063] The applicant's research revealed that existing software development is fragmented, with developers packaging and storing each resource object in a repository after development, making it difficult to manage the development process of these resource objects in a unified manner.
[0064] Based on this, the applicant proposes a software package processing scheme that can be applied to development scenarios targeting business systems. This disclosure embodiment can package associated resource objects based on multiple management files of a business system. Since the associated resource objects are resource objects managed by management files other than the target management file in the target business system, this disclosure embodiment can package the resource objects managed by the target business system into a single system software package, thereby achieving unified management of resource objects.
[0065] Before introducing the solutions provided by the embodiments of this disclosure, the following sections will first provide a detailed explanation of the technical terms involved in this disclosure.
[0066] A software package refers to a program or set of programs with specific functions used to accomplish a specific task. For example, it can be a collection of program code that implements a certain function, or a collection of program code that implements a portion of a function. Accordingly, one or more software packages can be used to update or install a target business system, a specific function of the target business system, or a specific resource object of the target business system.
[0067] Specifically, the source code files of an object to be packaged can be compiled and packaged to generate a software package for that object. The compilation process involves converting user-written source code files into machine-readable object code files.
[0068] Source code files refer to uncompiled code written in assembly language and / or high-level languages, as well as the software package's dependencies. Dependencies can be data files required for the compilation task; for example, compilation resources can include images, videos, text, code, etc., with no specific type limitation. Object code files refer to code generated by the compiler and recognizable by the nodes to be deployed. The nodes to be deployed are physical servers, virtual servers, or containers where the target business system needs to be deployed.
[0069] Continuous Integration (CI) is a technology that automates the building, deployment, and testing of code after it has been committed, ensuring that the committed code is error-free or that errors in the committed code are detected early.
[0070] In some embodiments of this disclosure, a business system is provided, which may be a system corresponding to a certain business scenario of a business platform, and a business system can support a scenario solution of the business platform.
[0071] Specifically, a business system may include multiple functional items, and each functional item can implement one or more functions in the scenario solution. In this embodiment of the disclosure, in order to facilitate unified open management of the target business system, in addition to the original functional items of the business system, the business system also includes packaged functional items.
[0072] It should be noted that when deploying business systems on deployment nodes, the packaged functional projects can be deployed to the deployment node or not, and there is no restriction on this.
[0073] In some embodiments of this disclosure, in order to facilitate unified management of the business system, this application also provides a set of management files for the business system.
[0074] Specifically, the management document set can include management documents for each functional item of the business system. The management documents for each functional item enable software development and management for that functional item.
[0075] Specifically, Figure 3 This is a schematic diagram of a management file set for a target business system provided in an embodiment of this disclosure. For example... Figure 3 As shown, the management file set of the target business system can include management files for each functional item of the target business system. For example, if the target business system includes functions A-F and a packaging function, then the management file set of the target business system includes the management files for each of functions A-F and the target management file corresponding to the packaging function. For instance, if the management file is a repository, taking a consulting and recommendation business system as an example, it can include the repository for the filtering function of the consulting and recommendation business system, the repository for the data insertion component function, the repository for the hyperloop data stream function, the repository for the natural language function, etc. Here, functions A-F can be the business functions of the target business system.
[0076] Specifically, the management file for any function X among functions A-F can manage multiple resource objects under that function. For example, the management file corresponding to any function X can store the resource directory of the resource objects managed by that function X. Alternatively, it may also include a packaging script for any function X. For ease of description, the resource objects of functions other than the packaging function are referred to as associated resource objects in the following embodiments of this disclosure. In one example, in this embodiment of the disclosure, the management files of each function among functions A-F can be used to first package the project software packages of each function, and then the system software package of the target business system can be packaged based on the project software packages of functions A-F.
[0077] The target management file corresponding to the packaging function can be associated with the resource objects in the management files of functions A-F, so that when it is necessary to generate the system software package of the target business system, the resource objects of functions A-F can be retrieved to generate the file set of the target business system.
[0078] In one embodiment, the target management file corresponding to the packaging function may include: an associated resource directory. Optionally, in addition to the associated resource directory, it may also include a resource directory to be packaged and / or other files.
[0079] The following sections will explain the associated resource directories, the resource directories to be packaged, and other files.
[0080] For associated resource directories.
[0081] This is used to record associated resource objects other than the packaging functions required when generating system software packages. Specifically, the associated resource directory may include one or more resource directories, with one resource directory corresponding to one associated resource object. For example, the associated resource object may include at least one of the following: offline task resources, streaming task resources, and online function resources. Offline task resources may be referred to as offline jobs, streaming task resources as streaming jobs, and online function resources as online functions. It should be noted that in this embodiment, the associated resource directory may include the directory files of each resource directory, or the directory content of each resource directory, or the directory file index / link of each resource directory; no specific limitation is made in this regard.
[0082] A resource directory may include at least one directory entry, and each directory entry includes at least part of the definition information of the associated resource object corresponding to the resource directory to which the directory entry belongs, so that a resource object can be uniquely identified through the definition information in at least one directory entry of a resource directory. Optionally, to facilitate development, developers can modify the repo file by modifying the resource directory of the original resource object or adding a new resource directory. The format of the resource directory of the resource object can be preset, so that when a new resource directory needs to be generated, the resource can be defined in the resource template to generate the resource directory of the defined resource. Optionally, the resource directory can be a .yaml file.
[0083] For example, the resource directory of an offline job may include at least one of the following: the resource object's key, group, class, version, resource name, offline job's functional description information, template type, code file, creator information, offline job's required parameters, output configuration information, and dependent resource information. The template type can be one or more of DAG, SHELL, PYTHON3, JAVA, etc. It should be noted that new content to be defined can also be selected according to the developer's requirements; this is not limited.
[0084] For example, the resource directory of a streaming job may include one or more of the following: the resource object's key, group, class, version, resource name, functional description information of the streaming job, creator information, required parameters of the streaming job, and dependent resource information. It should be noted that new content to be defined can also be selected according to the developer's defined requirements; this is not limited.
[0085] For example, the resource catalog of an online function may include one or more of the following: the resource object's key, group, class, version, resource name, functional description information of the online function, creator information, tags, and scene information. It should be noted that new content to be defined can also be selected according to the developer's requirements; this is not limited.
[0086] After introducing the associated resource catalog, the next step is to provide a detailed explanation of the target resources to be packaged.
[0087] For the directory of resources to be packaged.
[0088] The resource directory to be packaged is used to record the resource objects to be packaged required when generating the system software package. Specifically, the resource directory to be packaged may include the resource directories of the resource objects to be packaged. It should be noted that, in the embodiments of this disclosure, the resource directory to be packaged may include the directory file of the resource directory of the resource object to be packaged, the directory content of the resource directory of the resource object to be packaged, or the index / link of the directory file of the resource directory of the resource object to be packaged, and there is no specific limitation thereto.
[0089] To facilitate the explanation of the target resources to be packaged, the following sections of this disclosure will first provide a detailed description of the target resources to be packaged.
[0090] The resource objects to be packaged can be resource objects of the target business system and / or resource objects of the packaging function itself, without limitation. Correspondingly, the resource directory to be packaged can include the resource directory of the target business system's resource objects and / or the resource directory of the packaging function's resource objects.
[0091] For example, the resource object to be packaged may include at least one of the following:
[0092] Solution (ASOL), components, online functions, offline jobs, streaming jobs, project packages for each function, and the code scripts required for packaging functions.
[0093] After a preliminary introduction to the associated resource objects and the resource objects to be packaged, the applicant clarifies the relationship between the two as follows: The resource objects to be packaged may include project packages for all functions of the target business system other than the packaging function. For each function's project package, it can be obtained by packaging the associated resource objects of that function.
[0094] After a detailed description of the resource directory to be packaged, the following sections of this disclosure will provide a detailed explanation of other files.
[0095] Other files may include at least one of the following: container (Docker) definition file, execution script file for pulling associated resource objects, execution script file for packaging, execution script file for outputting (meta) packages, and execution script file for package processing methods.
[0096] The container (Docker) definition file can define operations that Docker executes during compilation, such as copying automatically generated image packages (.tar format software packages) into the image.
[0097] The packaged execution script file is the script used for Docker to compile and package the image.
[0098] The execution script file for the package processing method can be a .yaml file, and can be an execution script for steps such as pulling associated resource objects, packaging, and generating package names. It should be noted that in this embodiment, the management file can contain multiple files of the same format; optionally, different filenames can be set for multiple files of the same format to distinguish them.
[0099] It should be noted that other files may include the above-mentioned files, or the content of the above-mentioned files, or the index / link of the above-mentioned files, without any specific limitation.
[0100] In one embodiment, to facilitate unified development and management, when creating a new feature project for a business system, a template for management files can be retrieved from a target address, such as a repo template. Developers can generate the management files for that feature by editing the repo template, such as adding resource targets for the resource objects of that feature. Optionally, to facilitate use by developers, some examples are placed in the resource directories of the resource objects in the repo template.
[0101] In a specific example, when creating the repo file for the packaging function, it is also necessary to establish the association between the repo file for the packaging function and the repo files for other functions of the business system to which the packaging function belongs.
[0102] For example, resource directories from the repo files of other functions (i.e., the management files of other functions) can be added to the associated resource directory of the packaging function's repo file (i.e., the contents / files / indexes / links of resource directories from the management files of various functions can be added to the associated resource directory of the target management file corresponding to the packaging function). Another example is that the package directories of the project software packages for each function, packaged from the repo files of various functions, can be stored in the associated resource directory of the packaging function's repo file. It should be noted that adding resource directories or package directories to the associated resource directory can be done directly by adding directory files, links / indexes of directory files, or adding the contents of target files; there are no restrictions on the specific method of addition.
[0103] In one embodiment, if it is necessary to establish new business logic (i.e., create a new pipeline), such as establishing a new business function for the target business system or establishing a new resource object for a certain business function, a new management file can be created for the new business function, and a resource directory for the new resource object can be created in the new management file. It should be noted that the method of adding resource directories or package directories in the management file can be as follows: directly adding directory files, indexes / links to directory files, or adding the content of target files; there is no limitation on the specific method of addition.
[0104] In existing technologies, the software of business systems is scattered across different project groups, resulting in fragmented software management. This disclosure provides a set of management files for business systems, enabling unified management of the code of resource objects within the same business system.
[0105] After a preliminary introduction to the business system and management documents, the software package processing system developed and managed for the business system will be explained next.
[0106] Figure 4A schematic diagram of a software package processing system provided in an embodiment of this disclosure is shown. The software package processing method provided in this embodiment can be applied to... Figure 3 The software package processing system shown.
[0107] like Figure 4 As shown, the package processing system 40 includes: a package processing node 41 and a target resource repository 42. Wherein, Figure 4 The two-way arrows in the diagram indicate that the two sides can communicate or exchange data. For example, they can use wired networks, wireless networks, etc., without any specific limitations.
[0108] Package processing node 41 is used to manage and coordinate the software development process of the target business system. In some embodiments, package processing node 41 may be a physical server, a virtual server, or a process. In one embodiment, package processing node 41 may be a node capable of running applications with software development management functions, such as Jenkins (a continuous integration application).
[0109] In some embodiments, the software package processing node 41 stores multiple management files of the target business system. The contents of each management file can be found in the description of management files in the preceding sections of this disclosure, and will not be repeated here.
[0110] The target repository 42 is used to store system software packages generated by the software package processing node 41. In some embodiments, the target repository 42 may be storage space provided by a physical server, virtual server, etc. In one embodiment, the target repository 42 may be a database such as GitHub (a software management platform).
[0111] In some embodiments, Figure 5 A schematic diagram of another software package processing system provided in an embodiment of this disclosure is shown. Figure 5 As shown, the package processing system 40 may also include an object code library 43.
[0112] The target code repository 43 may store the code files for each functional item of the target business system. In one embodiment, the target code repository 43 may be a node capable of running applications with package management functions, such as GitLab (a software management tool).
[0113] The target code repository 43 can be used to send code files of resource objects to be developed as required by developers through the software development client 50, and to receive code files uploaded by developers after the resource objects to be developed are completed. Specifically, the software development client 50 can pull the code software of the resource objects to be developed for a function from the target code repository 43 based on the management files of each function. After completing the software development of the resource object by modifying or adding the resource directory of the resource object to be developed in the management files of the function and debugging the resource object to be developed, the code file of the resource object to be developed can be uploaded to the target code repository 43.
[0114] Furthermore, the target code repository 43 is also used to send the code files of various resource objects of the target business system to the package processing node 41 in response to a call from the package processing node 41. Alternatively, it can automatically send the code files of various resource objects of the target business system to the package processing node 41 after detecting that a developer has uploaded a new resource object's code file. Or it can periodically send the code files of various resource objects of the target business system to the package processing node 41; there is no specific limitation on this.
[0115] In some embodiments, the package processing system 40 may further include a packaging container Docker, which provides a runtime environment for deployable nodes of the system package, thereby enabling the system package packaged by Docker to run on deployable nodes.
[0116] After introducing the architecture of the software package processing system, the following sections of this disclosure will provide a detailed description of the software package processing method, apparatus, device, and computer medium provided in this disclosure.
[0117] Figure 6 A flowchart illustrating a software package processing method provided in an embodiment of this disclosure is shown.
[0118] In this embodiment of the disclosure, the execution entity for each step of the package processing method can be a package processing node. The package processing node can be a physical server, a virtual server, or a process. In one embodiment, the package processing node can be a node capable of running applications with software development management functions, such as Jenkins (a continuous integration application).
[0119] like Figure 6 As shown, the software package processing method may include the following steps.
[0120] S610, if the target business system meets the packaging conditions, search for the target management file corresponding to the packaging function from multiple management files of the target business system. The target management file stores associated resource directories. For example, it can be found from... Figure 3 The target management file was found in the set of files shown by its name.
[0121] In some embodiments, the packaging conditions may be the conditions for determining whether a system software package for the target business system needs to be generated.
[0122] In one example, the packaging condition may include: an update event has occurred on the resource objects of the target business system. The resource objects of the target business system may include the resource objects of each functional item of the target business system, i.e., associated resource objects.
[0123] Optionally, when the code of each function of the target business system changes within the target code library, the update event of the resource object of the target business system can be determined.
[0124] Alternatively, an update event for the resource objects in the target business system can be determined when the resource catalog in the management files of each function of the target business system changes. Specifically, if a software developer adds a resource object to any function of the target business system, the management file for that function also needs to be updated accordingly with the resource catalog of the newly added resource object. As another example, if a software developer modifies a resource object in any function of the target business system, such as by performing a version upgrade, the original resource catalog for that resource object also needs to be modified.
[0125] In another example, the packaging condition could include periodically packaging the target business system. Accordingly, the packaging condition can be determined to have been met when a preset time has elapsed since the last packaging. The preset time can be set according to specific scenarios and actual needs, and will not be elaborated further.
[0126] In another example, the packaging condition could be receiving a packaging request from relevant personnel. These personnel could initiate the packaging request after development is complete, or when there are testing or deployment requirements for the target business system. For instance, to ensure the system's real-time performance, the latest version of the system software package could be packaged when the target business system needs to be deployed on deployable nodes.
[0127] It should be noted that packaging conditions can also be set according to actual packaging needs, without specific limitations.
[0128] The specific contents of the target management file can be found in the detailed description of the embodiments of this disclosure, and will not be repeated here.
[0129] S620, retrieves the associated resource objects involved in the associated resource catalog. The associated resource objects are resource objects managed by management files other than the target management file across multiple management files.
[0130] In some embodiments, the associated resource object can be a resource object of another function in the target business system besides the packaging function. For example, continuing with... Figure 3 For example, the associated resource objects can be resource objects from function A to function F. For instance, they could be resource objects whose resource directories exist in the management files of functions A through F.
[0131] In some embodiments, associated resource objects can be retrieved from directories of associated resource objects existing in the associated resource directory. Alternatively, management files for other functions can be read from the associated resource directory, and then the resource directories in the read management files can be obtained to retrieve the resource objects corresponding to the resource targets, i.e., associated resource objects.
[0132] It should be noted that the specific contents of the associated resource directory can be found in the above-mentioned parts of the embodiments of this disclosure. Figure 3 The relevant content will not be repeated here.
[0133] S630 generates system software packages for the target business system based on associated resource objects.
[0134] In some embodiments, the system software package can be a system software package obtained by packaging and compiling the objects to be packaged within the target business system. The system software package can be a collection of packaged files containing code and dependent files required to run the functions of the target business system. Specifically, for the objects to be packaged, it can include the code and dependent files of associated resource objects. Optionally, the objects to be packaged can also include other resource elements of the target business system, such as components. Alternatively, the objects to be packaged can also include other content that needs to be packaged, such as packaging scripts. The content of the system software package can be set according to actual conditions and specific needs, which will not be elaborated further in this disclosure.
[0135] The system software package enables the rapid installation or removal of target business systems on deployable nodes, achieving plug-and-play deployment of the system software package.
[0136] In some embodiments, S630 may specifically include the following step A1.
[0137] Step A1 involves packaging the associated resource objects using the target container to obtain a system package in image format. The target container and the system package run on the same deployable node environment. Optionally, a packaging script in the target management file can be used to package the system package into an image format using the target container.
[0138] It's important to note that system packages obtained in this way can run on all deployment nodes, improving deployment efficiency. Furthermore, packaging system packages into image format from a target container ensures consistency across local development, testing, and production environments because the target container and the deployment nodes operate in the same environment. This allows completed image-formatted system packages to be directly migrated or updated to the production environment. In addition, image-formatted system packages facilitate continuous deployment and testing. Specifically, packaging system packages into image format from a target container eliminates differences between online and offline environments, ensuring standardized and consistent environments throughout the target business system's lifecycle. Developers use images to build standard development environments; after development, they migrate by packaging the complete environment and the target business system into image-formatted system packages. This allows testing and operations personnel to directly deploy image-formatted system packages for testing and release, significantly simplifying the continuous integration, testing, and release process.
[0139] A deployable node can be a server that requires deployment of the target business system. For example, a deployable node can be pre-configured or specified by relevant personnel during each software development phase. Alternatively, it can be a node capable of retrieving the target business system to be deployed from the target repository. Deployable nodes can be deployment nodes in an internal environment or an external environment.
[0140] In some embodiments, in order to facilitate the management, deployment and application of each resource object, step S630 may specifically include the following steps A2 and A3.
[0141] Step A2: Package the multiple associated resource objects separately to obtain multiple resource packages.
[0142] In one example, related resource objects can be packaged on a functional basis. For instance, resource objects belonging to the same function can be packaged to obtain a resource package. For example, the resource objects for that function can be pulled from the function's repository file, and the packaging script in the function's repository file can be used to package the function's resource objects to obtain a functional package. See also... Figure 3 By utilizing the management file of function C, the resource objects of function C can be retrieved and packaged to obtain the resource package corresponding to function C.
[0143] This packaging method allows for the deployment, updating, and management of target business systems on a functional basis at the target deployment node, improving convenience.
[0144] In another example, resource objects can be packaged. For instance, the code and dependency files of each associated resource object can be compiled and packaged to obtain a resource package.
[0145] This packaging method allows for the deployment, updating, and management of target business systems on target deployment nodes at the resource object level, improving convenience.
[0146] It should be noted that resource packages can also be generated according to actual scenarios and specific needs, but this disclosure does not limit this.
[0147] In one embodiment, the associated resource objects can be retrieved and a resource package generated by using a script that retrieves the associated resource objects as a submodule.
[0148] Step A3: Based on multiple resource packages, package them to obtain the system package.
[0149] The process of generating a system package based on multiple resource packages is similar to step A1 and will not be repeated here.
[0150] In one embodiment, when the target management software includes resource targets to be packaged, step A2 may specifically include steps A21 to A24 as described below.
[0151] Step A21: Obtain the directories of multiple resource packages.
[0152] Specifically, after obtaining multiple resource packages, a directory of resource packages can be generated. Optionally, the resource packages can be sent to the target repository for storage.
[0153] Step A22: Update the directory of resources to be packaged using the directories of multiple software resource packages.
[0154] For example, the directory file of the software resource package can be added to the resource directory to be packaged. Alternatively, the existing directory file corresponding to the resource package in the resource directory to be packaged can be replaced with the directory file of the newly acquired resource package.
[0155] Another example is to add the directory contents of the software resource package to the resource directory to be packaged. Alternatively, the existing directory contents of the resource package corresponding to the resource package in the resource directory to be packaged can be replaced with the directory contents of the newly acquired resource package.
[0156] Step A23: Retrieve the objects to be packaged from the updated directory of resources to be packaged.
[0157] Step A23 allows you to retrieve the aforementioned resource packages, as well as other resource elements of the target business system.
[0158] The objects to be packaged can be referred to in the above description of the elements to be packaged in the embodiments of this disclosure, and will not be repeated here.
[0159] Step A24: Package the object to be packaged to obtain the system software package of the target business system.
[0160] Specifically, the details of step A24 are similar to those of S630, and will not be repeated here.
[0161] The software package processing method of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull the associated resource objects to generate the system software package of the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure embodiment packages the associated resource objects based on multiple management files of the business system, and can package the resource objects of the target business system into a system software package, thereby realizing unified management of the resource objects of the target business system.
[0162] After introducing the architecture of the software package processing system, the following sections of this disclosure will provide a detailed description of the software package processing method, apparatus, device, and computer medium provided in this disclosure.
[0163] Figure 7 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown.
[0164] In this embodiment of the disclosure, the execution entity for each step of the package processing method can be a package processing node. This package processing node can be a physical server, a virtual server, or a process. In one embodiment, the package processing node can be a node capable of running applications with software development and management functions, such as Jenkins.
[0165] like Figure 7 As shown, the software package processing method may include the following steps.
[0166] S710 monitors update events of associated resource objects.
[0167] For example, when the code of each function of the target business system changes within the target code library, the update event of the resource object of the target business system can be detected.
[0168] Alternatively, an update event can be determined when the resource directory in the management files of each function of the target business system changes.
[0169] It is necessary to determine whether an update event of the associated resource object has occurred through other means, and this disclosure does not limit this.
[0170] S720 determines that the target business system meets the packaging conditions when it detects an update event of an associated resource object.
[0171] The specific details of the packaging conditions can be found in the relevant descriptions in the above sections of the embodiments of this disclosure, and will not be repeated here.
[0172] S730, if the target business system meets the packaging conditions, searches for the target management file corresponding to the packaging function from multiple management files of the target business system. The target management file stores the associated resource directory. S730 is similar to S610, and will not be described in detail here.
[0173] S740 retrieves associated resource objects from the associated resource directory. These associated resource objects are resource objects managed by management files other than the target management file. S740 is similar to S620 and will not be described further here.
[0174] S750 generates the system software package for the target business system based on associated resource objects. S750 is similar to S630 and will not be described further here.
[0175] The software package processing method of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull the associated resource objects to generate the system software package of the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure embodiment packages the associated resource objects based on multiple management files of the business system, and can package the resource objects of the target business system into a system software package, thereby realizing unified management of the resource objects of the target business system.
[0176] Furthermore, by monitoring resource update events, software packages can be automatically packaged after relevant personnel have completed software development, enabling timely release of the packages. Optionally, in a CI scenario, monitoring resource update events can automatically package and deploy software packages after development, improving the convenience and standardization of software release and deployment.
[0177] Figure 8 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown.
[0178] In this embodiment of the disclosure, the execution entity for each step of the package processing method can be a package processing node. This package processing node can be a physical server, a virtual server, or a process. In one embodiment, the package processing node can be a node capable of running applications with software development and management functions, such as Jenkins.
[0179] like Figure 8 As shown, the software package processing method may include the following steps.
[0180] S810, Obtain the package label. The package label includes the package index number and / or packaging sequence number.
[0181] In some embodiments, the index number uniquely corresponds to a system software package. Optionally, the index number of the software package can be the commit name of the system software package, the summary of the system software package, the storage address of the system software package, etc., and there is no specific limitation thereto.
[0182] In some embodiments, the packaging sequence number can be a packaging sequence number named by the package processing node for the package. Optionally, the package processing node adds 1 to the packaging sequence number of the previous package it packages to obtain the packaging sequence number of the current package.
[0183] Optionally, since the packaging sequence number increases with the number of times the package processing node packages the package, different packages have different packaging sequence numbers. Accordingly, the packaging sequence number can be used to distinguish different packages.
[0184] S820 generates a package name based on the package tag. For example, if the package tag is "AA", the generated package name could be "XXXAAXXX.jar".
[0185] In some embodiments, the package name may include, in addition to the package tag, the branch number of the branch to which the package belongs, the file name of the target management file, variable names, etc., without specific limitations. The branch number may be "master", one or more functions may belong to the same branch, and the variable name may be represented as "env".
[0186] In some embodiments, to facilitate the differentiation of different versions of the same software package, a software package version can be generated using a software package tag, and then a software package name can be generated based on the software package version.
[0187] S830, if the target business system meets the packaging conditions, searches for the target management file corresponding to the packaging function from multiple management files of the target business system. The target management file stores associated resource directories. S830 is similar to S610 and will not be described further here.
[0188] S840 retrieves associated resource objects from the associated resource catalog. These associated resource objects are resource objects managed by management files other than the target management file. S840 is similar to S620 and will not be described further here.
[0189] S850 generates a system software package named after the aforementioned software package name based on the associated resource object. S850 is similar to S630 and will not be described again here. The specific content of the software package name can be found in the relevant description in section S810 above, and will not be repeated here.
[0190] In one example, the specific steps of the package processing method shown in S810 to S850 can be as follows:
[0191] First, variable names can be generated based on the branch name (CI_COMMIT_REF_NAME) and preset variable name generation rules, and tag names can be generated based on the package sequence number (CI_PIPELINE_IID) and preset tag generation rules. Then, a package name with the tag name as the version number can be generated based on the tag name, variable name, and target management file name. For example, if the tag name is "AA", the variable name is "BB", and the target management file name is "CC", then the generated package name will be "xx / xx / BB / xx / xx / CC.tar:AA".
[0192] Then, after configuring the environment by creating directories and establishing links, the execution script based on the package processing method can perform operations such as pulling associated resource objects, packaging to generate system packages, exporting packages, pushing packages to target resource repositories, and deleting system packages.
[0193] The software package processing method of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull the associated resource objects to generate the system software package of the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure embodiment packages the associated resource objects based on multiple management files of the business system, and can package the resource objects of the target business system into a system software package, thereby realizing unified management of the resource objects of the target business system.
[0194] Because existing technologies package software in a fragmented manner, with each packaged version being different, it becomes impossible to accurately determine the software version used on deployment nodes, leading to chaotic software management. However, the embodiments disclosed in this disclosure can generate different package names for software packages of different versions and for different business systems, thereby distinguishing between different business systems and different versions of software packages by package name, facilitating software package management and deployment.
[0195] Figure 9 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown.
[0196] In this embodiment of the disclosure, the execution entity for each step of the package processing method can be a package processing node. This package processing node can be a physical server, a virtual server, or a process. In one embodiment, the package processing node can be a node capable of running applications with software development and management functions, such as Jenkins.
[0197] like Figure 9 As shown, the software package processing method may include the following steps.
[0198] S910, if the target business system meets the packaging conditions, searches for the target management file corresponding to the packaging function from multiple management files of the target business system. The target management file stores associated resource directories. S910 is similar to S610 and will not be described further here.
[0199] S920 retrieves the latest source code files of the associated resource objects involved in the associated resource directory. The associated resource objects are resource objects managed by management files other than the target management file.
[0200] In one example, the latest version of the source code file for each associated resource object can be retrieved by the version number in the resource directory. It should be noted that other aspects of S920 are similar to S620, and will not be repeated here.
[0201] S930 generates the latest system software package based on the latest source code files. S930 is similar to S630, and will not be described further here.
[0202] The software package processing method of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull the associated resource objects to generate the system software package of the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure embodiment packages the associated resource objects based on multiple management files of the business system, and can package the resource objects of the target business system into a system software package, thereby realizing unified management of the resource objects of the target business system.
[0203] In addition, when programmers develop multiple functional projects, the target business system can be generated by automatically pulling the latest version of each functional project, thus ensuring that each functional project of the generated target business system is up-to-date and that the target business system is updated in a timely manner for each functional project.
[0204] Figure 10 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown.
[0205] In this embodiment of the disclosure, the execution entity for each step of the package processing method can be a package processing node. The package processing node can be a physical server, a virtual server, or a process. In one embodiment, the package processing node can be a node capable of running applications with software development management functions, such as Jenkins (a continuous integration application).
[0206] like Figure 10 As shown, the software package processing method may include the following steps.
[0207] S1010: If the target business system meets the packaging conditions, search for the target management file corresponding to the packaging function from multiple management files of the target business system. The target management file stores the associated resource directory. S1010 is similar to S610 and will not be described further here.
[0208] S1020 retrieves the associated resource objects involved in the associated resource catalog. The associated resource objects are resource objects managed by management files other than the target management file. S1020 is similar to S620 and will not be described further here.
[0209] S1030 generates the system software package for the target business system based on the associated resource objects. S1030 is similar to S630 and will not be described further here.
[0210] S1040, in response to the system package generation event, stores the system package in the target repository.
[0211] Alternatively, a packaging script containing packaging commands (such as the docker command) and automatic package delivery commands (docker push) can be used to automatically store system packages in response to system package generation events.
[0212] The software package processing method of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull the associated resource objects to generate the system software package of the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure embodiment packages the associated resource objects based on multiple management files of the business system, and can package the resource objects of the target business system into a system software package, thereby realizing unified management of the resource objects of the target business system.
[0213] Furthermore, this embodiment can automatically detect and respond to system package generation events, automatically publishing the system package to the target repository (Flowengine hub). Compared to the existing method of manually exporting and importing packages, this greatly reduces labor costs and the probability of errors, improving software development efficiency.
[0214] Figure 11 A flowchart illustrating another software package processing method provided in an embodiment of this disclosure is shown.
[0215] In this embodiment of the disclosure, the execution entity for each step of the package processing method can be a package processing node. The package processing node can be a physical server, a virtual server, or a process. In one embodiment, the package processing node can be a node capable of running applications with software development management functions, such as Jenkins (a continuous integration application).
[0216] like Figure 11 As shown, the software package processing method may include the following steps.
[0217] S1110: If the target business system meets the packaging conditions, search for the target management file corresponding to the packaging function from multiple management files of the target business system. The target management file stores the associated resource directory. S1110 is similar to S610 and will not be described further here.
[0218] S1120 retrieves the associated resource objects involved in the associated resource catalog. The associated resource objects are resource objects managed by management files other than the target management file. S1120 is similar to S620 and will not be described further here.
[0219] S1130 generates the system software package for the target business system based on the associated resource objects. S1130 is similar to S630 and will not be described further here.
[0220] S1140, the package name is sent to the target resource repository so that the target deployment node pulls the system package from the target resource repository.
[0221] The target deployment node can be a predefined deployment node, a deployment node that requests the system software package of the target business system, or a deployment node specified by relevant personnel when updating resource objects.
[0222] In one example, the target deployment node can be a deployment node within the package processing system; that is, the target deployment node resides within the internal environment of the package processing system. Correspondingly, the target repository corresponding to the target deployment node can be located within the same package processing system as the package processing node.
[0223] In another example, the target deployment node can be a deployment node outside the package processing system; that is, the target deployment node is in an external environment of the package processing system. Correspondingly, the target repository can belong to the same external environment as the target deployment node.
[0224] Accordingly, to ensure security while enabling external access to software packages, an external access address for the system software package can be generated after it is pushed to the target repository. Then, the target deployment node can update the system software package using a package update method such as `set image name + external access address`. For example, the external access address of the system software package can be generated based on the package name of the system software package and the external environment address of the target repository.
[0225] In one embodiment, the target deployment node may send a package retrieval request to the package processing node, then the target deployment node determines the storage location of the system package, retrieves the system package from the storage location, and sends it to the target deployment node.
[0226] In one example, the target deployment node can update the system packages using methods such as editing the yml file, patching, or setting the image name plus the package name.
[0227] In another embodiment, the target deployment node can directly access the target repository to obtain system software packages. The method by which the target deployment node directly accesses the target repository is similar to that described above and will not be repeated here.
[0228] In another embodiment, the package processing node can automatically publish the system package to the package processing node after it is generated. For example, the automatic deployment of the system package can be achieved using the `mount-asol-package` command along with the location where the system package is stored.
[0229] In one embodiment, a specific method for deploying a system software package on a target deployment node may include: performing steps B1 to B3 according to each deployable resource object among the associated resource objects within the system software package. The entity executing steps B1 to B3 may be a software package processing node or a control module of the target deployment node.
[0230] Step B1: Obtain the resource catalog of deployable resource objects and the resource catalog of deployed resource objects of the target deployment node.
[0231] In one example, if the execution entity of steps B1 to B3 can be the control module of the target deployment node, it can receive the resource directory of the associated resource object sent by the software package processing node. This resource directory can be sent to the target deployment node by sending the target management file corresponding to the packaging function. Alternatively, it can be sent in other ways, which are not limited in this disclosure. Optionally, the resource directory of the associated resource object can be placed in the system software package for sending, or sent in other ways.
[0232] Step B2: If the resource definition value of the resource directory of the deployable resource object is the same as the resource definition value of the resource directory of the deployed resource object on the target deployment node, then replace the deployed resource object with the deployable resource object on the target deployment node.
[0233] In this resource directory, the resource definition value can be at least one of the key value, group value, and class value of the resource object. Optionally, if the key value, group value, and class value of the deployable resource object and the deployed resource object are all the same, it proves that the deployable resource object and the deployed resource object are the same resource object.
[0234] In one embodiment, if the resource definition value of the resource directory of the deployable resource object is the same as the resource definition value of the resource directory of the deployed resource object on the target deployment node, it can be further determined whether their version numbers are consistent. If they are inconsistent, the deployed resource object is used to replace the deployed resource object; if they are consistent, the deployment of the deployable resource object is terminated. That is, the deployable resource object is not deployed on the target deployment node, while the deployed resource object is retained on the target deployment node.
[0235] Step B3: If the resource definition value of the resource directory of the deployable resource object is different from the resource definition value of the resource directory of the deployed resource object on the target deployment node, then the deployed resource object is retained on the target deployment node while a deployable resource object is added.
[0236] The software package processing method of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull the associated resource objects to generate the system software package of the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure embodiment packages the associated resource objects based on multiple management files of the business system, and can package the resource objects of the target business system into a system software package, thereby realizing unified management of the resource objects of the target business system.
[0237] This disclosure also provides a software package processing apparatus for implementing the above-described software package processing method, which is described below in conjunction with... Figure 12 Please provide an explanation.
[0238] In this embodiment of the disclosure, the package processing device can be a package processing node. The package processing node can be a physical server, a virtual server, or a process. In one embodiment, the package processing node can be a node capable of running applications with software development and management functions, such as Jenkins.
[0239] Figure 12 A schematic diagram of the structure of a software package processing apparatus provided in an embodiment of this disclosure is shown.
[0240] like Figure 12 As shown, the software package processing device 1200 may include a file search module 1210, a resource retrieval module 1220, and a software package generation module 1230.
[0241] The file search module 1210 is configured to search for the target management file corresponding to the packaging function from multiple management files of the target business system when the target business system meets the packaging conditions. The target management file stores the associated resource directory.
[0242] The resource retrieval module 1220 is configured to retrieve associated resource objects involved in the associated resource directory. The associated resource objects are resource objects managed by other management files besides the target management file in multiple management files.
[0243] The software package generation module 1230 is configured to generate system software packages for the target business system based on associated resource objects.
[0244] The software package processing apparatus of this disclosure can determine the target management file corresponding to the packaging function of the target business system when the target business system meets the packaging conditions, and use the associated resource directory in the target management file to pull associated resource objects to generate a system software package for the target business system. Since the associated resource objects are resource objects managed by other management files in the target business system besides the target management file, this disclosure embodiment packages the associated resource objects based on multiple management files of the business system, and can package the resource objects of the target business system into a system software package, thereby realizing unified management of the resource objects of the target business system.
[0245] In some embodiments of this disclosure, the software package processing apparatus 1200 further includes an event detection module and a judgment module.
[0246] The event detection module is configured to monitor update events of associated resource objects;
[0247] The judgment module is configured to determine whether the target business system meets the packaging conditions when an update event of an associated resource object is detected.
[0248] In some embodiments of this disclosure, the number of associated resource objects is multiple, and the package generation module 1230 may include:
[0249] The first packaging unit is configured to package multiple associated resource objects separately to obtain multiple resource packages;
[0250] The second packaging unit is configured to package system packages based on multiple resource packages.
[0251] Furthermore, the target management file corresponding to the packaging function also includes the resource directory to be packaged, and the second packaging unit is further configured as follows:
[0252] Retrieve directories for multiple resource packages;
[0253] Update the directory of resources to be packaged using the directories of multiple software resource packages;
[0254] Retrieve the updated directory of resources to be packaged, including the objects to be packaged.
[0255] Package the objects to be packaged to obtain the system software package.
[0256] In some embodiments of this disclosure, the package processing apparatus 1200 further includes a tag acquisition module and a package naming module.
[0257] The tag acquisition module is configured to acquire package tags, which include the package index number and / or the packaging sequence number of the packaging node;
[0258] The package naming module is configured to generate package names based on package tags;
[0259] Accordingly, the software package generation module 1230 can be configured as follows:
[0260] Based on the associated resource object, a system package named after the package name is generated.
[0261] In some embodiments of this disclosure, the resource fetching module 1220 may be further configured as follows:
[0262] Retrieve the latest source code file of the associated resource object;
[0263] Based on the associated resource objects, a system software package for the target business system is generated, including:
[0264] Generate the latest version of the system software package based on the latest source code files.
[0265] In some embodiments of this disclosure, the software package processing apparatus 1200 further includes a software package storage module.
[0266] The package storage module is configured to store system packages in the target repository in response to system package generation events.
[0267] Furthermore, the package processing device 1200 also includes an address acquisition module and an address distribution module.
[0268] The address acquisition module is configured to obtain the storage address of the system software package in the target resource library;
[0269] The address distribution module is configured to send storage addresses to the target deployment node so that the target deployment node can pull system software packages from the target repository based on the storage addresses.
[0270] In some embodiments of this disclosure, the software package generation module 1230 may be further configured as follows:
[0271] The target container is used to package the associated resource objects to obtain a system package in image format. The target container and the system package have the same runtime environment for deployable nodes.
[0272] It should be noted that, Figure 12 The package processing device 1200 shown can perform Figure 6 to Figure 12 The various steps in the method embodiment shown are implemented. Figures 6 to 12 The processes and effects in the method embodiments shown are not described in detail here.
[0273] Figure 13 A schematic diagram of the structure of a software package processing device provided in an embodiment of this disclosure is shown.
[0274] like Figure 13 As shown, the software package processing device may include a processor 1301 and a memory 1302 storing computer program instructions.
[0275] Specifically, the processor 1301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0276] Memory 1302 may include a mass storage device for information or instructions. For example, and not limitingly, memory 1302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1302 may include removable or non-removable (or fixed) media. Where appropriate, memory 1302 may be internal or external to the integrated gateway device. In a particular embodiment, memory 1302 is a non-volatile solid-state memory. In a particular embodiment, memory 1302 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0277] The processor 1301 performs the steps of the software package processing method provided in this disclosure by reading and executing computer program instructions stored in the memory 1302.
[0278] In one example, the package processing device may also include a transceiver 1303 and a bus 1304. Wherein, as Figure 13 As shown, the processor 1301, memory 1302 and transceiver 1303 are connected via bus 1304 and communicate with each other.
[0279] Bus 1304 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 1304 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0280] This disclosure also provides a computer-readable storage medium that can store a computer program, which, when executed by a processor, causes the processor to implement the software package processing method provided in this disclosure.
[0281] The aforementioned storage medium may, for example, include a memory 1302 containing computer program instructions, which can be executed by a processor 1301 of a software package processing device to complete the software package processing method provided in this embodiment. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device.
[0282] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0283] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A software package processing method applied to a target business system, the target business system including a packaging function and multiple business functions, the packaging function corresponding to a target management file, each business function corresponding to a management file, and the management file corresponding to each business function storing a resource directory of associated resource objects managed by the corresponding business function; then, the method includes: If the target business system meets the packaging conditions, the target management file is searched from multiple management files of the target business system. The target management file stores an associated resource directory, which is obtained by associating the target management file with the management files corresponding to each of the business functions. Retrieve the associated resource objects involved in the associated resource directory, wherein the associated resource objects are resource objects managed by other management files besides the target management file in the plurality of management files; Based on the associated resource object, a system software package for the target business system is generated.
2. The method according to claim 1, characterized in that, Before searching for the target management file corresponding to the packaging function from multiple management files of the target business system, the method further includes: Monitor update events of the associated resource objects; When an update event is detected in the associated resource object, it is determined that the target business system meets the packaging conditions.
3. The method according to claim 1, characterized in that, The number of associated resource objects is multiple; The step of generating the system software package for the target business system based on the associated resource object includes: Package multiple related resource objects separately to obtain multiple resource packages; The system package is obtained by packaging multiple resource packages.
4. The method according to claim 3, characterized in that, The target management file also includes a directory of resources to be packaged; The system package, obtained by packaging multiple resource packages, includes: Obtain the directories of the multiple resource software packages; Update the resource directory to be packaged using the directories of the multiple resource packages; Retrieve the updated directory of resources to be packaged, including the objects to be packaged. The object to be packaged is packaged to obtain the system software package.
5. The method according to claim 1, characterized in that, The method further includes: Obtain the package label, which includes the index number and / or packaging sequence number of the system package; Based on the package tag, generate the package name; The step of generating the system software package of the target business system based on the associated resource object includes: Based on the associated resource object, the system software package named after the software package name is generated.
6. The method according to claim 1, characterized in that, The associated resource objects involved in retrieving the associated resource directory include: Retrieve the latest version of the source code file of the associated resource object; The step of generating the system software package for the target business system based on the associated resource object includes: Based on the latest version of the source code file, generate the latest version of the system software package.
7. The method according to claim 1, characterized in that, After generating the system software package of the target business system based on the associated resource object, the method further includes: In response to a system package generation event, the system package is stored in the target repository.
8. The method according to claim 1, characterized in that, After generating the system software package of the target business system based on the associated resource object, the method further includes: The system software package name is sent to the target repository so that the target deployment node can pull the system software package from the target repository.
9. The method according to claim 1, characterized in that, The step of generating the system software package for the target business system based on the associated resource object includes: The associated resource object is packaged using a target container to obtain the system package in image format. The target container and the system package have the same runtime environment as the deployable node of the system package.
10. A software package processing apparatus, characterized in that, Applied to a target business system, the target business system includes a packaging function and multiple business functions. The packaging function corresponds to a target management file, and each business function corresponds to a management file. The management file corresponding to each business function stores a resource directory of the associated resource objects managed by the corresponding business function. Therefore, the device includes: The file search module is configured to search for the target management file from multiple management files of the target business system when the target business system meets the packaging conditions. The target management file stores an associated resource directory, which is obtained by associating the target management file with the management files corresponding to each of the business functions. The resource retrieval module is configured to retrieve associated resource objects involved in the associated resource directory, wherein the associated resource objects are resource objects managed by other management files besides the target management file in the plurality of management files; The software package generation module is configured to generate the system software package of the target business system based on the associated resource object.
11. A software package processing device, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the software package processing method according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, causes the processor to implement the software package processing method according to any one of claims 1-9.
Citation Information
Patent Citations
Code file packaging deployment method, continuous integration server and system
CN109725909A
System updating method and system
CN110007937A