Micro-service order demand release assembly and method, electronic equipment and medium

By introducing the microservice single requirement release component into the microservice application system, using the management control module and the single requirement compilation module to analyze version change records and code change records, incremental compilation and packaging of single requirements are realized, and single requirements in the existing technology are solved. Release issues that rely on modular division, reducing workload and ensuring system stability.

CN119336352APending Publication Date: 2025-01-21WINNING HEALTH TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411392416.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing single-demand upgrade method has too high dependence on modular division, which has led to great challenges in the development of single-demand release of software systems, and requires the system to be refactored, which has a large workload, which may lead to system instability.

Method used

Provides a microservice single requirement release component, including a management and control module and a single requirement compilation module. By obtaining the version change record of the microservice application system and the code change record of the development task, it determines the prerequisites of the single requirement and performs incremental compilation. and packaging to achieve on-demand release of single requirements.

Benefits of technology

There is no need to transform the original microservices application system, reduce the workload, while ensuring the stability of the microservice application system, and realizing the independent upgrade and rapid deployment of single demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336352A_ABST
    Figure CN119336352A_ABST
Patent Text Reader

Abstract

The invention provides a micro-service order demand publishing component and method, electronic equipment and a medium. The micro-service order demand publishing component comprises a management and control module and an order demand compiling module, the management and control module is used for acquiring and storing version change records of each micro-service application system in a code warehouse and code change records corresponding to each development task; the single demand compiling module is used for acquiring a single demand application of the micro-service application system, and determining a front demand of the single demand according to the single demand application, a version change record of the micro-service application system and a code change record corresponding to each development task; and the single-demand compiling module is further used for acquiring a code change set corresponding to the single demand and a code change set corresponding to the preposed demand from the management and control module to obtain a to-be-compiled code set, compiling and packaging the to-be-compiled code set and then performing single-demand release. According to the invention, the original micro-service application system does not need to be transformed, the workload is reduced, and meanwhile, the stability of the micro-service application system can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of single demand publishing, and in particular to a microservice single demand publishing component, method, electronic device and medium. Background Art

[0002] Single-demand upgrade is an independent upgrade method for a single demand or function in a business system, and a variety of technical means can be used to achieve this. First of all, modular design is a common technology. By splitting the system into multiple modules or components, each module is responsible for implementing a specific function or requirement, and a single demand can be independently upgraded. This method makes it possible to focus on the relevant modules when a certain demand needs to be upgraded without affecting other parts of the system. In addition, service-oriented architecture is also an effective technical means. Splitting the system into multiple services and communicating through interfaces can make it possible to modify and upgrade the relevant services when upgrading a certain demand without affecting other services.

[0003] Secondly, continuous integration and continuous deployment (CI / CD) is an important technical practice that enables the rapid and frequent release of new features and updates through automated build, test, and deployment processes. Adopting CI / CD can help achieve rapid deployment and verification of single requirements, thereby reducing the risk of upgrades. In addition, feature branch management is also a common technical means. By adopting feature branch management in the version control system, a separate branch is created for each requirement or function, development and testing are performed on the branch, and then merged into the main branch after the requirement is completed. This method can ensure the independence of single requirements and reduce potential conflicts and impact scope.

[0004] Finally, A / B testing is a beneficial technical practice. By testing the effects of new and old versions or different requirements in the production environment at the same time, the decision on whether to formally deploy new functions is made based on the test results. This technology can help evaluate the effect and impact of single requirement upgrades, reduce risks and ensure the success of system upgrades. By combining the above multiple technical means, the independent upgrade of a single requirement or function in the system can be effectively achieved, improving the flexibility, stability and maintainability of the system.

[0005] However, the existing single-requirement upgrade method relies too much on modular division. If the application system has been developed, especially for the software system with low modularity that is already in use, the release of single requirements will be a big challenge. The existing system needs to be reorganized according to modules, and the code needs to be reconstructed, which is a lot of work. Since the modular splitting and transformation involves the adjustment of all program codes of the application system, it is necessary to modify each module, which requires the participation of many developers. At the same time, since the modification of the program will cause various defects in the system, it will seriously affect the daily iteration and upgrade of the existing system. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide a microservice single demand publishing component, method, electronic device and medium, which does not require the original microservice application system to be modified, reduces the workload, and can ensure the stability of the microservice application system.

[0007] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0008] In the first aspect, an embodiment of the present invention provides a microservice single-demand publishing component, including: a management and control module and a single-demand compilation module; the management and control module is used to: obtain and save the version change records of each microservice application system in the code repository and the code change records corresponding to each development task; the single-demand compilation module is used to: obtain the single-demand application of the microservice application system, and determine the prerequisite requirements of the single requirement according to the single-demand application, the version change records of the microservice application system and the code change records corresponding to each development task; the single-demand compilation module is also used to: obtain the code change set corresponding to the single requirement and the code change set corresponding to the prerequisite requirement from the management and control module, obtain the code set to be compiled, and compile and package the code set to be compiled for single-demand publishing.

[0009] In one embodiment, the management and control module is integrated with the GIT management system to obtain the version change records of each microservice application system in the code repository from the GIT management system; the management and control module is connected to the TFS demand management system to obtain the allocation correspondence between each requirement of the microservice application system and the development task from the TFS demand management system, and the development task is matched with the version change record of the microservice application system according to the allocation correspondence to obtain the code change record corresponding to each development task.

[0010] In one embodiment, the single requirement compilation module is specifically used to: determine the application number and version number of the single requirement based on the single requirement application; determine the baseline version number of the baseline version corresponding to the single requirement based on the version number, and determine the microservice change record list corresponding to the single requirement based on the application number, and obtain the development task corresponding to the single requirement and the code change set corresponding to the development task based on each microservice change record; determine the functional module to which the development task belongs based on the code change set, and determine the historical version change record of the functional module from the baseline version to the current version based on the version change record of the functional module code; determine the version change record not caused by the current single requirement based on the historical change record, and determine the corresponding historical development task and the prerequisite requirement corresponding to the historical development task based on the version change record not caused by the current single requirement, and save the prerequisite requirement in the full requirement list; wherein, the full requirement list includes: the current single requirement and the prerequisite requirement.

[0011] In one embodiment, the single requirement compilation module is specifically used to: obtain the microservice change list record list corresponding to each requirement in the full requirement list and the development task corresponding to each requirement, and obtain the code change set corresponding to each requirement according to the development task corresponding to each requirement; merge the code change sets corresponding to each requirement to obtain the code set to be compiled.

[0012] In one embodiment, the single requirement compilation module is further used to determine the functional module and project code to which each requirement belongs based on the code change set corresponding to each requirement; merge the project code corresponding to each requirement, and retain the latest version code set of the project code corresponding to each requirement, and classify the latest version code set according to the project to obtain the code set to be compiled.

[0013] In one embodiment, the single-demand compilation module is specifically used to: compile the code set to be compiled according to the module to obtain the corresponding module file, and package the module file to obtain the microservice product to be deployed; package the microservice product to be deployed and output it to a specified directory.

[0014] In one implementation, the management and control module is also used to manage code submission for each development task.

[0015] In a second aspect, an embodiment of the present invention provides a method for publishing a microservice single demand, including: the method is applied to the microservice single demand publishing component of any one of the items provided in the first aspect above; the method includes: obtaining and saving the version change records of each microservice application system in the code repository and the code change records corresponding to each development task; obtaining a single demand application for the microservice application system, and determining the prerequisite requirements of the single demand based on the single demand application, the version change records of the microservice application system and the code change records corresponding to each development task; obtaining the code change set corresponding to the single demand and the code change set corresponding to the prerequisite requirement from the management and control module, obtaining the code set to be compiled, and compiling and packaging the code set to be compiled for single demand publishing.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the method provided in the second aspect above.

[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in the second aspect are executed.

[0018] The embodiments of the present invention bring the following beneficial effects:

[0019] The above-mentioned microservice single demand release component, method, electronic device and medium provided by the embodiment of the present invention include: a control module and a single demand compilation module; the control module is used to: obtain and save the version change records of each microservice application system in the code warehouse and the code change records corresponding to each development task; the single demand compilation module is used to: obtain the single demand application of the microservice application system, and determine the pre-requirement of the single demand according to the single demand application, the version change records of the microservice application system and the code change records corresponding to each development task; the single demand compilation module is also used to: obtain the code change set corresponding to the single demand and the code change set corresponding to the pre-requirement from the control module, obtain the code set to be compiled, and compile and package the code set to be compiled for single demand release. The above-mentioned release component is an independently deployable release component, which has no intrusion on the source code of the current microservice application system, and obtains the code change set corresponding to the single demand and the code change set corresponding to the pre-requirement by analyzing the version change records of each microservice application system and the code change records corresponding to each development task, and realizes the on-demand release of the program package corresponding to the single demand by incremental compilation of multiple code change sets. The above-mentioned release components do not require modification of the original microservice application system, which reduces the workload and ensures the stability of the microservice application system.

[0020] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0021] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A schematic diagram of the structure of a microservice single demand publishing component provided by an embodiment of the present invention;

[0024] Figure 2 A demand control code can be submitted to the embodiment of the present invention;

[0025] Figure 3A diagram of a pre-requirement positioning algorithm provided by an embodiment of the present invention;

[0026] Figure 4 A flow chart of outputting a code set to be compiled provided by an embodiment of the present invention;

[0027] Figure 5 A code compilation and packaging release flow chart provided in an embodiment of the present invention;

[0028] Figure 6 A single requirement development process workflow diagram provided by an embodiment of the present invention;

[0029] Figure 7 A microservice single demand publishing component workflow diagram provided by an embodiment of the present invention;

[0030] Figure 8 A flowchart of a method for publishing microservice order requirements provided by an embodiment of the present invention;

[0031] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] The life cycle of a software system usually includes stages such as requirements analysis, design, development, testing, deployment, operation and maintenance, and upgrades. In the requirements analysis stage, the team communicates with customers to determine system requirements and functions; the design stage converts requirements into system architecture and design solutions; the development stage implements the design and writes code; the testing stage verifies system functions and quality; and the deployment stage deploys the system to the production environment so that users can access and use the system.

[0034] With the continuous development of technology and changes in business needs, software systems need to be constantly upgraded to adapt to new environments and needs. Upgrades can include fixing bugs, adding new features, optimizing performance, etc. Timely upgrades can maintain the competitiveness of the system, improve user experience, and reduce the risk of security vulnerabilities and technological backwardness. Therefore, operation and maintenance and upgrades play a key role in the life cycle of software systems, directly affecting the stability, security, and sustainability of the system.

[0035] Although system upgrades improve system performance and functionality, they are also accompanied by certain risks. Some common risks include functional incompatibility, data loss, performance issues, and security vulnerabilities. New versions of software may introduce new features or modify existing features, resulting in partial incompatibility with existing systems and affecting the normal operation of the system. Data loss may occur during the upgrade process, resulting in incomplete or inconsistent system data, affecting business operations. In addition, after the upgrade, system performance may decline, response speed may slow down or delay may occur, affecting user experience. In addition, new versions of software may have security vulnerabilities, and failure to repair or upgrade in a timely manner may put the system at risk of being attacked.

[0036] In the process of system upgrade, single requirement upgrade has important significance and value. First of all, single requirement upgrade can help the system adapt to changes in business requirements more flexibly. By independently upgrading a single requirement, it can quickly respond to changes in user requirements and provide functions and experiences that better meet user expectations. This refined upgrade method can effectively improve the flexibility and agility of the system, allowing the system to remain competitive in a changing market environment.

[0037] In addition, single-requirement upgrades can also reduce the risk of the upgrade process. Compared with overall system upgrades, single-requirement upgrades are more limited in scope and more controllable in scope. This means that when problems occur during the upgrade process, they can be more easily located and repaired, reducing the impact on the entire system. At the same time, single-requirement upgrades are also conducive to improving system stability, because only one requirement is changed each time, which can better control potential problems introduced during the upgrade process and ensure the overall stability and reliability of the system. Through single-requirement upgrades, the system can better adapt to changes, reduce risks, and provide strong support for the continuous improvement and development of the system.

[0038] Single-demand upgrade is an independent upgrade method for a single demand or function in a business system, and a variety of technical means can be used to achieve this. First of all, modular design is a common technology. By splitting the system into multiple modules or components, each module is responsible for implementing a specific function or requirement, and a single demand can be independently upgraded. This method makes it possible to focus on the relevant modules when a certain demand needs to be upgraded without affecting other parts of the system. In addition, service-oriented architecture is also an effective technical means. Splitting the system into multiple services and communicating through interfaces can make it possible to modify and upgrade the relevant services when upgrading a certain demand without affecting other services.

[0039] However, the existing single-requirement upgrade method has the following defects:

[0040] (1) Too much reliance on modularization

[0041] In order to support the release of a single requirement of a software system, the existing system is generally required to have a high degree of modularization, and the coupling between modules is required to be as low as possible. Then, by controlling the transformation and implementation of each requirement to be based on a certain module, the release of a single requirement can be realized synchronously through the release of a single module. If the application system has been developed, especially for a software system with a low degree of modularization that is already in use, the release of a single requirement will be a great challenge.

[0042] (2) The workload of modular disassembly is large

[0043] In order to make the existing developed software system support single demand release, according to traditional practices, it is necessary to carry out relatively large transformation of the existing system. The existing system needs to be reorganized according to modules and the code needs to be reconstructed, which is a huge workload.

[0044] (3) System instability

[0045] Since modular splitting and transformation involves the adjustment of the entire program code of the application system, it requires modification of each module and the participation of many developers to complete; since program modification will inevitably lead to various defects in the system, it will seriously affect the daily iteration and upgrade of the existing system.

[0046] Based on this, the embodiments of the present invention provide a microservice single demand publishing component, method, electronic device and medium, which do not require modification of the original microservice application system, reduce the workload, and ensure the stability of the microservice application system.

[0047] To facilitate understanding of this embodiment, a microservice single demand publishing component disclosed in an embodiment of the present invention is first introduced in detail. Figure 1 The structural diagram of a microservice single-demand publishing component shown in the figure indicates that the publishing component mainly includes the following parts: a management and control module 101 and a single-demand compilation module 102.

[0048] The management and control module 101 is used to obtain and save the version change records of each microservice application system in the code repository and the code change records corresponding to each development task.

[0049] In the specific implementation, the management and control module 101 is integrated with the GIT management system to obtain the version change records of each microservice application system in the code repository from the GIT management system; the management and control module 101 is connected to the TFS demand management system to obtain the allocation correspondence between each requirement of the microservice application system and the development task from the TFS demand management system, and the development task is matched with the version change record of the microservice application system according to the allocation correspondence to obtain the code change record corresponding to each development task.

[0050] Among them, Git is a distributed version control system that is widely used in the field of software development. It provides an effective way to track file changes, collaborate on development, and manage code bases. Git has distributed version control and powerful branch management functions. Each developer has a complete copy of the code repository and can work locally without always connecting to the central server. Developers can easily create, merge, switch, and delete branches, making parallel development, feature development, and version control more flexible and efficient.

[0051] In addition, Git also has powerful version control and remote collaboration functions. It can track every modification of a file, record the author, time and content of the modification, and allow developers to trace back to any historical version at any time. By supporting remote repositories, team members can share code, collaborate on development, push local code to remote repositories, and pull the latest code changes from remote repositories. This remote collaboration method allows team members to share and synchronize work results in real time, improving the team's collaboration efficiency and code quality. As a powerful version control tool, Git provides software development teams with an efficient code management and collaboration platform, helping developers better organize, track and manage code.

[0052] TFS (Team Foundation Server) is a software development and collaboration platform dedicated to supporting team management and collaboration in the software development lifecycle. TFS provides a range of features, including version control, work item tracking, automated build and test management tools, designed to help teams collaborate on development, version control and build software projects. The version control feature allows teams to manage code versions, conduct collaborative development and code review; while the work item tracking feature helps teams create and manage requirements, defects and tasks in order to track work progress and assign tasks.

[0053] In addition, TFS also provides automated build and test management functions, supporting teams to configure and execute continuous integration build processes to ensure the stability and deployability of the code. Through integrated test management tools, teams can plan, execute and track test activities, including manual testing, automated testing and load testing. In general, TFS provides teams with comprehensive tools and functions to help them improve productivity, manage software projects, and ensure software quality.

[0054] Furthermore, in order to ensure a one-to-one correspondence between development tasks and code sets, the management and control module 101 is also used to manage the code submission of each development task. Figure 2 As shown, before a development task is completely modified and submitted, another development task is not allowed to jump in and submit.

[0055] The single requirement compilation module 102 is used to obtain a single requirement application of the microservice application system, and determine the pre-requirements of the single requirement according to the single requirement application, the version change record of the microservice application system and the code change record corresponding to each development task.

[0056] The single requirement compilation module 102 is also used to obtain the code change set corresponding to the single requirement and the code change set corresponding to the pre-requirement from the management and control module, obtain the code set to be compiled, and compile and package the code set to be compiled for single requirement release.

[0057] In specific implementation, the single requirement compilation module 102 can decompose the application number of the single requirement and the version number of the target customer site according to the information of the single requirement application; through internal logical calculations, obtain the change code set corresponding to the single requirement and the change code set corresponding to the predecessor requirement (i.e., the requirement associated with the current single requirement), and after merging the two, realize incremental compilation to complete the product release.

[0058] The microservice single-demand release component provided in the embodiment of the present invention is an independently deployable release component, which has no intrusion on the source code of the current microservice application system. By analyzing the version change records of each microservice application system and the code change records corresponding to each development task, the code change set corresponding to the single demand and the code change set corresponding to the pre-requirement are obtained, and the on-demand release of the program package corresponding to the single demand is realized through incremental compilation of multiple code change sets. The release component does not need to modify the original microservice application system, which reduces the workload and can ensure the stability of the microservice application system.

[0059] In one implementation, the release of a single requirement not only needs to consider the changes in the code set corresponding to the single requirement of this application, but also the problem of the simultaneous release of related pre-requirements; if the code modification involved in the pre-requirements is not released synchronously, then the current single requirement cannot be used normally. Therefore, in order to ensure the normal release of a single requirement, it is necessary to calculate the code change set of its pre-requirements and release them at the same time. Based on this, the single requirement compilation module in the embodiment of the present invention can also search for pre-requirements. Specifically, the single requirement compilation module is used to:

[0060] (1) Determine the application number and version number of the single requirement based on the single requirement application.

[0061] (2) Determine the baseline version number of the baseline version corresponding to the single requirement based on the version number, and determine the list of microservice change records corresponding to the single requirement based on the application number, and obtain the development task corresponding to the single requirement and the code change set corresponding to the development task based on each microservice change record.

[0062] In the specific implementation, the single-requirement compilation module first determines the baseline version number of the single-requirement code base according to the version number of the single-requirement application; secondly, it can also determine the corresponding microservice change record list according to the application number of the single-requirement application, and obtain the development tasks corresponding to the single requirement according to each microservice change record, and then obtain the corresponding code change set according to the development task.

[0063] (3) Determine the functional module to which the development task belongs based on the code change set, and determine the historical version change record of the functional module from the baseline version to the current version based on the version change record of the functional module code.

[0064] In specific implementation, a single-requirement compilation module can determine the functional module to which it belongs based on the code change set, and deduce all version change history from the baseline version to the present, i.e., the historical version change record, based on the version change record of the functional module code.

[0065] (4) Determine the version change records that are not caused by the current single demand based on the historical change records, and determine the corresponding historical development tasks and the predecessor requirements corresponding to the historical development tasks based on the version change records that are not caused by the current single demand, and save the predecessor requirements in the full demand list; wherein the full demand list includes: the current single demand and predecessor requirements.

[0066] During specific implementation, the single requirement compilation module can also find out all change records that are not caused by the current single requirement but by other development tasks based on the historical version change records, that is, version change records not caused by the current single requirement; and determine the corresponding development tasks based on the version change records not caused by the current single requirement, and then find the corresponding requirement application, which is the prerequisite requirement, and record it in the full requirement list.

[0067] Furthermore, the single requirement compilation module can calculate whether there are corresponding predecessor requirements according to the found predecessor requirements in a loop according to the above algorithm, and if so, record them in the full requirement list.

[0068] For ease of understanding, the present invention also provides a pre-requirement positioning algorithm diagram, see Figure 3As shown, the single-requirement compilation module first determines the microservice-related list (i.e., the microservice change record list) based on the single-requirement application, and determines the development task-related list based on the microservice-related list (i.e., obtaining the development task corresponding to the single requirement based on each microservice change record), and then determines the code change set associated with the task; secondly, the single-requirement compilation module determines the module to which it belongs based on the code change set, and calculates all version change histories from the baseline version to the present in combination with the version change record of the project code; then, it loops to find out whether each version change record is the single-requirement application submitted last time, and if so, it is determined to be the current requirement; otherwise, it is a non-current requirement, i.e., a prerequisite requirement; finally, based on the prerequisite requirement found, according to the above algorithm, it loops to calculate in sequence whether there is a corresponding prerequisite requirement, and if so, it is recorded in the full requirement list.

[0069] Since each user requirement will be split into multiple development tasks according to the granularity of microservices and the needs of module transformation, and each development task can correspond to a corresponding code change set. Therefore, when tracing the prerequisites of a single requirement, special attention should be paid to the logical relationship between multiple code change sets, multiple development tasks, and various requirements. Because the calculation logic of the prerequisites is relatively complex, the embodiment of the present invention can determine the prerequisites through an algorithm that combines forward, reverse and recursive calculations:

[0070] (1) Forward calculation: First, obtain the development task list based on the single requirement, find the corresponding code change set according to the development task in turn, and determine the corresponding version of the relevant module modification based on the code change set;

[0071] (2) Reverse calculation: reversely confirm all historical change records after the baseline version and before the current version based on the corresponding version of the corresponding module, and reversely confirm its corresponding development tasks, and confirm its corresponding requirements as pre-requisites based on the development tasks;

[0072] (3) Recursive calculation: Continue to perform recursive calculation on the pre-requirements according to the above forward and reverse algorithms to obtain a list of all pre-requirements. Finally, the embodiment of the present invention uses a built-in algorithm to obtain all pre-requirements to ensure that when a single requirement is released, related modules and microservices can be used normally.

[0073] In one embodiment, the release component can obtain the list of the full code set involved in the release of the single requirement and the prerequisite requirement based on the calculation of the above single requirement and the prerequisite requirement; the release component also needs to automatically compile the project code of the specified version number according to the distribution of the code repository, with the code project as the unit, according to the submission requirements of the version number, and collect and package the results in a unified manner to generate the corresponding product package for formal release.

[0074] In order to ensure that related modules and microservices can be compiled on demand when a single requirement is released, in an embodiment of the present invention, the maximum latest algorithm (i.e. taking the maximum relevant code set and combining the dual judgment of the latest version of the module) can be used to realize the merge calculation of the full demand-related code set and perform incremental compilation on it.

[0075] Based on this, the single-requirement compilation module is specifically used for:

[0076] (1) Obtain the microservice change list record list corresponding to each requirement in the full requirement list and the development task corresponding to each requirement, and obtain the code change set corresponding to each requirement based on the development task corresponding to each requirement.

[0077] In the specific implementation, see Figure 4 As shown, the single requirement compilation module can repeatedly calculate the full requirement list (including the single requirement required to be updated this time and the previous requirements that need to be updated synchronously) in a loop, and calculate the code change set corresponding to each requirement. Specifically, first, according to each requirement, the corresponding microservice change list and the development tasks that need to be changed for each microservice are obtained; secondly, the associated code change set is obtained according to the development task.

[0078] (2) Merge the code change sets corresponding to each requirement to obtain the code set to be compiled.

[0079] In the specific implementation, first determine the functional module and project code to which each requirement belongs based on the code change set corresponding to each requirement; then merge the project codes corresponding to each requirement, and retain the latest version of the project code set corresponding to each requirement, and classify the latest version of the code set according to the project to obtain the code set to be compiled.

[0080] For details, see Figure 4 As shown, a single-requirement compilation module can confirm the module and project code to which it belongs based on the code change set, and then merge the codes of each project involved, retaining only the latest version of the code set of each project. At the same time, it is classified and collected according to the project, and finally the code set to be compiled is output to the target path.

[0081] Furthermore, the single-demand compilation module is specifically used to: compile the code set to be compiled according to the module to obtain the corresponding module file, and package the module file to obtain the microservice product to be deployed; package the microservice product to be deployed and output it to the specified directory.

[0082] See also Figure 5As shown, the single-requirement compilation module can obtain the code set to be compiled from the specified path (i.e., the target path), compile it according to the project, and generate the corresponding independent module files; then package the project files according to the definition of the microservice to form the microservice products to be deployed; finally, the final compilation results, i.e., each independently deployable microservice, are packaged and output to the specified directory in the form of products, completing the overall incremental compilation and release work based on a single requirement.

[0083] For ease of understanding, the present invention also provides a single requirement development process workflow diagram, see Figure 6 As shown, the realization of each requirement will involve the transformation of multiple microservices, such as Figure 6 The single requirement 100 involves microservice A and microservice B. Each microservice includes multiple modules, so the transformation of each microservice may include multiple development tasks, such as Figure 6 When the microservice C corresponding to the single requirement 200 needs to be transformed, two development tasks 200C01 and 200C02 are arranged; and each development task will need to modify the corresponding code set to implement it. The GIT system can record the logical order of each microservice version change in turn to identify the logical subordination and causal relationship between development tasks and version changes.

[0084] Furthermore, the embodiment of the present invention also provides a microservice single demand release component workflow diagram. Figure 7 As shown, the code of a single requirement release component VS the requirement management module (i.e., the management module) can obtain the version change records of each microservice application system in the code repository by integrating the GIT system; by connecting with the TFS requirement management system, the allocation correspondence between each requirement and the development task can be obtained; and then by matching with the version change records of each target system, the code change records corresponding to each development task can be determined and stored as data records.

[0085] The compilation module of the single-demand release component can decompose the application number of the single demand and the version number of the target customer site according to the information of the single-demand application; through internal logical calculations, it obtains the change code set corresponding to the single demand and the change code set corresponding to the predecessor demand, and after merging the two, it realizes incremental compilation and completes the product release.

[0086] The microservice order requirement publishing component provided by the embodiment of the present invention has the following beneficial effects:

[0087] (1) Helps with system operation and maintenance

[0088] Single requirement upgrades can help the system adapt to changes in business requirements more flexibly. By independently upgrading a single requirement, you can quickly respond to changes in user requirements and provide functions and experiences that better meet user expectations. This refined upgrade method can effectively improve the flexibility and agility of the system, allowing the system to remain competitive in an ever-changing market environment.

[0089] In addition, single-requirement upgrades can also reduce the risk of the upgrade process. Compared with overall system upgrades, single-requirement upgrades are more limited in scope and more controllable in scope. This means that when problems occur during the upgrade process, they can be more easily located and repaired, reducing the impact on the entire system. At the same time, single-requirement upgrades are also conducive to improving system stability, because only one requirement is changed each time, which can better control potential problems introduced during the upgrade process and ensure the overall stability and reliability of the system. Through single-requirement upgrades, the system can better adapt to changes, reduce risks, and provide strong support for the continuous improvement and development of the system.

[0090] (2) Rapid expansion of existing systems

[0091] The present invention can quickly expand and develop the single-demand publishing function of the existing application system, so that the application system that originally does not support the single-demand publishing function can quickly realize the single-demand publishing capability with the support of this publishing component; since this publishing component can be deployed independently, it can be enhanced and improved based on the existing development facilities, and there is no requirement for intrusion into the code of the business system, so it can greatly improve the development efficiency and achieve stable upgrades of the business system.

[0092] (3) Low cost and high efficiency

[0093] The expansion and implementation of the current application system's single-demand publishing function does not require the intervention of developers, and is all implemented through independently deployed third-party components, so there is little labor input and the cost is low.

[0094] (4) The system is stable and reliable without modification

[0095] The embodiment of the present invention does not require modification of the original business system, and all single demand release functions are implemented through independently deployed components, which will not cause human errors, so the final business system will be more stable.

[0096] For the microservice order demand publishing component provided in the above embodiment, the embodiment of the present invention also provides a microservice order demand publishing method, see Figure 8 The flowchart of a method for publishing microservice order requirements is shown, indicating that the method mainly includes the following steps S801 to S803:

[0097] Step S801: Obtain and save the version change records of each microservice application system in the code repository and the code change records corresponding to each development task.

[0098] Step S802: Obtain a single requirement application of the microservice application system, and determine the pre-requisites of the single requirement according to the single requirement application, the version change record of the microservice application system, and the code change record corresponding to each development task.

[0099] Step S803: Obtain the code change set corresponding to the single requirement and the code change set corresponding to the pre-requirement from the management and control module, obtain the code set to be compiled, and compile and package the code set to be compiled and then publish the single requirement.

[0100] The above-mentioned microservice single demand publishing method provided by the embodiment of the present invention is implemented based on the microservice single demand publishing component. The microservice single demand publishing component is an independently deployable publishing component that does not invade the source code of the current microservice application system. By analyzing the version change records of each microservice application system and the code change records corresponding to each development task, the code change set corresponding to the single demand and the code change set corresponding to the pre-requirement are obtained, and the on-demand publishing of the program package corresponding to the single demand is realized through incremental compilation of multiple code change sets. The above-mentioned publishing method does not require the modification of the original microservice application system, reduces the workload, and can ensure the stability of the microservice application system.

[0101] It should be noted that the implementation principle and technical effects of the method provided in the embodiment of the present invention are the same as those of the aforementioned publishing component embodiment. For the sake of brief description, for matters not mentioned in the method embodiment, reference may be made to the corresponding contents in the aforementioned publishing component embodiment.

[0102] An embodiment of the present invention further provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above implementation methods.

[0103] Fig. 9 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 90, a memory 91, a bus 92 and a communication interface 93, wherein the processor 90, the communication interface 93 and the memory 91 are connected via the bus 92; the processor 90 is used to execute an executable module stored in the memory 91, such as a computer program.

[0104] The memory 91 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 93 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0105] The bus 92 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0106] Among them, the memory 91 is used to store programs, and the processor 90 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiments of the present invention can be applied to the processor 90 or implemented by the processor 90.

[0107] The processor 90 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 90. The above processor 90 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 91, and the processor 90 reads the information in the memory 91 and completes the steps of the above method in combination with its hardware.

[0108] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.

[0109] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0110] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A microservice single demand publishing component, characterized in that: include: Management and control modules and single-requirement compilation modules; The control module is used to obtain and save the version change records of each microservice application system in the code repository and the code change records corresponding to each development task; The single requirement compilation module is used to: obtain a single requirement application of the microservice application system, and determine the pre-requirements of the single requirement according to the single requirement application, the version change record of the microservice application system and the code change record corresponding to each development task; The single requirement compilation module is also used to: obtain the code change set corresponding to the single requirement and the code change set corresponding to the pre-requirement from the management and control module, obtain the code set to be compiled, and compile and package the code set to be compiled for single requirement release.

2. The publishing component according to claim 1, characterized in that: The control module integrates the GIT management system and obtains the version change records of each microservice application system in the code repository from the GIT management system; The management and control module is connected to the TFS demand management system, obtains the allocation correspondence between each demand of the microservice application system and the development task from the TFS demand management system, and matches the development task with the version change record of the microservice application system according to the allocation correspondence to obtain the code change record corresponding to each development task.

3. The publishing component according to claim 1, characterized in that: The single requirement compilation module is specifically used to: determine the application number and version number of the single requirement according to the single requirement application; Determine the baseline version number of the baseline version corresponding to the single requirement according to the version number, determine the list of microservice change records corresponding to the single requirement according to the application number, and obtain the development task corresponding to the single requirement and the code change set corresponding to the development task according to each microservice change record; Determine the function module to which the development task belongs according to the code change set, and determine the historical version change record of the function module from the baseline version to the current version according to the version change record of the function module code; Determine the version change records that are not caused by the current single demand based on the historical change records, and determine the corresponding historical development tasks and the prerequisite requirements corresponding to the historical development tasks based on the version change records that are not caused by the current single demand, and save the prerequisite requirements in the full demand list; wherein the full demand list includes: the current single demand and prerequisite requirements.

4. The publishing component according to claim 3, characterized in that: The single-requirement compilation module is specifically used for: Obtain a list of microservice change lists corresponding to each requirement in the full list of requirements and a development task corresponding to each requirement, and obtain a code change set corresponding to each requirement according to the development task corresponding to each requirement; The code change sets corresponding to each requirement are merged to obtain a code set to be compiled.

5. The publishing component according to claim 4, characterized in that: The single requirement compilation module is further used for: Determine the functional module and project code to which each requirement belongs according to the code change set corresponding to each requirement; The project codes corresponding to each of the requirements are merged, and the latest version code set of the project codes corresponding to each of the requirements is retained, and the latest version code set is classified according to the project to obtain the code set to be compiled.

6. The publishing component according to claim 1, characterized in that: The single-requirement compilation module is specifically used for: Compile the code set to be compiled according to modules to obtain corresponding module files, and package the module files to obtain microservice products to be deployed; Package the microservice products to be deployed and output them to the specified directory.

7. The publishing component according to claim 1, characterized in that: The management and control module is also used to manage the code submission of each development task.

8. A method for publishing microservice order requirements, characterized in that: include: The method is applied to the microservice single demand publishing component according to any one of claims 1 to 7; the method comprises: Obtain and save the version change records of each microservice application system in the code repository and the code change records corresponding to each development task; Obtain a single requirement application of the microservice application system, and determine the pre-requisites of the single requirement according to the single requirement application, the version change record of the microservice application system, and the code change record corresponding to each development task; The code change set corresponding to the single requirement and the code change set corresponding to the pre-requirement are obtained from the management and control module to obtain the code set to be compiled, and the code set to be compiled is compiled and packaged to be released for the single requirement.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the method according to claim 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 8 are performed.