Program package management system, method and equipment and storage medium

By designing a package management system, automated merger, compilation parameter optimization, automatic generation of deployment files and security approval processes are realized, and the automation and security problems of traditional code management methods under the customized code branches of multiple customers are solved, which significantly improves the efficiency and quality of software development and operation and maintenance.

CN119861964AInactive Publication Date: 2025-04-22INDUSTICS COM
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510348152.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When traditional code management methods face multiple customer customized code branches, it is difficult to achieve automated merge, release and deployment, resulting in confusion in branch versions, frequent code conflicts and lengthy merging process.

Method used

Design a package management system, including branch management unit, compilation unit, deployment adaptation unit and release process unit, and realize automated code management and multi-environment deployment through automated merging rules, compilation parameter optimization, automatic deployment file generation and secure scanning approval process.

Benefits of technology

It significantly improves the automation, adaptability and security of code management, reduces code conflicts and merging difficulties, and improves the efficiency of software launch and the stability of product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119861964A_ABST
    Figure CN119861964A_ABST
Patent Text Reader

Abstract

The invention discloses a program package management system, method and equipment and a storage medium, and the system comprises a branch management unit which is used for creating an independent code branch and recording an association relationship between the independent code branch and a main branch, and the independent code branch is a code branch with a customization demand; the compiling unit is used for compiling source codes of different code branches based on compiling requirements of different code branches and a target deployment environment to obtain an executable code package; the deployment adaptation unit is used for generating a corresponding deployment file or configuration script according to the environment type of the target deployment environment and performing resource allocation and configuration adjustment, and the environment type comprises local deployment, cloud deployment and containerization deployment; and the release process unit is used for releasing the executable code package to the test environment, the pre-release environment and the target deployment environment in stages based on a preset release strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer program development and management, and in particular to a program package management system, method, device and storage medium. Background Art

[0002] In the field of software development and operation and maintenance, with the continuous diversification of enterprise business needs and the rapid iteration of customer customized functions, the development and deployment mode of program code has become increasingly complex. In order to meet the needs of rapid business launch, frequent iteration and customization, enterprises often need to branch out independent code branches for each customer or project based on the trunk code in order to carry out differentiated function development and maintenance. At the same time, the rise of various deployment methods such as local deployment, cloud deployment and container deployment has made the software present a complex multi-level and cross-environment structure from development to final launch.

[0003] However, traditional code management methods rely on manual merging and conflict resolution of different branches by humans or simple scripts, lacking intelligent merging rules and parameter adjustment mechanisms. When faced with a large number of customer-customized code branches, this manual management method can easily lead to branch version confusion, frequent code conflicts, and lengthy merging processes. In addition, in the release and deployment stages, existing systems are often unable to automatically tune compilation parameters and generate deployment scripts for a variety of deployment environments. Therefore, there is an urgent need for a unified, automated, and intelligent management system that can reduce the workload of R&D and operation teams while improving the efficiency of software launches and the stability of product quality. Summary of the invention

[0004] The purpose of the present invention is to provide a package management system, method, device and storage medium, which aims to establish associations between multiple independent code branches with customized requirements and trunk branches, realize automatic merging, publishing and flexible deployment, thereby greatly improving the automation, adaptability and security of code management.

[0005] To achieve the above objectives, on the one hand, the present application provides a package management system, including: A branch management unit, used to create an independent code branch and record the association relationship between the independent code branch and the trunk branch, wherein the independent code branch is a code branch with customized requirements; The compilation unit is used to compile the source code of different code branches based on the compilation requirements of different code branches and the target deployment environment to obtain executable code packages; A deployment adaptation unit, configured to generate corresponding deployment files or configuration scripts according to the environment type of the target deployment environment, and perform resource allocation and configuration adjustment, wherein the environment type includes local deployment, cloud deployment, and containerized deployment; A release process unit, used to release the executable code package to a test environment, a pre-release environment, and a target deployment environment in stages based on a preset release strategy; The branch management unit, the compilation unit, the deployment adaptation unit and the release process unit automatically trigger the compilation, release and deployment processes based on preset rules under a unified management logic.

[0006] As a further improvement of the present application, the branch management unit further includes a conflict detection subunit, which is used to perform difference analysis and conflict detection on the independent code branch and the trunk branch before executing the merge instruction; The branch management unit is also used to analyze the impact on the independent code branch based on preset rules when the main branch is updated, and provide a merge suggestion or an automatic merge solution based on the merge rules and the impact.

[0007] As a further improvement of the present application, the branch management unit is used to adjust the merging rule based on at least a historical conflict rate of merging the independent code branch and the trunk branch.

[0008] As a further improvement of the present application, the compilation unit is used to apply corresponding compilation parameters to different environment types.

[0009] As a further improvement of the present application, the compilation unit is also used to adopt a layered cache management method for the image layer when generating a container image, and the container image adopts a layered structure and includes at least two of the image layers.

[0010] As a further improvement of the present application, the publishing process unit calls a pre-configured security scanning program during the publishing process to perform vulnerability scanning and security verification on the executable code package.

[0011] As a further improvement of the present application, the release process unit, when triggering the code release process, connects to the approval process of the office application through the external approval interface, and continues the release step after obtaining the approval instruction.

[0012] As a further improvement of the present application, the release process unit generates a release record after completing the code release process, and the release record includes compilation parameters, approval records, deployment environment and security check results.

[0013] As a further improvement of the present application, the system further includes: The environment management unit is used to provide access parameters and configuration data for the test environment, pre-release environment, SAAS (Software As A Service) environment, and at least two sets of local or private environments; The publishing process unit is further used to determine a publishing environment for publishing the code package based on the output data of the environment management unit.

[0014] As a further improvement of the present application, the deployment adaptation unit is used to generate a deployment manifest file that meets the requirements of the container orchestration engine during containerized deployment, and adjust the number of container replicas based on the service load.

[0015] On the other hand, the present application provides a package management method, the method comprising: Create an independent code branch and record the association between the independent code branch and the trunk branch, wherein the independent code branch is a code branch with customized requirements; Based on the compilation requirements of different code branches and the target deployment environment, compile the source code of different code branches to obtain executable code packages; Generate corresponding deployment files or configuration scripts according to the environment type of the target deployment environment, and perform resource allocation and configuration adjustments, wherein the environment type includes local deployment, cloud deployment, and containerized deployment; Based on a preset release strategy, the executable code package is released in stages to a test environment, a pre-release environment, and a target deployment environment; The branch management unit, the compilation unit, the deployment adaptation unit and the release process unit automatically trigger the compilation, release and deployment processes based on preset rules under a unified management logic.

[0016] On the other hand, the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the package management method of any aspect described above.

[0017] On the other hand, the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute any aspect of the package management method.

[0018] On the other hand, the present application provides a computer program product, including a computer program, which implements the package management method according to any aspect when executed by a processor.

[0019] The solution provided in the embodiment of the present application has at least the following beneficial effects: In the embodiment of the present application, intelligent branch management is used to reduce code conflicts and merging difficulties, and efficient collaboration between multiple customer customized branches and trunk branches is achieved. In addition, during the compilation and deployment stages, by optimizing compilation parameters and automatically generating deployment files for the deployment environment, flexible publishing and scaling management of local, cloud and container multi-environment scenarios is achieved. In addition, by introducing security scanning and approval processes in the release process, the compliance and security of executable code packages are ensured, and by automated management of environmental parameters and release records, the traceability and controllability of the release process are enhanced, thereby significantly improving the overall efficiency and quality of software development, release and operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of a program package management system provided by an exemplary embodiment of the present application is shown; Figure 2 A schematic diagram of a branch management interface corresponding to a program package management system client provided by an exemplary embodiment of the present application is shown; Figure 3 A schematic diagram of a package management system client approval interface provided by an exemplary embodiment of the present application is shown; Figure 4 A schematic diagram of an interface of a pipeline management module in a package management system client provided by an exemplary embodiment of the present application is shown; Figure 5 A schematic diagram showing the management of multiple pipelines of a package management system client provided by an exemplary embodiment of the present application is shown; Figure 6 A flowchart of a program package management method provided by an exemplary embodiment of the present application is shown; Figure 7 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0021] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all included in the protection scope of the present invention.

[0022] It should be noted that the term "comprises" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In addition, the terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0023] Please refer to Figure 1 , which shows a schematic diagram of a package management system provided by an exemplary embodiment of the present application, including a branch management unit 100, a compilation unit 200, a release process unit 300 and a deployment adaptation unit 400.

[0024] The branch management unit 100, the compilation unit 200, the deployment adaptation unit 400 and the release process unit 300 automatically trigger the compilation, release and deployment processes based on preset rules under a unified management logic.

[0025] The branch management unit 100 is used to create an independent code branch and record the association relationship between the independent code branch and the trunk branch.

[0026] In a possible implementation, when a trunk branch is updated, the branch management unit 100 analyzes the impact of the update on the independent code branch according to a predetermined rule, and generates a merge suggestion or executes a merge instruction.

[0027] In addition, during the software development process, the branch management unit 100 is used to create, maintain, merge and delete code branches.

[0028] Among them, an independent code branch is a code branch with customized requirements, that is, a code product developed by developers for different functions or customized requirements. For example, when developing a large software project, an independent code branch is created for the development of each new function, or an independent code branch is created based on the customized function proposed by the customer. After the development is completed, the independent code branch is managed by the branch management unit 100 and merged back to the main branch or other related branches.

[0029] The branch management unit 100 includes Git, which is a distributed version control system used to participate in branch creation, switching, merging, deletion and management.

[0030] The compiling unit 200 is connected to the branch management unit 100 , and is used to compile source codes of different code branches based on the compilation requirements of different code branches and the target deployment environment to obtain executable code packages.

[0031] The source code written in a high-level programming language is converted into a machine language or bytecode that can be understood and executed by a computer by the compiling unit 200 .

[0032] The release process unit 300 is connected to the compilation unit 200 and the branch management unit 100, and is used to release the executable code package to the test environment, the pre-release environment and the target deployment environment in stages based on a preset release strategy.

[0033] Release refers to pushing a tested and verified software product from a development and testing environment to an actual use environment. The software product is the executable code package in the embodiment of the present application, which includes executable files, configuration files, documents, etc.

[0034] The release process unit 300 also includes an approval subunit 310, which is used to connect to the approval process of the office application through an external interface when the code release process is triggered, and continue the release step after obtaining the approval instruction.

[0035] The deployment adaptation unit 400 is in communication connection with the release process unit 300, and is used to generate corresponding deployment files or configuration scripts according to the environment type of the target deployment environment, and perform resource allocation and configuration adjustment, wherein the environment type includes local deployment, cloud deployment and containerized deployment.

[0036] Deployment refers to installing the software system into the production environment (i.e. the target deployment environment) and configuring it so that it can run normally. The production environment includes servers, cloud platforms, etc.

[0037] Among them, the deployment adaptation unit 400 includes Kubernetes and helm. Kubernetes (Kubernetes) is an open source container orchestration platform. A container is a lightweight, independently running software unit. The main function of Kubernetes is to manage these containers and ensure that they can run efficiently and stably in a cluster environment. Helm is a package manager for Kubernetes (Kubernetes) and is used to define Kubernetes resources using templates.

[0038] In addition, it also includes an environment management unit 500, which is used to provide access parameters and configuration data for a test environment, a pre-release environment, a SAAS environment, and at least two sets of local or private environments. In the figure, it includes a SAAS environment, two sets of private environments Private Cloud 1 and Private Cloud 2, and two sets of local environments Privatization 1 and Privatization 2.

[0039] In summary, in the embodiments of the present application, intelligent branch management is used to reduce code conflicts and merging difficulties, and efficient collaboration between multiple customer customized branches and trunk branches is achieved. In addition, during the compilation and deployment stages, the compilation parameters are optimized for the deployment environment and deployment files are automatically generated to achieve flexible publishing and scaling management for local, cloud and container multi-environment scenarios. In addition, by introducing security scanning and approval processes in the release process, the compliance and security of executable code packages are ensured, and by automated management of environmental parameters and release records, the traceability and controllability of the release process are enhanced, thereby significantly improving the overall efficiency and quality of software development, release and operation and maintenance.

[0040] In a possible implementation, the branch management unit is also used to analyze the impact on independent code branches based on preset rules when the main branch is updated. Therefore, when facing multiple customer customization requirements, the customer customization branches can be associated with the main branch and recorded. When the main branch is updated, the impact on the independent code branch is automatically analyzed, thereby reducing the complexity and error rate of manual merging operations.

[0041] The branch management unit can predict branch differences and adjust preset rules according to the algorithm, so as to keep different independent code branches in continuous synchronization with the main branch and improve code management efficiency.

[0042] Please refer to Figure 2 , which shows a schematic diagram of the branch management interface corresponding to the package management system client provided by an exemplary embodiment of the present application. The interface is used to display branch changes, including change numbers, change items, change status, code branches, etc. As can be seen from the figure, the five change items in the table correspond to different independent code branches of the same trunk branch "Feature".

[0043] Optionally, the branch management unit 100 includes a conflict detection subunit, which is used to perform difference analysis and conflict detection on independent code branches and trunk branches before executing the merge instruction, and generate processing instructions during the detection.

[0044] Illustratively, when the system detects an update to the main branch, the branch management unit determines the impact of the update on each independent code branch based on preset rules, and calls the conflict detection subunit to compare the code blocks, configuration files, and function implementation points before preparing for the merge, thereby identifying potential conflicts.

[0045] During the co-evolution of the main branch and multiple independent code branches, the conflict detection subunit accurately analyzes the code differences between the main branch to be merged and multiple independent code branches by accessing the submission records and version information of the corresponding branches in the code repository.

[0046] When a conflict is detected, the conflict detection subunit automatically generates corresponding processing instructions, for example, prompting the developer to handle it manually, or calling a predefined conflict resolution strategy for the current conflict situation, thereby minimizing version confusion and code errors caused by manual intervention in the merge process.

[0047] In addition, in the absence of potential conflicts, the branch management unit 100 is further configured to provide merging suggestions or automatic merging solutions based on merging rules and impact conditions.

[0048] Optionally, the branch management unit 100 adjusts the merge rule based on at least a historical conflict rate of merging independent code branches and trunk branches.

[0049] For example, for branches with a high historical conflict rate, the system calls the conflict detection subunit to perform a more in-depth difference analysis before performing a merge operation, thereby reducing potential conflicts in the merge.

[0050] Optionally, in the process of the branch management unit 100 promoting the evolution of multiple independent code branches and the trunk branch, the branch management unit 100 monitors and analyzes each independent code branch, and incorporates the branch update frequency, the historical conflict rate in previous merging processes, and identification information related to specific functions into the adjustment considerations of the merging rules.

[0051] For example, the branch management unit 100 can also perform a comprehensive analysis based on the update frequency and historical conflict rate of the independent code to adjust the merging rules. For branches with a high update frequency, the sensitivity of automatic merging and conflict prediction can be appropriately increased to reduce the burden of manual processing.

[0052] For branches with specific functional labels, the system customizes specific rules for the branch, such as giving priority to security-sensitive functions, or merging critical business functions, etc., to ensure that the update of such branches is more rigorous and efficient, and to avoid merge conflicts.

[0053] In the embodiment of the present application, by introducing the conflict detection subunit, it is beneficial for the system to efficiently manage multiple independent code branches in more customized scenarios, check the iteration delay caused by the merge conflict, and ensure the continuous synchronization and stability of the independent code branch and the trunk branch, thereby laying a good foundation for the subsequent compilation, release and deployment process. In addition, merging based on preset merge rules and adjusting the merge rules, combined with the overall automation logic of the system, is conducive to effectively maintaining the orderliness and controllability of code version management in complex scenarios where the code continues to evolve and is frequently updated.

[0054] In another possible implementation, after detecting changes in the independent branch, the compilation unit uses corresponding compilation parameters to optimize and construct the code according to the environment type involved, so that the generated executable code package can adapt to different deployment scenarios.

[0055] Optionally, the compilation unit 200 is used to apply corresponding compilation parameters for different environment types. After the independent code branch is determined, when the compilation unit 200 receives the code change instruction transmitted by the branch management unit 100, the type of the target deployment environment is first determined according to a predetermined strategy, wherein the target deployment environment may be local deployment, cloud deployment, and containerized deployment.

[0056] The compilation unit 200 compiles the code in a targeted manner according to the requirements of different independent code branches and the deployment environment. Different code parameters may affect the performance and distribution of the generated executable file or intermediate code. For example, for cloud deployment scenarios with higher performance requirements, the compilation unit 200 will perform more optimization compilation.

[0057] Optionally, for a local deployment environment, the compilation unit 200 may use relatively standardized compilation parameters to quickly generate executable files and related configurations suitable for running on a local server; for a cloud deployment environment, the compilation unit 200 applies corresponding compilation parameters according to the specific requirements of the cloud platform and performance optimization requirements, so that the generated executable code has better scalability and resource utilization efficiency, for example, runtime optimization, reducing image size, and speeding up pulling speed; for containerized deployment, the compilation unit 200 uses compilation parameters and image layered construction strategies adapted to the container environment according to the requirements of the container runtime and orchestration tools, thereby generating a product that conforms to the container image specification.

[0058] In another possible implementation, the compilation unit 200 is further configured to adopt a hierarchical cache management method for the image layer when generating the container image.

[0059] The container image adopts a layered structure and includes at least two image layers. Optionally, in the embodiment of the present application, when the compilation unit 200 generates an image file for containerized deployment, the image content is decomposed into multiple layers, each layer storing a specific dependent environment, basic operating system components or application code.

[0060] The system adopts a layered cache management mechanism. When the content of the base layer or dependent layer has not changed, the compilation unit 200 can directly reuse the previously built image layer cache without rebuilding all levels, thereby significantly reducing the time for scene construction and update, as well as resource consumption.

[0061] In a possible implementation, the deployment adaptation unit 400 is used to generate a deployment manifest file that meets the requirements of the container orchestration engine (Kubernetes) during containerized deployment, and adjust the number of container replicas based on the service load.

[0062] When the system determines that the target deployment environment is a containerized deployment scenario, the deployment adaptation unit 400 will automatically generate a deployment manifest file that complies with the container orchestration engine standard based on the compilation results and the corresponding environment parameters. For example, it can automatically generate a YAML format deployment manifest file that complies with the Kubernetes standard.

[0063] Optionally, the deployment manifest defines the source of the container image, resource limits, port mappings, storage volume mounts, and service access policies, so that Kubernetes can automatically create, manage, and monitor container instances according to the configuration specified in the manifest.

[0064] In addition, the deployment adaptation unit 400 can dynamically adjust the number of container replicas according to the current service load and monitoring indicators (such as the number of requests or CPU and memory usage), and automatically achieve horizontal expansion and contraction. This allows the number of container instances to be quickly increased during business peaks, maintaining high availability and high performance of the system, and automatically reducing the number of instances during business troughs, thereby saving resource costs.

[0065] In the embodiment of the present application, hierarchical cache management of the image layer is beneficial to improving the transmission and distribution efficiency of the image. In the continuous delivery and multi-environment deployment scenarios, only the change layer needs to be updated to quickly complete the delivery of the new version of the image. And it allows the container image to still be efficiently iterated and expanded in complex scenarios with multiple customized requirements and multiple deployment environments, providing more efficient basic support for subsequent pipeline release and deployment adaptation, and further improving the overall delivery speed and resource utilization of the system. In addition, by selecting corresponding compilation parameters for different environment types, the adaptability and performance of the compilation results can be taken into account in diversified deployment scenarios, so that the application end does not need to repeat configuration and adjustment for various environments, reducing subsequent deployment costs and making it more applicable.

[0066] In another possible implementation, the publishing process unit 300 calls a pre-configured security scanning program during the publishing process to perform vulnerability scanning and security verification on the executable code package.

[0067] In an embodiment of the present application, after the compilation unit 200 generates a compilation product (executable code package), the pipeline management unit performs security detection operations on the executable code package at each stage in the process of publishing the executable code package to a test environment, a pre-release environment or a target environment according to a predefined release strategy.

[0068] This security scanner can quickly locate and intercept potential security vulnerabilities, backdoor codes or known security defects in executable code packages based on the scanning tools and security rule bases commonly used in the current industry, and ensure that the product has not been maliciously tampered with through digital signature verification.

[0069] During the security scan process, if vulnerability information is found, the analysis results will be fed back to the system administrator or developer so that timely measures can be taken to fix the problem before it is put into the production environment.

[0070] In the embodiments of the present application, reliable security testing steps are embedded in the automated release pipeline, which not only improves the credibility and reliability of the released products, but also reduces the risk of security vulnerabilities being embedded in the production environment, and provides necessary security protection in the complex and ever-changing release and deployment processes.

[0071] In addition, when the code release process is triggered, the release process unit 300 connects to the approval process of the office application through the external approval interface, and continues the release step after obtaining the approval instruction.

[0072] Optionally, in the key steps of the release process, the release process unit 300 can automatically push the online request of the product to be released to the approval module of the office application on the enterprise side through the external approval interface according to the internal management rules, business processes and organizational structure of the enterprise, thereby starting the approval process. And after the approval is passed, the enterprise side feeds back the approval instruction, and then the system continues the release step.

[0073] In the approval module on the enterprise side, you can configure the corresponding approval rules, including whether multi-level approval is required, whether confirmation by personnel with specific authority is required, etc. After the approval process is started, relevant personnel can directly perform approval operations in the office application interface.

[0074] Please refer to Figure 3 , which shows a schematic diagram of the package management system client approval interface provided by an exemplary embodiment of the present application, including information such as applicant, service name, publishing content, publishing environment, start time, end time, and publishing window. In addition, during the approval process, it can be sent to the department manager and the enterprise-side personnel with specific authority for approval.

[0075] Adding the approval process to the automated release process avoids the tedious steps that traditionally rely on manual communication, and ensures compliance and transparency in the release process, ensuring that each executable code package that goes online is reviewed and confirmed by the relevant responsible parties.

[0076] In a possible implementation, the release process unit 300 generates a release record after completing the code release process, and the release record includes compilation parameters, approval records, deployment environment, and security check results. When the system completes the generation of the executable code package and releases it to the corresponding environment, the release process unit 300 automatically records the release process and generates a similar release record.

[0077] The release record includes the parameter information used during compilation, such as specific optimization parameters and dependency library configurations for different environment applications; the approval record fed back by the external approval interface, including the approval initiation time, the identity of the approver, the approval instruction results, etc.; the configuration data of the target deployment environment, such as network access parameters, permission policies, resource allocation plans, etc.; and also includes the results of security checks such as security scans and digital signature verification performed during the release process.

[0078] Please refer to Figure 4 , which shows a schematic diagram of the interface of the pipeline management module in the package management system client provided by an exemplary embodiment of the present application. Among them, the local deployment process includes "build → local deployment → test verification → release checkpoint (approval node) → review deployment → test verification → privatization branch → completion".

[0079] Optionally, the publishing process unit 300 can manage multiple pipelines based on multiple publishing environments. Figure 5 , which shows a schematic diagram of multiple pipeline management of a package management system client provided by an exemplary embodiment of the present application. It includes QA (Quality Assurance) release pipeline management, ST (Software Testing) release pipeline management and UAT&PROD (User Acceptance Testing&Production) gray release pipeline management, wherein the QA release and ST release processes include "build → release checkpoint → QA deployment / ST deployment → test verification", and the UAT&PROD gray release process includes "build → pre-release deployment → test verification → release checkpoint → production deployment → test verification → merge to trunk → completion".

[0080] The above information is automatically generated and archived by the release process unit 300, which is conducive to later problem tracing, compliance review, etc. In addition, the enterprise side can quickly locate and interpret potential problems based on the release records, improve the transparency and decision-making efficiency of subsequent version management, and conduct in-depth analysis of the delivery process customized for key customer needs and environments, which is helpful to further improve the branch management strategy and compile optimization rules, thereby continuously improving the overall quality and reliability of the system in iterations.

[0081] In the above embodiment, the release record includes configuration data of the target deployment environment, and these data may be obtained through the environment management unit 500 in the system.

[0082] That is, the package management system also includes an environment management unit 500 for providing access parameters and configuration data for a test environment, a pre-release environment, a SAAS environment, and at least two sets of local or private environments.

[0083] After the environment management unit 500 provides the above data, the publishing process unit 300 determines the publishing environment of the publishing code package based on the output data of the environment management unit 500 .

[0084] Optionally, the environment management unit 500 pre-stores and maintains access parameters, network configurations, and related authentication information for various environments, and can dynamically provide these environment information to the pipeline management unit. When the compilation product is generated, the pipeline management unit can retrieve the corresponding environment parameters from the environment management unit 500 according to the predefined release strategy and the current release stage, thereby deciding to release the executable code package to the test environment, pre-release environment, SAAS environment, or a specific local or privatized environment to meet the deployment preferences and compliance requirements of different customers.

[0085] During this process, the pipeline management unit can quickly complete environment switching and adaptation through the environment management unit 500 without human intervention, reducing the complexity and error rate of environment configuration, and helping to achieve continuous integration and continuous delivery of software in multi-environment scenarios.

[0086] By organically integrating the environment management unit 500 and the pipeline management unit, this implementation further improves the flexibility and automation of the system in complex deployment scenarios, while ensuring that the product is verified and launched in an appropriate environment, thereby improving the overall operation and maintenance efficiency and quality control level of the system.

[0087] Please refer to Figure 6 , which shows a flowchart of a program package management method provided by an exemplary embodiment of the present application, the method comprising the following steps: Step 601, create an independent code branch, and record the association relationship between the independent code branch and the trunk branch, the independent code branch is a code branch with customized requirements.

[0088] Step 602, based on the compilation requirements of different code branches and the target deployment environment, compile the source codes of different code branches to obtain executable code packages.

[0089] Step 603: Generate corresponding deployment files or configuration scripts according to the environment type of the target deployment environment, and perform resource allocation and configuration adjustment.

[0090] Among them, environment types include local deployment, cloud deployment, and containerized deployment.

[0091] Step 604: based on a preset release strategy, the executable code package is released in stages to a test environment, a pre-release environment, and a target deployment environment.

[0092] Among them, the branch management unit 100, the compilation unit 200, the deployment adaptation unit 400 and the release process unit 300 automatically trigger the compilation, release and deployment process based on preset rules under a unified management logic.

[0093] In summary, the package management method provided in the embodiment of the present application can reduce code conflicts and merging difficulties through intelligent branch management, realize efficient collaboration between multiple customer customized branches and trunk branches, and realize flexible publishing and scaling management of local, cloud and container multi-environment scenarios by optimizing compilation parameters and automatically generating deployment files for the deployment environment during the compilation and deployment stages. In addition, by introducing security scanning and approval processes in the release link, the compliance and security of executable code packages are ensured, and by automating the management of environmental parameters and release records, the traceability and controllability of the release process are enhanced, thereby significantly improving the overall efficiency and quality of software development, release and operation and maintenance.

[0094] Please refer to Figure 7 , which shows a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application, which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device 700 in the present application may include one or more of the following components: a processor 710 and a memory 720.

[0095] Optionally, the processor 710 executes the steps of the package management method provided in any of the above embodiments by running or executing instructions, programs, code sets or instruction sets stored in the memory 720, and calling data stored in the memory 720.

[0096] In addition, the processor can also perform various functions of the device and process data. Optionally, the processor 710 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 710 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 710, but may be implemented separately through a chip.

[0097] The memory 720 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 720 includes a non-transitory computer-readable storage medium. The memory 720 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data created according to the use of the device (such as audio data, a phone book), etc.

[0098] The device in the embodiment of the present application further includes a communication component 730 and a display component 740. The communication component 730 may be a Bluetooth component, a WiFi component, an NFC (Near Field Communication) component, etc., for communicating with an external device (server or other device) via a wired or wireless network; the display component 740 is used to display a graphical user interface and / or receive user interaction operations.

[0099] Optionally, the electronic device includes a computer system, which may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0100] In addition, those skilled in the art will appreciate that the structure of the device shown in the above drawings does not constitute a limitation on the device, and the device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the device also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a speaker, and a power supply, which will not be described in detail here.

[0101] An embodiment of the present application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the storage medium stores at least one program code, and the program code is loaded and executed by a processor to implement the program package management method of any of the above embodiments.

[0102] In the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0103] The embodiment of the present application provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. When the computer program is executed by a processor, the computer program implements the package management method of any of the above embodiments.

Claims

1. A program package management system, characterized in that: The system comprises: A branch management unit, used to create an independent code branch and record the association relationship between the independent code branch and the trunk branch, wherein the independent code branch is a code branch with customized requirements, and the branch management unit includes a conflict detection subunit; The compilation unit is used to compile the source code of different code branches based on the compilation requirements of different code branches and the target deployment environment to obtain executable code packages; A deployment adaptation unit, configured to generate corresponding deployment files or configuration scripts according to the environment type of the target deployment environment, and perform resource allocation and configuration adjustment, wherein the environment type includes local deployment, cloud deployment, and containerized deployment; A release process unit, used to release the executable code package to a test environment, a pre-release environment, and a target deployment environment in stages based on a preset release strategy; The conflict detection subunit is used to perform difference analysis and conflict detection on the independent code branch and the trunk branch before executing the merge instruction; The branch management unit is further configured to analyze the impact on the independent code branch based on preset rules when the trunk branch is updated, and provide a merge suggestion or an automatic merge solution based on the merge rule and the impact; The branch management unit is further configured to adjust the merge rule based on at least a historical conflict rate of merging the independent code branch and the trunk branch; The branch management unit, the compilation unit, the deployment adaptation unit and the release process unit automatically trigger the compilation, release and deployment processes based on preset rules under a unified management logic.

2. The system according to claim 1, characterized in that The compilation unit is used to apply corresponding compilation parameters to different environment types.

3. The system according to claim 2, characterized in that The compilation unit is further used to adopt a hierarchical cache management method for the image layer when generating a container image. The container image adopts a hierarchical structure and includes at least two of the image layers.

4. The system according to claim 1, characterized in that The publishing process unit calls a pre-configured security scanning program during the publishing process to perform vulnerability scanning and security verification on the executable code package.

5. The system according to claim 1, characterized in that The release process unit, when triggering the code release process, connects to the approval process of the office application through an external interface, and continues the release step after obtaining the approval instruction.

6. The system according to claim 5, characterized in that The release process unit generates a release record after completing the code release process, and the release record includes compilation parameters, approval records, deployment environment and security check results.

7. The system according to claim 1, characterized in that The system further comprises: The environment management unit is used to provide access parameters and configuration data for the test environment, pre-release environment, SAAS environment, and at least two sets of local or private environments; The publishing process unit is further used to determine a publishing environment for publishing the code package based on the output data of the environment management unit.

8. The system according to claim 1, wherein: The deployment adapter unit is used to generate a deployment manifest file that meets the requirements of the container orchestration engine during containerized deployment, and adjust the number of container replicas based on the service load.

9. A method for managing a program package, characterized in that: The method comprises: Create an independent code branch and record the association between the independent code branch and the trunk branch, wherein the independent code branch is a code branch with customized requirements; Based on the compilation requirements of different code branches and the target deployment environment, compile the source code of different code branches to obtain executable code packages; Generate corresponding deployment files or configuration scripts according to the environment type of the target deployment environment, and perform resource allocation and configuration adjustments, wherein the environment type includes local deployment, cloud deployment, and containerized deployment; Based on a preset release strategy, the executable code package is released in stages to a test environment, a pre-release environment, and a target deployment environment; The method further comprises: Before executing the merge instruction, performing difference analysis and conflict detection on the independent code branch and the trunk branch; In the case of updating the trunk branch, analyzing the impact on the independent code branch based on preset rules, and providing a merge suggestion or automatic merge solution based on the merge rules and the impact; Adjusting the merge rule based at least on a historical conflict rate of merging the independent code branch and the trunk branch; Among them, the compilation, release and deployment processes are automatically triggered based on preset rules under a unified management logic.

10. An electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the package management method of claim 9.

11. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the package management method according to claim 9.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the program package management method according to claim 9.

Citation Information

Patent Citations

  • Software integration and deployment method and device, server and storage medium

    CN109683912A

  • Software integration and deployment method and software development management system

    CN115904959A

  • Intelligent compiling method and system of software development kit based on cloud platform

    CN118760434A