CN117908949A - Packet release management method and system - Google Patents

Packet release management method and system Download PDF

Info

Publication number
CN117908949A
CN117908949A CN202410295512.9A CN202410295512A CN117908949A CN 117908949 A CN117908949 A CN 117908949A CN 202410295512 A CN202410295512 A CN 202410295512A CN 117908949 A CN117908949 A CN 117908949A
Authority
CN
China
Prior art keywords
service
software package
test
pipeline
release
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410295512.9A
Other languages
Chinese (zh)
Other versions
CN117908949B (en
Inventor
党程程
董星利
郝闯
段梦
聂鹏
纪哲
方文超
田郑书媛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Yanyu Aerospace Technology Co ltd
Original Assignee
Xi'an Yanyu Aerospace Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Yanyu Aerospace Technology Co ltd filed Critical Xi'an Yanyu Aerospace Technology Co ltd
Priority to CN202410295512.9A priority Critical patent/CN117908949B/en
Publication of CN117908949A publication Critical patent/CN117908949A/en
Application granted granted Critical
Publication of CN117908949B publication Critical patent/CN117908949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method and a system for packet release management, which relate to the technical field of computers and comprise the following steps: acquiring a software package, recording code changes corresponding to the software package through a version control tool, creating and naming a release branch on a main development branch, updating a version number on the release branch, setting an automatic test unit, performing an automatic integration test and executing a performance test and a safety test; constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism and carrying out an integration test for each stage, deploying a construction result into a pre-release environment and carrying out compliance check; defining a service grid, setting a core component, adding a software package into a lightweight container, carrying out dynamic service deployment on the lightweight container, taking minimum resource use unbalance degree, maximum throughput and minimum response time as optimization targets, and solving the optimization targets through a preset multi-target optimization algorithm to obtain an optimal solution.

Description

Packet release management method and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a system for packet release management.
Background
In the prior art, CN111949308a discloses a software package publishing method and device, which comprises: receiving a packet sending request sent by a user side; determining login state information of the user terminal based on the session identifier carried in the packet sending request; the login state information is used for indicating whether the user side logs in a target software package management system or not; when the user side is determined to be logged in the target software package management system according to the login state information, a target software package to be released is obtained; and calling a package sending interface of a target software package management system, and issuing the target software package.
In summary, although the prior art can realize automatic acquisition and automatic release of a software package, performance of a release task cannot be improved in a software package release process, so that a solution is needed to solve the problems in the prior art.
Disclosure of Invention
The embodiment of the invention provides a packet release management method and system, which at least can solve part of problems in the prior art.
In a first aspect of the embodiment of the present invention, a packet release management method is provided, including:
Acquiring a software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package, naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing automatic integration test and performance test and safety test based on the automatic test unit;
selecting a pipeline construction tool, constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism for each stage, performing integrated test, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline, performing compliance check, and repairing the loophole if the loophole is found;
Defining a service grid, setting a core component based on the service grid, adding the software package into a lightweight container, carrying out dynamic service deployment on the lightweight container under a micro-service architecture through the service grid, taking minimum resource use unbalance degree, maximum throughput and minimum response time as optimization targets, and solving the optimization targets through a preset multi-target optimization algorithm to obtain an optimal solution, wherein the multi-target optimization algorithm is constructed based on an improved chicken group optimization algorithm.
In an alternative embodiment of the present invention,
The method for acquiring the software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package and naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing an automatic integration test and performance test and safety test based on the automatic test unit comprises the following steps:
Acquiring a written software package, importing source codes of the software package through a version control tool, submitting and recording codes of the software package on a main development branch, creating a release branch under the main development branch through the version control tool, naming the release branch according to the version number of the software package, and updating the name of the release branch in real time based on the updating condition of the software package;
Setting an automatic test unit, testing each independent module and function writing unit of the software package, configuring the automatic test unit, and setting different stages of integrated test through a configuration tool to enable the automatic test unit to cover different modules and perform cooperative work;
And performing performance test on the software package by using a performance test tool, defining test scenes under different load conditions, collecting corresponding performance indexes, generating performance parameters, performing static code analysis on the software package by using a security audit tool, performing dynamic security test, simulating different attack scenes and recording the stability of the software package.
In an alternative embodiment of the present invention,
Selecting a pipeline construction tool, constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism for each stage, performing an integration test, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline, performing compliance inspection, and repairing the vulnerability if the vulnerability is found, wherein the method comprises the following steps:
Selecting a pipeline construction tool according to task requirements, creating pipeline items through a visual interface of the pipeline construction tool, and setting a code pulling stage, a unit testing stage and an integration testing stage for the pipeline;
In the code pulling stage, the latest code pulled from the version control tool is configured, the unit testing stage runs an automatic testing unit for each module and ensures correct realization of basic functions, and the plug-in of the pipeline construction tool is used for configuring an integrated testing stage and verifying the cooperative working condition of each module in the software package in the integrated testing stage;
Adding a polling mechanism in each stage, setting polling time and triggering conditions, triggering pipeline execution of a corresponding stage of new submission if new submission is generated, and deploying a construction result to a pre-release environment through a deployment script if the integrated test is completed;
adding a corresponding security audit tool in the pre-release environment, performing static analysis on codes corresponding to the software package, adding compliance checking in the pipeline, checking whether the software package has loopholes and non-compliance codes, returning to be non-compliance if the loopholes and the non-compliance codes exist, waiting for a development team to update the software package, and releasing if the loopholes and the non-compliance codes do not exist.
In an alternative embodiment of the present invention,
The defining a service grid, setting a core component based on the service grid, adding the software package into a lightweight container, and performing dynamic service deployment on the lightweight container under a micro-service architecture through the service grid comprises the following steps:
selecting a service grid platform based on project requirements, installing a core component through the service grid platform, wherein the core component comprises a control plane and a data plane, configuring and managing flow according to the control plane, realizing service communication according to the data plane, and constructing a service grid to ensure that each service is contained by the service grid;
And selecting a lightweight container platform by using a containerization technology, packaging an application program, a runtime environment and dependent items in the software package, generating a mirror image, defining a construction process of the mirror image, deploying a mirror image container, registering the software package to a service registry of a service grid through the mirror image container, defining a flow distribution plan through flow rule configuration corresponding to the service grid platform, configuring a service corresponding to a new version in the control plane, formulating a flow rule, and dynamically adjusting the flow rule until the new version service is completely introduced into a production environment.
In an alternative embodiment of the present invention,
The method for obtaining the optimal solution by solving the optimization target through a preset multi-target optimization algorithm by taking the minimum resource use unbalance degree, the maximum throughput and the minimum response time as the optimization target comprises the following steps:
Collecting the total amount of resources in service instances and the use conditions of the resources under different loads, determining the use rate of the resources corresponding to each service instance, collecting the service processing amount and network delay in the service instance, determining the throughput of the service instance, collecting the processing priority of the service instance, requesting the average processing time of the queue length, determining the response time corresponding to each service instance, and taking the minimum unbalance of the use of the resources, the maximum throughput and the minimum response time as optimization targets;
Generating an initial chicken group and determining the number of individuals in the initial chicken group through a preset multi-objective optimization algorithm, wherein each chicken in the initial chicken group represents a solution corresponding to the optimization objective, the cocks are taken as leaders according to the performances of the individuals in the initial chicken group, the hens are taken as followers, and parameters in the chicken group optimization algorithm are initialized;
the cocks update the current positions according to the performances of the cocks and the hens, the hens update the current positions according to the corresponding cocks, and the chickens update the current positions based on the corresponding hens and random probability, wherein each individual performs local search in the area corresponding to the current positions;
and for each individual in the initial chicken flock, calculating the adaptability of each individual according to the updated position, updating the roles corresponding to the individual based on the adaptability, repeating the updating of the position and the roles until the preset iteration times are reached, and outputting the cock after the last iteration is completed as an optimal solution.
In an alternative embodiment of the present invention,
The following formula is used as an optimization target to minimize resource usage unbalance and maximize throughput and minimize response time:
wherein A represents an optimization objective, A 1 represents a minimum resource usage imbalance, lambda represents a balance factor, N represents a total service instance amount, C i represents a total resource capacity of an ith service instance, U i represents a current resource usage amount of the ith service instance, P i represents an expected load increase rate of the ith service instance, Average resource usage of all service instances is represented, a 2 represents maximum throughput, T i represents processing capacity of the ith service instance, L i represents average network delay of the ith service instance, D i represents other service number on which the ith service instance depends, α represents network delay adjustment factor, β represents service dependency adjustment factor, a 3 represents minimum response time, S i represents average time for processing requests of the ith service instance, Q i represents request queue length of the ith service instance, and W i represents processing priority of the ith service instance.
In an alternative embodiment of the present invention,
The cock updates the current position according to the own and the hen's expression as follows:
Wherein, X t represents the updated position of the cock, X t-1 represents the current position of the cock, θ represents the scale factor of the cock moving to the position of the hen, X y-1 represents the current position of the hen, η represents the step size coefficient of the cock exploring the new position, and R represents a random number ranging between-1 and 1.
In a second aspect of the embodiment of the present invention, there is provided a packet release management system, including:
The first unit is used for acquiring a software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package and naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing an automatic integration test and a performance test and a safety test based on the automatic test unit;
The second unit is used for selecting a pipeline construction tool and constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism and carrying out an integration test for each stage, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline and carrying out compliance inspection, and repairing the loopholes if the loopholes are found;
And a third unit, configured to define a service grid, set a core component based on the service grid, add the software package to a lightweight container, dynamically deploy the lightweight container under a micro-service architecture through the service grid, and solve the optimization objective through a preset multi-objective optimization algorithm by taking minimum resource usage unbalance, maximum throughput and minimum response time as optimization objectives, so as to obtain an optimal solution, where the multi-objective optimization algorithm is constructed based on an improved chicken crowd optimization algorithm.
In a third aspect of an embodiment of the present invention,
There is provided an electronic device including:
A processor;
A memory for storing processor-executable instructions;
Wherein the processor is configured to invoke the instructions stored in the memory to perform the method described previously.
In a fourth aspect of an embodiment of the present invention,
There is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method as described above.
In the invention, code change is recorded through a version control tool, the traceability and maintainability of the code are ensured, a release branch is created on a main development branch, so that codes of different versions can be independently managed in the release process, a polling mechanism is used, the code change is timely detected and processed, error integration is reduced, a lightweight container is used for dynamic service deployment, the flexibility and the scalability of a system are improved, a preset multi-objective optimization algorithm is utilized, the optimal solution is found in an automatic mode, the overall efficiency of the system is improved, and in combination, the invention uses various technical means to enable the whole software development and deployment process to be more efficient, reliable and safe.
Drawings
FIG. 1 is a flow chart of a method for managing package release according to an embodiment of the present invention;
Fig. 2 is a schematic structural diagram of a packet release management system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 1 is a flow chart of a packet release management method according to an embodiment of the present invention, as shown in fig. 1, where the method includes:
S1, acquiring a software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package, naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing an automatic integration test and executing a performance test and a safety test based on the automatic test unit;
the software package is a packaged and distributable application program or library, and usually contains codes, dependent items, configuration files and the like for executing a certain function, the version control tool is used for managing and tracking the change of the codes and collaborative development process, the development branch is a main development line of the whole project, the release branch is used for testing, version number updating and other operations before the release of the software package, the release stability is ensured, and the automatic test unit is a set of automatically executed test cases for verifying the correctness of the codes.
In an alternative embodiment of the present invention,
The method for acquiring the software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package and naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing an automatic integration test and performance test and safety test based on the automatic test unit comprises the following steps:
Acquiring a written software package, importing source codes of the software package through a version control tool, submitting and recording codes of the software package on a main development branch, creating a release branch under the main development branch through the version control tool, naming the release branch according to the version number of the software package, and updating the name of the release branch in real time based on the updating condition of the software package;
Setting an automatic test unit, testing each independent module and function writing unit of the software package, configuring the automatic test unit, and setting different stages of integrated test through a configuration tool to enable the automatic test unit to cover different modules and perform cooperative work;
And performing performance test on the software package by using a performance test tool, defining test scenes under different load conditions, collecting corresponding performance indexes, generating performance parameters, performing static code analysis on the software package by using a security audit tool, performing dynamic security test, simulating different attack scenes and recording the stability of the software package.
The integrated test is a software test method for verifying whether different components of the system work cooperatively and normally or not, the dynamic security test is a method for detecting loopholes and security problems of an application program and the system in real time by simulating an attacker, the method comprises active scanning, penetration test, loophole scanning and the like, the method is used for evaluating the security of the system in actual operation, and the security audit tool is a tool for analyzing codes and identifying potential security problems.
Acquiring source codes of written software packages from an official warehouse or other sources of the software packages, importing the source codes of the software packages into a version control system by using a selected version control tool (such as Git), submitting and recording the codes of the software packages on a main development branch, creating and switching to the main development branch, submitting initial codes of the software packages, creating a new release branch under the main development branch, naming the new release branch as an initial software package version number, and updating the names of the release branches in real time according to the new version number along with updating of the software packages;
Aiming at each independent module and function of the software package, writing a unit test, configuring a test unit in an automatic test framework to ensure that the test covers each module, configuring different stages of integrated test in a CI/CD pipeline to ensure the cooperative work of different modules, and selecting a proper performance test tool (such as ApacheJMeter, locust) for performing performance test on the software package;
According to the use scenes of the software package, defining performance test scenes under different load conditions, selecting proper security audit tools (such as SonarQube) and dynamic security test tools, performing static code analysis by using the security audit tools, checking potential vulnerabilities and unsafe coding practices, running the dynamic security test tools, and simulating actual attack scenes.
In the embodiment, traceable management of source codes of the software package is realized through a version control tool, development and test work before release cannot influence a main development branch by creating a release branch, an automatic test unit covers each independent module and function of the software package, each unit can be ensured to operate correctly during independent test, each module can be ensured to operate normally during cooperative work during an integration test stage, discovery and repair cost of an integration problem is reduced, different load conditions are simulated through a performance test tool, performance of the software package under different conditions can be evaluated, stability and safety of the software package are effectively improved through automatic test, performance test, safety audit and dynamic safety test, and in summary, the embodiment is beneficial to improving quality, reliability and safety of software.
S2, selecting a pipeline construction tool and constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism for each stage, performing integrated test, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline, performing compliance inspection, and repairing the loophole if the loophole is found;
The pipeline construction tool is a tool for automating the process from software development to deployment, the polling mechanism is a mechanism in the pipeline for periodically checking whether a code warehouse in a version control system has new submissions or changes, and the pre-release environment is a stage in the software development life cycle for final testing and verification before formal release.
In an alternative embodiment of the present invention,
Selecting a pipeline construction tool, constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism for each stage, performing an integration test, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline, performing compliance inspection, and repairing the vulnerability if the vulnerability is found, wherein the method comprises the following steps:
Selecting a pipeline construction tool according to task requirements, creating pipeline items through a visual interface of the pipeline construction tool, and setting a code pulling stage, a unit testing stage and an integration testing stage for the pipeline;
In the code pulling stage, the latest code pulled from the version control tool is configured, the unit testing stage runs an automatic testing unit for each module and ensures correct realization of basic functions, and the plug-in of the pipeline construction tool is used for configuring an integrated testing stage and verifying the cooperative working condition of each module in the software package in the integrated testing stage;
Adding a polling mechanism in each stage, setting polling time and triggering conditions, triggering pipeline execution of a corresponding stage of new submission if new submission is generated, and deploying a construction result to a pre-release environment through a deployment script if the integrated test is completed;
adding a corresponding security audit tool in the pre-release environment, performing static analysis on codes corresponding to the software package, adding compliance checking in the pipeline, checking whether the software package has loopholes and non-compliance codes, returning to be non-compliance if the loopholes and the non-compliance codes exist, waiting for a development team to update the software package, and releasing if the loopholes and the non-compliance codes do not exist.
The deployment script is used for deploying the application program or service to the target environment and comprises tasks of a configuration server, an installation dependent item, a starting service and the like, the code pulling stage is the first step of a pipeline and is responsible for pulling the latest code from a version control system, the unit test is a test for the minimum unit (usually a function or a method) of the application program, and the integrated test is a test for the cooperative work among all modules of the application program.
Selecting a pipeline construction tool according to codes used by a software package release task and the format of the software package, creating a new pipeline item by using a visual interface provided by the pipeline construction tool, adding a code pulling stage in a pipeline, configuring the stage to pull the latest codes from a version control tool, periodically checking whether a version control system has new submission, adding a unit test stage, ensuring that the stage can run an automatic test unit for each module, configuring an integration test by using a plug-in of the pipeline construction tool, and setting a polling mechanism so as to trigger the stage when the new submission exists;
adding a polling mechanism in each stage, setting polling time and triggering conditions, triggering pipeline execution of a new submitting corresponding stage if the new submitting is generated, deploying a construction result to a pre-release environment through a deployment script if the integrated test is completed, and deploying the construction result to the pre-release environment by using the deployment script if the integrated test stage is successfully completed;
A security audit tool is added in a pre-release environment, static analysis is carried out on codes of the software package, whether potential vulnerabilities and non-compliance codes exist or not is checked, compliance checking is added in a pipeline, the software package is ensured to meet corresponding compliance standards, if a problem exists, the pipeline returns to a non-compliance state, a development team is required to repair, and if all the checking and testing are passed, the pipeline enters a release stage.
In the embodiment, key steps such as code pulling, unit testing and integrated testing are automated through a pipeline, continuous integration and continuous delivery are realized, problems are found and solved in time, the frequency and quality of software delivery are improved, collaborative work conditions among different modules are verified through plug-in configuration in an integrated testing stage, the quality of software is improved, potential problems in production are reduced, a construction result is automatically deployed to a pre-release environment through a deployment script, normal operation of the software in a simulated production environment is ensured, stability and performance of the software are verified before formal release are facilitated, and in sum, the embodiment can realize more agile, efficient and safe software development and delivery processes, and meanwhile, the quality and reliability of the software are guaranteed.
S3, defining a service grid, setting a core component based on the service grid, adding the software package into a lightweight container, carrying out dynamic service deployment on the lightweight container under a micro-service architecture through the service grid, taking minimum resource use unbalance degree, maximum throughput and minimum response time as optimization targets, and solving the optimization targets through a preset multi-target optimization algorithm to obtain an optimal solution, wherein the multi-target optimization algorithm is constructed based on an improved chicken crowd optimization algorithm.
The service grid is an architecture model for managing and controlling communication between services in a micro-service architecture, the core component generally comprises a control plane and a data plane, the control plane is responsible for service discovery, routing, load balancing, security policy and other management and decision making, the data plane contains agents for actually processing and forwarding traffic, the lightweight container is an independent, portable and deployable runtime environment for packaging and running application programs and dependencies thereof, the micro-service architecture is a method for software design and development, splitting an application program into a plurality of small and autonomous services, each service is focused on a specific business function, and the dynamic service deployment refers to adding new versions or new instances of the service or application programs to existing deployments or removing old versions or unwanted instances at runtime.
In an alternative embodiment of the present invention,
The defining a service grid, setting a core component based on the service grid, adding the software package into a lightweight container, and performing dynamic service deployment on the lightweight container under a micro-service architecture through the service grid comprises the following steps:
selecting a service grid platform based on project requirements, installing a core component through the service grid platform, wherein the core component comprises a control plane and a data plane, configuring and managing flow according to the control plane, realizing service communication according to the data plane, and constructing a service grid to ensure that each service is contained by the service grid;
And selecting a lightweight container platform by using a containerization technology, packaging an application program, a runtime environment and dependent items in the software package, generating a mirror image, defining a construction process of the mirror image, deploying a mirror image container, registering the software package to a service registry of a service grid through the mirror image container, defining a flow distribution plan through flow rule configuration corresponding to the service grid platform, configuring a service corresponding to a new version in the control plane, formulating a flow rule, and dynamically adjusting the flow rule until the new version service is completely introduced into a production environment.
The mirror container is a lightweight, portable software packaging mode, and contains all the dependent items, codes and runtime environments of application programs, the service registry is a component for managing and maintaining service instance information in a micro-service architecture, and the traffic rules are a set of rules defined in a service grid or the micro-service architecture for controlling and adjusting traffic between services.
Selecting an applicable service grid platform according to project requirements, installing a core component of the service grid platform, wherein the core component comprises a control plane and a data plane, and aiming at a specific service grid platform, special installation steps and configuration possibly need to be executed, and the control plane is used for configuring and managing traffic, including setting routing rules, load balancing strategies, fault recovery mechanisms and the like, so as to ensure that each service is contained by the service grid, namely registered to a service registration center of the service grid;
The method comprises the steps of selecting a containerization technology as a lightweight container platform, packaging an application program, a runtime environment and a dependent item in a project to generate a mirror image, defining a construction process of the mirror image, including writing a mirror image file and installing the dependent item, storing the constructed mirror image in a proper container mirror image warehouse, deploying the constructed mirror image container in a target environment by using a container arrangement tool, ensuring that the container can be registered in a service registry of a service grid after deployment, defining a flow rule and a distribution plan by using tools provided by the service grid platform, specifying policies such as routing, weight, version control and the like of flow according to project requirements, dynamically adjusting the flow rule in a control plane, gradually introducing new version service, monitoring a flow switching process, ensuring that the new version service is gradually effective in a production environment, and gradually introducing the new version service into the production environment according to the flow rule through testing and verification.
In this embodiment, by selecting a service grid platform suitable for project requirements, a core component of a service grid is successfully installed, an infrastructure is provided for constructing and managing a micro service architecture, fine granularity control on service communication is achieved through configuration of a control plane, a mirror image is successfully generated and a construction process of the mirror image is defined through a containerization technology, automatic discovery and management of the service are facilitated, a flow rule configuration of the service grid platform is utilized, a flow distribution plan is defined, a foundation is laid for dynamic flow adjustment and introduction of new version service, and in sum, the embodiment improves flexibility, scalability and maintainability of a system, and is conducive to realizing continuous delivery, rapid deployment and controllable service communication.
In an alternative embodiment of the present invention,
The method for obtaining the optimal solution by solving the optimization target through a preset multi-target optimization algorithm by taking the minimum resource use unbalance degree, the maximum throughput and the minimum response time as the optimization target comprises the following steps:
Collecting the total amount of resources in service instances and the use conditions of the resources under different loads, determining the use rate of the resources corresponding to each service instance, collecting the service processing amount and network delay in the service instance, determining the throughput of the service instance, collecting the processing priority of the service instance, requesting the average processing time of the queue length, determining the response time corresponding to each service instance, and taking the minimum unbalance of the use of the resources, the maximum throughput and the minimum response time as optimization targets;
Generating an initial chicken group and determining the number of individuals in the initial chicken group through a preset multi-objective optimization algorithm, wherein each chicken in the initial chicken group represents a solution corresponding to the optimization objective, the cocks are taken as leaders according to the performances of the individuals in the initial chicken group, the hens are taken as followers, and parameters in the chicken group optimization algorithm are initialized;
the cocks update the current positions according to the performances of the cocks and the hens, the hens update the current positions according to the corresponding cocks, and the chickens update the current positions based on the corresponding hens and random probability, wherein each individual performs local search in the area corresponding to the current positions;
and for each individual in the initial chicken flock, calculating the adaptability of each individual according to the updated position, updating the roles corresponding to the individual based on the adaptability, repeating the updating of the position and the roles until the preset iteration times are reached, and outputting the cock after the last iteration is completed as an optimal solution.
For each service instance, collecting the total amount of resources and the use condition of the resources under different loads, calculating the resource utilization rate of each service instance by dividing the actual use amount of the resources by the total amount of the resources according to the collected resource information, collecting the service throughput and network delay of each service instance, calculating the throughput of each service instance according to the service throughput and the network delay, collecting the information of the processing priority, the request queue length, the average processing time and the like of the service instance, calculating the response time of each service instance according to the information of the processing priority, the average processing time and the like, and taking the minimum resource use unbalance and the maximum throughput and the minimum response time as optimization targets;
Generating an initial chicken group by using a preset multi-objective optimization algorithm, wherein each individual in the chicken group represents a solution, the solution comprises cock, hen and chicken, initializing parameters in the multi-objective optimization algorithm, including iteration times, the number of individuals in the chicken group, search space and the like, updating the positions according to the current positions of each individual, calculating the corresponding fitness of each individual according to the updated positions, updating roles of each individual based on the fitness of each individual, wherein the individual with better fitness can act as a leader (cock), and the individual with poor fitness can act as a follower (hen), searching in a local search space based on the current positions of each individual, updating the current positions according to search results, repeating the operation until the preset iteration times are reached, and outputting the cock (leader) in the last iteration as an optimal solution after the iteration is completed;
In this embodiment, the multi-objective optimization algorithm comprehensively considers a plurality of objectives such as resource balance, throughput and response time, so that it is ensured that one optimization objective is achieved, and meanwhile, other objectives are not sacrificed, so that balance of the whole system is maintained, and it is ensured that the system is excellent in performance under changing loads and environments.
In an alternative embodiment of the present invention,
The following formula is used as an optimization target to minimize resource usage unbalance and maximize throughput and minimize response time:
wherein A represents an optimization objective, A 1 represents a minimum resource usage imbalance, lambda represents a balance factor, N represents a total service instance amount, C i represents a total resource capacity of an ith service instance, U i represents a current resource usage amount of the ith service instance, P i represents an expected load increase rate of the ith service instance, Average resource usage of all service instances is represented, a 2 represents maximum throughput, T i represents processing capacity of the ith service instance, L i represents average network delay of the ith service instance, D i represents other service number on which the ith service instance depends, α represents network delay adjustment factor, β represents service dependency adjustment factor, a 3 represents minimum response time, S i represents average time for processing requests of the ith service instance, Q i represents request queue length of the ith service instance, and W i represents processing priority of the ith service instance.
In the function, the resource use condition of the service instance is balanced through the balance factor, the balance of resource allocation is pursued, the excessive or insufficient use of resources is avoided, the overall resource utilization efficiency of the system is improved, the whole system reaches the maximum throughput through adjusting the factors such as the processing capacity, the network delay, the service dependence and the like of the service instance, the number of requests which can be processed by the system in unit time is improved, the performance of the whole system is improved, the response time of the whole system is reduced by considering the factors such as the processing time of the service instance, the request queue length, the processing priority and the like, the quick response of the system to the user request is ensured, the user experience of the system is improved, and in a comprehensive way, the embodiment is beneficial to improving the overall performance, the resource utilization efficiency and the user experience of the system, and the system is more suitable for dynamic load and environmental change.
In an alternative embodiment of the present invention,
The cock updates the current position according to the own and the hen's expression as follows:
Wherein, X t represents the updated position of the cock, X t-1 represents the current position of the cock, θ represents the scale factor of the cock moving to the position of the hen, X y-1 represents the current position of the hen, η represents the step size coefficient of the cock exploring the new position, and R represents a random number ranging between-1 and 1.
In the function, the rooster is guided to iterate to a better position according to the current optimal solution (the position of the hen) so as to gradually approach to the global optimal solution, the dependency degree of the rooster on the hen position when the rooster moves to the hen position is influenced by the scale factor of the rooster to update the position, the global search and the local search are balanced, the algorithm can be ensured to explore a potential solution space globally, the local adjustment can be carried out according to the local optimal solution represented by the hen, the step size coefficient of the new position is explored by the rooster, the step size of the movement of the rooster in the search space, namely the explored degree, can be balanced, the explored range of the algorithm can be controlled, and therefore the potential excellent solution can be found better.
Fig. 2 is a schematic structural diagram of a packet release management system according to an embodiment of the present invention, as shown in fig. 2, where the system includes:
The first unit is used for acquiring a software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package and naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing an automatic integration test and a performance test and a safety test based on the automatic test unit;
The second unit is used for selecting a pipeline construction tool and constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism and carrying out an integration test for each stage, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline and carrying out compliance inspection, and repairing the loopholes if the loopholes are found;
And a third unit, configured to define a service grid, set a core component based on the service grid, add the software package to a lightweight container, dynamically deploy the lightweight container under a micro-service architecture through the service grid, and solve the optimization objective through a preset multi-objective optimization algorithm by taking minimum resource usage unbalance, maximum throughput and minimum response time as optimization objectives, so as to obtain an optimal solution, where the multi-objective optimization algorithm is constructed based on an improved chicken crowd optimization algorithm.
In a third aspect of an embodiment of the present invention,
There is provided an electronic device including:
A processor;
A memory for storing processor-executable instructions;
Wherein the processor is configured to invoke the instructions stored in the memory to perform the method described previously.
In a fourth aspect of an embodiment of the present invention,
There is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method as described above.
The present invention may be a method, apparatus, system, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for performing various aspects of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (10)

1. The packet release management method is characterized by comprising the following steps:
Acquiring a software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package, naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing automatic integration test and performance test and safety test based on the automatic test unit;
selecting a pipeline construction tool, constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism for each stage, performing integrated test, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline, performing compliance check, and repairing the loophole if the loophole is found;
Defining a service grid, setting a core component based on the service grid, adding the software package into a lightweight container, carrying out dynamic service deployment on the lightweight container under a micro-service architecture through the service grid, taking minimum resource use unbalance degree, maximum throughput and minimum response time as optimization targets, and solving the optimization targets through a preset multi-target optimization algorithm to obtain an optimal solution, wherein the multi-target optimization algorithm is constructed based on an improved chicken group optimization algorithm.
2. The method of claim 1, wherein the acquiring the software package, recording code changes corresponding to the software package by a version control tool, creating a release branch on a main development branch based on the software package and naming the release branch, updating a version number on the release branch, setting an automation test unit, performing an automation integration test based on the automation test unit, and performing a performance test and a security test, comprises:
Acquiring a written software package, importing source codes of the software package through a version control tool, submitting and recording codes of the software package on a main development branch, creating a release branch under the main development branch through the version control tool, naming the release branch according to the version number of the software package, and updating the name of the release branch in real time based on the updating condition of the software package;
Setting an automatic test unit, testing each independent module and function writing unit of the software package, configuring the automatic test unit, and setting different stages of integrated test through a configuration tool to enable the automatic test unit to cover different modules and perform cooperative work;
And performing performance test on the software package by using a performance test tool, defining test scenes under different load conditions, collecting corresponding performance indexes, generating performance parameters, performing static code analysis on the software package by using a security audit tool, performing dynamic security test, simulating different attack scenes and recording the stability of the software package.
3. The method of claim 1, wherein selecting a pipeline construction tool and constructing a pipeline, dividing the pipeline into a plurality of stages, configuring a polling mechanism and performing an integration test for each stage, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline and performing compliance checking, and repairing the vulnerability if the vulnerability is found comprises:
Selecting a pipeline construction tool according to task requirements, creating pipeline items through a visual interface of the pipeline construction tool, and setting a code pulling stage, a unit testing stage and an integration testing stage for the pipeline;
In the code pulling stage, the latest code pulled from the version control tool is configured, the unit testing stage runs an automatic testing unit for each module and ensures correct realization of basic functions, and the plug-in of the pipeline construction tool is used for configuring an integrated testing stage and verifying the cooperative working condition of each module in the software package in the integrated testing stage;
Adding a polling mechanism in each stage, setting polling time and triggering conditions, triggering pipeline execution of a corresponding stage of new submission if new submission is generated, and deploying a construction result to a pre-release environment through a deployment script if the integrated test is completed;
adding a corresponding security audit tool in the pre-release environment, performing static analysis on codes corresponding to the software package, adding compliance checking in the pipeline, checking whether the software package has loopholes and non-compliance codes, returning to be non-compliance if the loopholes and the non-compliance codes exist, waiting for a development team to update the software package, and releasing if the loopholes and the non-compliance codes do not exist.
4. The method of claim 1, wherein the defining a service grid, setting a core component based on the service grid, adding the software package to a lightweight container and dynamically deploying the lightweight container under a micro-service architecture through the service grid comprises:
selecting a service grid platform based on project requirements, installing a core component through the service grid platform, wherein the core component comprises a control plane and a data plane, configuring and managing flow according to the control plane, realizing service communication according to the data plane, and constructing a service grid to ensure that each service is contained by the service grid;
And selecting a lightweight container platform by using a containerization technology, packaging an application program, a runtime environment and dependent items in the software package, generating a mirror image, defining a construction process of the mirror image, deploying a mirror image container, registering the software package to a service registry of a service grid through the mirror image container, defining a flow distribution plan through flow rule configuration corresponding to the service grid platform, configuring a service corresponding to a new version in the control plane, formulating a flow rule, and dynamically adjusting the flow rule until the new version service is completely introduced into a production environment.
5. The method of claim 1, wherein the optimizing the optimization objective with the minimum resource usage unbalance and the maximum throughput and the minimum response time as the optimization objective by a preset multi-objective optimization algorithm, and obtaining the optimal solution comprises:
Collecting the total amount of resources in service instances and the use conditions of the resources under different loads, determining the use rate of the resources corresponding to each service instance, collecting the service processing amount and network delay in the service instance, determining the throughput of the service instance, collecting the processing priority of the service instance, requesting the average processing time of the queue length, determining the response time corresponding to each service instance, and taking the minimum unbalance of the use of the resources, the maximum throughput and the minimum response time as optimization targets;
Generating an initial chicken group and determining the number of individuals in the initial chicken group through a preset multi-objective optimization algorithm, wherein each chicken in the initial chicken group represents a solution corresponding to the optimization objective, the cocks are taken as leaders according to the performances of the individuals in the initial chicken group, the hens are taken as followers, and parameters in the chicken group optimization algorithm are initialized;
the cocks update the current positions according to the performances of the cocks and the hens, the hens update the current positions according to the corresponding cocks, and the chickens update the current positions based on the corresponding hens and random probability, wherein each individual performs local search in the area corresponding to the current positions;
and for each individual in the initial chicken flock, calculating the adaptability of each individual according to the updated position, updating the roles corresponding to the individual based on the adaptability, repeating the updating of the position and the roles until the preset iteration times are reached, and outputting the cock after the last iteration is completed as an optimal solution.
6. The method of claim 5, wherein the minimizing resource usage imbalance and maximizing throughput and minimizing response time are as an optimization objective as shown in the following formula:
wherein A represents an optimization objective, A 1 represents a minimum resource usage imbalance, lambda represents a balance factor, N represents a total service instance amount, C i represents a total resource capacity of an ith service instance, U i represents a current resource usage amount of the ith service instance, P i represents an expected load increase rate of the ith service instance, Average resource usage of all service instances is represented, a 2 represents maximum throughput, T i represents processing capacity of the ith service instance, L i represents average network delay of the ith service instance, D i represents other service number on which the ith service instance depends, α represents network delay adjustment factor, β represents service dependency adjustment factor, a 3 represents minimum response time, S i represents average time for processing requests of the ith service instance, Q i represents request queue length of the ith service instance, and W i represents processing priority of the ith service instance.
7. The method of claim 5, wherein the cock updates the current location according to the own and hen's performance as shown in the following formula:
Wherein, X t represents the updated position of the cock, X t-1 represents the current position of the cock, θ represents the scale factor of the cock moving to the position of the hen, X y-1 represents the current position of the hen, η represents the step size coefficient of the cock exploring the new position, and R represents a random number ranging between-1 and 1.
8. A package release management system for implementing the package release management method according to any one of the preceding claims 1 to 7, characterized by comprising:
The first unit is used for acquiring a software package, recording code changes corresponding to the software package through a version control tool, creating a release branch on a main development branch based on the software package and naming the release branch, updating a version number on the release branch, setting an automatic test unit, and performing an automatic integration test and a performance test and a safety test based on the automatic test unit;
The second unit is used for selecting a pipeline construction tool and constructing a pipeline, dividing the pipeline into a plurality of stages, respectively configuring a polling mechanism and carrying out an integration test for each stage, deploying a construction result into a pre-release environment, adding a security audit tool into the pipeline and carrying out compliance inspection, and repairing the loopholes if the loopholes are found;
And a third unit, configured to define a service grid, set a core component based on the service grid, add the software package to a lightweight container, dynamically deploy the lightweight container under a micro-service architecture through the service grid, and solve the optimization objective through a preset multi-objective optimization algorithm by taking minimum resource usage unbalance, maximum throughput and minimum response time as optimization objectives, so as to obtain an optimal solution, where the multi-objective optimization algorithm is constructed based on an improved chicken crowd optimization algorithm.
9. An electronic device, comprising:
A processor;
A memory for storing processor-executable instructions;
wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1 to 7.
CN202410295512.9A 2024-03-15 2024-03-15 Packet release management method and system Active CN117908949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410295512.9A CN117908949B (en) 2024-03-15 2024-03-15 Packet release management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410295512.9A CN117908949B (en) 2024-03-15 2024-03-15 Packet release management method and system

Publications (2)

Publication Number Publication Date
CN117908949A true CN117908949A (en) 2024-04-19
CN117908949B CN117908949B (en) 2024-05-14

Family

ID=90692704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410295512.9A Active CN117908949B (en) 2024-03-15 2024-03-15 Packet release management method and system

Country Status (1)

Country Link
CN (1) CN117908949B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118170418A (en) * 2024-05-15 2024-06-11 威海双子星软件科技有限公司 Management method for software system maintenance information

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708509A (en) * 2016-11-28 2017-05-24 上海宝尊电子商务有限公司 Automatic software project development all-link configuration management system
WO2017222567A1 (en) * 2016-06-24 2017-12-28 Intuit Inc. Methods, systems, and articles of manufacture for implementing software application development and releases
CN110889672A (en) * 2019-11-19 2020-03-17 哈尔滨理工大学 Student card punching and class taking state detection system based on deep learning
US20220261240A1 (en) * 2021-02-12 2022-08-18 N. S. International, Ltd. Agile, automotive spice, dev ops software development and release management system
CN116880892A (en) * 2023-07-13 2023-10-13 湖北中烟工业有限责任公司 Tobacco industry enterprise application system source code control method
CN117111907A (en) * 2023-08-14 2023-11-24 广州致远电子股份有限公司 Software development system
US11848847B1 (en) * 2022-10-11 2023-12-19 International Business Machines Corporation Balanced optimization within a broker cluster
CN117632146A (en) * 2023-11-22 2024-03-01 中国科学院沈阳自动化研究所 Side cloud collaborative deployment reconstruction method based on micro-service agile deployment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017222567A1 (en) * 2016-06-24 2017-12-28 Intuit Inc. Methods, systems, and articles of manufacture for implementing software application development and releases
CN106708509A (en) * 2016-11-28 2017-05-24 上海宝尊电子商务有限公司 Automatic software project development all-link configuration management system
CN110889672A (en) * 2019-11-19 2020-03-17 哈尔滨理工大学 Student card punching and class taking state detection system based on deep learning
US20220261240A1 (en) * 2021-02-12 2022-08-18 N. S. International, Ltd. Agile, automotive spice, dev ops software development and release management system
US11848847B1 (en) * 2022-10-11 2023-12-19 International Business Machines Corporation Balanced optimization within a broker cluster
CN116880892A (en) * 2023-07-13 2023-10-13 湖北中烟工业有限责任公司 Tobacco industry enterprise application system source code control method
CN117111907A (en) * 2023-08-14 2023-11-24 广州致远电子股份有限公司 Software development system
CN117632146A (en) * 2023-11-22 2024-03-01 中国科学院沈阳自动化研究所 Side cloud collaborative deployment reconstruction method based on micro-service agile deployment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
单雅辉;刘青凯;杨章;田鸿运;邹勇刚;: "一种面向数值模拟软件的持续集成平台", 计算机辅助工程, no. 03, 16 September 2020 (2020-09-16) *
陈迪;: "基于Jenkins的持续集成***研究", 电子测试, no. 08, 15 April 2020 (2020-04-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118170418A (en) * 2024-05-15 2024-06-11 威海双子星软件科技有限公司 Management method for software system maintenance information

Also Published As

Publication number Publication date
CN117908949B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
CN117908949B (en) Packet release management method and system
Ghobaei‐Arani et al. A moth‐flame optimization algorithm for web service composition in cloud computing: simulation and verification
US20210064346A1 (en) Support system for designing an artificial intelligence application, executable on distributed computing platforms
CN101946258B (en) Model based deployment of computer based business process on dedicated hardware
CN113010393A (en) Fault drilling method and device based on chaotic engineering
CN116594913B (en) Intelligent software automatic test method
US20100153928A1 (en) Developing and Maintaining High Performance Network Services
CN111597014B (en) Secondary-mirror-image-free release method for containerized JavaEE application server
Mahato et al. On maximizing reliability of grid transaction processing system considering balanced task allocation using social spider optimization
Bavota et al. Search based software maintenance: Methods and tools
CN106575241A (en) Mobile and remote runtime integration
CN109753767B (en) Software distribution and updating method and device based on block chain, server and client
Patiniotakis et al. Assessing flexibility in event-driven process adaptation
Torquato et al. Iaas cloud availability planning using models and genetic algorithms
Martínez et al. ELASTIC: A large scale dynamic tuning environment
CN116643722A (en) Open type collaborative software development platform
US20100042659A1 (en) Deployment overview management system, apparatus, and method
CN116089004A (en) Migration method and device for intelligent contract codes among heterogeneous blockchains
Gill et al. Approaches for software performance modelling, cloud computing and openstack
Zatout et al. A model-driven approach for the verification of an adaptive service composition
Basile Modelling, Verifying and Testing the Contract Automata Runtime Environment with Uppaal
Filianin et al. Develop a lightweight MEC platform simulator
Waseem et al. Containerization in Multi-Cloud Environment: Roles, Strategies, Challenges, and Solutions for Effective Implementation
Bushehrian et al. An adaptive and cost‐efficient migration to cloud approach in dynamic environments
CN114217950B (en) Node scheduling state control method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant