System code management method and system, electronic equipment and storage medium
By introducing system management components into the system code management system of the microservice architecture, the problem of inconvenience in overall version management of the system is solved, global version management is realized, learning costs are reduced, and an intuitive graph management method is provided.
Patent Information
- Application Number
- CN202510131262.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-03-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Under the microservice architecture, the overall version management of the system is inconvenient. The existing technology requires encapsulating a Git code base on the outer layer of multiple microservice code bases and operating and management through special Git submodule commands, resulting in high learning costs and unintuitive management.
By adding system management components to the system code management system, interacting with the target code base corresponding to the target system, obtaining the service list of multiple microservices and the code version of each microservice, and establishing version association information between the overall version of the system and the target code version.
It realizes global management of system version information of target systems composed of multiple scattered microservices, reduces the learning cost of system code version management, and provides visual graphic viewing and management methods, improving convenience.
Smart Images

Figure CN119576373A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of code management under a microservice architecture, and in particular to a system code management method, system, electronic device, and storage medium. Background Art
[0002] Microservice architecture has been widely used with the development of cloud-native technology. In microservice architecture, a large system or software is usually split into a large number of microservices. Each microservice is independently developed and deployed using a separate Git code base, and is managed in multiple Git code bases. However, when delivering to enterprise-level customers, it is necessary to deliver a complete system to them, which makes overall system version management inconvenient. Summary of the invention
[0003] The present application provides a system code management method, system, electronic device and storage medium. The technical solution is as follows: According to one aspect of the present application, a system code management method is provided, the method is applied to a system code management system, a target code library of a target system and a system management component are deployed in the system code management system, the target system is divided into multiple microservices, the target code library is composed of microservice code libraries corresponding to the multiple microservices, and the microservice code library stores microservice codes that implement functions corresponding to the microservices, and the method includes: After receiving a management instruction for a system code version corresponding to the target system, creating an overall system version of the target system through the system management component, and sending a code version acquisition request to the target code library; After receiving the code version acquisition request, feeding back code version information to the system management component through the target code library, the code version information including a service list of the multiple microservices contained in the target code library and a microservice code version corresponding to each of the microservices; After receiving the code version information, the system management component establishes version association information between the overall system version and the target code version based on the code version information, and the target code version belongs to the microservice code version.
[0004] According to another aspect of the present application, a system code management system is provided, in which a target code library and a system management component of a target system are deployed, the target system is divided into multiple microservices, the target code library is composed of microservice code libraries corresponding to the multiple microservices, and the microservice code library stores microservice codes that implement functions corresponding to the microservices; The system management component is used to create an overall system version of the target system after receiving a management instruction for a system code version corresponding to the target system, and send a code version acquisition request to the target code library; The target code library is used to feedback code version information to the system management component after receiving the code version acquisition request, wherein the code version information includes a service list of the multiple microservices contained in the target code library and a microservice code version corresponding to each of the microservices; The system management component is further used to establish version association information between the overall system version and a target code version based on the code version information after receiving the code version information, and the target code version belongs to the microservice code version.
[0005] According to one aspect of the present application, an electronic device is provided, including: a processor and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the system code management method as described above.
[0006] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the system code management method as described above.
[0007] According to another aspect of the present application, a computer program product is provided, the computer program product comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the above-mentioned system code management method.
[0008] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least: By adding a system management component and through the interaction between the system management component and the target code library corresponding to the target system, multiple microservices associated with the target system and the microservice code versions corresponding to each microservice are obtained, and an association relationship between the overall system version corresponding to the target system and the target code version in the microservice code version is established, so as to achieve the purpose of managing the system version information of the target system composed of multiple scattered microservices through the system management component, and provide a global management capability of the system code version under the microservice architecture; compared with the related technology that requires encapsulating a Git code library in the outer layer of multiple microservice code libraries and operating and managing through special Git submodule commands, there is no need to learn complex special commands, which reduces the learning cost of system code version management; and it can also provide visual graphical viewing and management methods, thereby improving the convenience of system code version management. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Further details, features and advantages of the present application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of a system code management method according to an exemplary embodiment of the present application is shown; Figure 2 A flowchart of another system code management method according to an exemplary embodiment of the present application is shown; Figure 3 A flowchart of another system code management method according to an exemplary embodiment of the present application is shown; Figure 4 It is a schematic diagram of the architecture of the system code management system provided in the embodiment of the present application; Figure 5 It is a structural diagram of a system code management system provided by an embodiment of the present application; Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present application is shown. DETAILED DESCRIPTION
[0010] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0011] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.
[0012] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units. It should be noted that the modifications of "one" and "multiple" mentioned in this application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more". The names of the messages or information exchanged between multiple devices in the embodiments of this application are only for illustrative purposes, and are not used to limit the scope of these messages or information.
[0013] The solution of the present invention is described below with reference to the accompanying drawings, and the technical solution provided by the embodiment of the present invention is explained in detail through specific embodiments and their application scenarios.
[0014] In a microservice architecture, a large system or software is usually split into many microservices, and each microservice is independently developed and deployed using a separate Git code base. However, if the entire system (or the entire software) is delivered to enterprise-level customers, unified version management is required for all microservices.
[0015] At present, a technology called Git submodule is usually used to solve the above version management problem. After different microservices are split into independent Git code bases for development, all relevant Git code bases of the system are encapsulated into an overall virtual warehouse through Git submodule technology, that is, a Git code base is nested in the outer layer of the Git code base corresponding to multiple microservices. The original Git code base of each microservice is used as a submodule, and the outer nested Git code base is operated through special Git submodule commands. In this way, the configuration file is used to manage the code version relationship between the overall system version (the version of the virtual warehouse) and the Git code base of each microservice.
[0016] Although the management method of the existing technology is based on the functional extension of the native Git code library, this solution has the following disadvantages: (1) It is necessary to use a special Git submodule command, which requires additional learning costs; (2) The relationship between each Git code library and the overall version can only be configured through the configuration file, and there is no graphical way to view and manage it, which is not intuitive; (3) It can only manage the corresponding relationship between the system version and the code version of each microservice, and cannot manage the complex correlation information of the system version, such as version correlation requirements, fixed defects, upgrade scripts corresponding to each version, and other correlation information.
[0017] In order to improve the management convenience of the overall system code version, the embodiment of the present application provides a new system code version management method, which provides global management capabilities by adding a system version management component (also called a system version management module) to manage the system version information composed of scattered microservices. Figure 1 , which shows a flow chart of a system code management method according to an exemplary embodiment of the present application. Take the method applied to the system code management system as an example. Figure 1 As shown, the method includes: Step 101, after receiving a management instruction for a system code version corresponding to a target system, create an overall system version of the target system through a system management component, and send a code version acquisition request to a target code library.
[0018] Among them, the system code management system deploys the target system's target code library and system management components (the system management components may also be called system version management components or system version management modules). The target system is split into multiple microservices during development, and the target code library is composed of microservice code libraries corresponding to multiple microservices. The microservice code library stores microservice codes that implement the corresponding functions of the microservices.
[0019] Unlike related technologies, in the embodiments of the present application, there is no need to nest a Git code base in the outer layer of multiple microservice code bases. Instead, a system management component (or system version management component) that can communicate with each microservice code base is added to achieve global management of the code versions of multiple microservices associated with the target system. In addition, the system management component also has a front-end interface, so that users can set and view the system code version of the target system and the code version information of its associated microservices through the front-end interface.
[0020] In one possible implementation, when the user needs to manage the current system code version of the target system, the overall system version of the target system can be created in the front-end interface of the system management component, and the corresponding system management component receives the management instructions for the corresponding system code version of the target system, creates the overall system version of the target system, and sends a code version acquisition request to the target code library to obtain the microservice code versions of multiple microservices associated with the target system.
[0021] Step 102: After receiving the code version acquisition request, code version information is fed back to the system management component through the target code library. The code version information includes a service list of multiple microservices included in the target code library and a microservice code version corresponding to each microservice.
[0022] After the system management component sends a code version acquisition request to the target code library, it essentially sends a code version acquisition request to multiple microservice code libraries in the target code library to obtain the microservice code version of each microservice from the microservice code library corresponding to each microservice. After receiving the code version acquisition request, the target code library feeds back the acquired code version information to the system management component. The code version information includes information such as a service list of multiple microservices contained in the target code library and the microservice code version of each microservice.
[0023] Exemplarily, if the target system is split into microservice A, microservice B and microservice C, where the microservice code version of the microservice code corresponding to microservice A is A1, the microservice code version of the microservice code corresponding to microservice B is B1, and the microservice code version of the microservice code corresponding to microservice C is C1; then the code version information fed back by the target code library to the system management component includes: microservice A-A1, microservice B-B1, microservice C-C1.
[0024] Step 103, after receiving the code version information, the system management component establishes version association information between the overall system version and the target code version based on the code version information, and the target code version belongs to the microservice code version.
[0025] The corresponding system management component may receive the code version information fed back by the target code library. After receiving the code version information, the system management component may display the code version information in a visual form. Exemplarily, the visual form may be a list form.
[0026] Exemplarily, the display format of the code version information may be as shown in Table 1: Table 1
[0027] Based on Table 1, users can directly view multiple microservices associated with the current target system and the microservice code versions of each microservice in the front-end interface of the system management component. Subsequent users can set the target code version associated with the overall system version according to the actual operation requirements of the target system, so as to establish version association information between the overall system version and the target code version through the system management component, and the target code version belongs to the microservice code version.
[0028] In summary, the embodiment of the present application provides a system code version management method under a microservice architecture: by adding a system management component, and through the interaction between the system management component and the target code library corresponding to the target system, multiple microservices associated with the target system and the microservice code versions corresponding to each microservice are obtained, and an association relationship between the overall system version corresponding to the target system and the target code version in the microservice code version is established, so as to achieve the purpose of managing the system version information of the target system composed of multiple scattered microservices through the system management component, and provide a global management capability of the system code version under the microservice architecture; compared with the related technology that requires encapsulating a Git code library in the outer layer of multiple microservice code libraries and performing operation management through special Git submodule commands, there is no need to learn complex special commands, thereby reducing the learning cost of system code version management; and it can also provide a visual graphical viewing and management method, thereby improving the convenience of system code version management.
[0029] The microservice codes of each microservice will be updated iteratively to adapt to the different functional requirements of the target system. The corresponding microservice code base may contain microservice codes of different microservice code versions, and the target system needs to specify which microservice code version is used during actual operation. In order to clarify the target code version associated with the corresponding system version of the current target system, the user needs to select from multiple microservice code versions.
[0030] Please refer to Figure 2 , which shows a flow chart of another system code management method according to an exemplary embodiment of the present application. Take the application of this method to a system code management system as an example. Figure 2 As shown, the method includes: Step 201, after receiving a management instruction for a system code version corresponding to a target system, create an overall system version of the target system through a system management component, and send a code version acquisition request to a target code library.
[0031] Among them, the system management component (system version management component) also includes a version information graphical management submodule and a Git code base information acquisition submodule. In a corresponding possible implementation, the user creates the overall system version of the target system through the version information graphical management submodule, and adds the microservice code version of each microservice Git code base associated with the target system, which triggers the version information graphical management submodule to send a code version acquisition request to the Git code base information acquisition submodule, and the code version acquisition request is used to obtain the code base list (service list) of each microservice associated with the target system and the list information of the microservice code version under each microservice code base; after receiving the code version acquisition request, the Git code base information acquisition submodule can send a code version acquisition request to the target code base (Git code base) through a Git command (specifically an acquisition command) to obtain the service list of each microservice associated with the target system and the list of microservice code versions corresponding to each microservice.
[0032] Step 202: after receiving the code version acquisition request, the code version information is fed back to the system management component through the target code library, where the code version information includes a service list of multiple microservices included in the target code library and a microservice code version corresponding to each microservice.
[0033] After receiving the code version acquisition request, the target code repository will feed back the acquired code version information (such as the service list of multiple microservices and the microservice code version corresponding to each microservice) to the Git code repository information acquisition sub-module. The corresponding Git code repository information acquisition sub-module can return the acquired code version information to the version information graphical management sub-module.
[0034] Step 203: After receiving the code version information, the code version information is displayed through the system management component.
[0035] After receiving the code version information, the version information graphical management submodule in the system management component can display the code version information in a list form in the front-end interface, that is, display a service list of multiple microservices and the microservice code version corresponding to each microservice.
[0036] It should be noted that, when a microservice corresponds to multiple microservice code versions, the target code library will feedback all microservice code versions corresponding to each microservice to the system management component.
[0037] In an exemplary example, the displayed code version information may be as shown in Table 2 (each microservice corresponds to multiple microservice code versions): Table 2
[0038] As can be seen from Table 2, the target system is associated with microservice A, microservice B and microservice C. Microservice A has three microservice code versions, A1, A2 and A3; microservice B has two microservice code versions, B1 and B2; and microservice C has three microservice code versions, C1, C2 and C1.
[0039] Step 204: after receiving the setting operation on the code version information, determine the target microservice indicated by the setting operation and the target code version corresponding to the target microservice through the system management component.
[0040] The user can set the displayed code version information according to the microservice code version of each microservice required by the overall system version of the current target system, that is, for each microservice, select the target code version from the multiple microservice code versions corresponding to each microservice as the microservice code version of each microservice associated with the overall system version. The version information graphical management submodule in the corresponding system management component can obtain the target microservice indicated by the setting operation and the target code version corresponding to each target microservice.
[0041] Exemplarily, as shown in Table 2, the user can select A2 corresponding to microservice A, B1 corresponding to microservice B, and C3 corresponding to microservice C, and then determine that the setting operation indicates that A2 corresponding to microservice A is the target code version, B1 corresponding to microservice B is the target code version, and C3 corresponding to microservice C is the target code version.
[0042] Step 205: Establish version association information based on the target microservice, the target code version and the overall system version through the system management component.
[0043] After determining the target code version of each microservice (target microservice) associated with the target system, the overall system version can be associated with the target code version corresponding to the target microservice, thereby establishing version association information of the target system. For example, taking A2 corresponding to microservice A as the target code version, B1 corresponding to microservice B as the target code version, and C3 corresponding to microservice C as the target code version as an example, the version association information can be: overall system version V1-microservice A: A2-microservice B: B1-microservice C: C3.
[0044] Step 206, when the target system is running, the target microservice code corresponding to the target code version under the target microservice is called from the target code library through the system management component based on the target microservice and the target code version in the version association information.
[0045] Step 207: Run the target microservice code through the system management component to implement the system function of the target system.
[0046] After setting the version association information of the current target system, when the target system is running, the target microservice code corresponding to the target code version under the target microservice can be called from the target code library based on the target microservice and its corresponding target code version in the version association information, thereby realizing the system function of the target system by running the target microservice code.
[0047] In this embodiment, the code version information is displayed through the system management component so that the user can correctly set the microservice code version of the target system corresponding to the overall version of the current system and each microservice associated with it, thereby realizing global management of multiple microservice code versions; and when the target system is running, the correct microservice code version can also be called based on the associated version information to ensure the accurate operation of the target system.
[0048] In other possible scenarios, the system management component can not only manage the relationship between the overall system version and the corresponding microservice code versions of other microservices, but also manage other complex relationships, such as version requirements, defect repair, upgrade scripts, etc.
[0049] Please refer to Figure 3 , which shows a flow chart of another system code management method according to an exemplary embodiment of the present application. Take the application of this method to a system code management system as an example. Figure 3 As shown, the method includes: Step 301, after receiving a code submission request for a target microservice among multiple microservices, the target microservice code indicated by the code submission request is stored in a target microservice code library corresponding to the target microservice through a target code library.
[0050] Since the target code library in the embodiment of the present application is directly composed of the microservice code libraries of multiple microservices, and the outer layer does not have a nested Git code library, if the user needs to submit microservice codes to each microservice code library, the user can directly operate the microservice code library through ordinary Git commands (specifically upload commands), and submit the microservice codes of each microservice to their respective microservice code libraries for management and storage. In one possible implementation, the user triggers a code submission request through an ordinary Git command (submit command), and after the target code library in the corresponding system code management system receives the code submission request for the target microservice among the multiple microservices, the target microservice code indicated by the code submission request can be stored in the target microservice code library corresponding to the target microservice.
[0051] Step 302: after receiving the management instruction for the system code version corresponding to the target system, create the overall system version of the target system through the system management component, and send a code version acquisition request to the target code library.
[0052] Step 303: After receiving the code version acquisition request, the code version information is fed back to the system management component through the target code library. The code version information includes a service list of multiple microservices included in the target code library and a microservice code version corresponding to each microservice.
[0053] Step 304, after receiving the code version information, the system management component establishes version association information between the overall system version and the target code version based on the code version information, and the target code version belongs to the microservice code version.
[0054] The implementation of steps 302 to 304 may refer to the above embodiments, and will not be described in detail in this embodiment.
[0055] Step 305: If a requirement association instruction for a target code version corresponding to a target microservice among multiple microservices is received, a target function requirement corresponding to the target code version is obtained through a system management component.
[0056] In addition to managing the overall system version and the target code versions of each microservice associated with it, the system management component can also manage other complex relationships. In order to obtain other complex relationships, the system management component also includes a third-party information acquisition submodule to obtain other complex information associated with the overall system version, such as repair defects, functional requirements, upgrade scripts, etc.
[0057] In one possible implementation, if the system management component receives an instruction to associate a requirement for a target code version corresponding to a target microservice among multiple microservices, the target functional requirement (or target version requirement) corresponding to the target code version can be obtained from a third-party information source through a third-party information acquisition submodule in the system management component. The third-party information source can be a device that stores functional requirements corresponding to each microservice code version.
[0058] Step 306: Associating the target code version with the target functional requirement through the system management component.
[0059] After the third-party information acquisition submodule obtains the target functional requirements corresponding to the target code version, it can feed back the target functional requirements to the version information graphical management submodule to associate the target code version with its corresponding target functional requirements; so that users can directly view the functional requirements associated with each microservice code version through the system management component.
[0060] Step 307: If a repair-related instruction for a target code version corresponding to a target microservice among the multiple microservices is received, a target repair defect of the target code version is obtained through a system management component.
[0061] Similarly, if the system management component receives a repair-related instruction for a target code version corresponding to a target microservice among multiple microservices, the target repair defect corresponding to the target code version can be obtained from a third-party information source through a third-party information acquisition submodule in the system management component. The third-party information source can be a device that stores the repair defects corresponding to each microservice code version.
[0062] Step 308: Associating the target code version with the target repair defect through the system management component.
[0063] After the third-party information acquisition submodule obtains the target repair defect corresponding to the target code version, it can feed back the target repair defect to the version information graphical management submodule to associate the target code version with its corresponding target repair defect; so that the user can directly view the target repair defect associated with each microservice code version through the system management component.
[0064] Step 309: If a script association instruction for a target microservice corresponding to a target code version among the multiple microservices is received, a target upgrade script for the target code version is obtained through the system management component.
[0065] Similarly, if the system management component receives a script association instruction for a target code version corresponding to a target microservice among multiple microservices, the target upgrade script corresponding to the target code version can be obtained from a third-party information source through a third-party information acquisition submodule in the system management component. The third-party information source can be a device that stores upgrade scripts corresponding to each microservice code version. The upgrade script refers to a program or tool that updates a microservice from one version to another.
[0066] Step 310: Associating the target code version with the target upgrade script through the system management component.
[0067] After the third-party information acquisition submodule obtains the target upgrade script corresponding to the target code version, it can feed back the target upgrade script to the version information graphical management submodule to associate the target code version with its corresponding target upgrade script; so that the user can directly view the target upgrade script associated with each microservice code version through the system management component.
[0068] In this embodiment, by obtaining complex information such as repair defects, functional requirements, and upgrade scripts corresponding to the microservice code version, and associating the complex information with the corresponding microservice code version, and then indirectly associating it with the overall system version, the user can intuitively view some complex associations between the various microservices under the overall system version, thereby realizing the management of the complex associations.
[0069] Please refer to Figure 4, which is a schematic diagram of the architecture of the system code management system provided in the embodiment of the present application. The system code management system consists of a Git code repository (i.e., the target code library in the above embodiment), a system version management module (i.e., the system management component in the above embodiment) and a third-party information source. The working principle and usage process of the system code management system are as follows: 1. Users operate the Git code repository through ordinary Git commands and submit the code of each microservice of the system to their respective code repositories for management and storage. Figure 4 For example, submit the code corresponding to microservice A to the microservice A code base in the Git code repository, submit the code corresponding to microservice B to the microservice B code base in the Git code repository, and submit the code corresponding to microservice N to the microservice N code base in the Git code repository; 2. Users manage submodules through version information graphics, create the overall system version, and add the code versions of the associated microservice Git code repositories [such as Figure 4 As shown by arrow 2 in the figure]; 3. The version information graphical management submodule sends the Git code library information acquisition submodule to obtain the list of each microservice code library and the version list information under each microservice code library [such as Figure 4 As shown by arrow 3 in the figure]; 4. The Git code library information acquisition submodule sends a request to the Git code repository through the Git command to obtain the list of each microservice code library and the version list information under each microservice code library and returns [such as Figure 4 As shown by arrow 4 in the figure]; 5. The Git code library information acquisition submodule returns the list of each microservice code library and the version list information under each microservice code library obtained in step 4 to step 2 [such as Figure 4 As shown by arrow 5 in the figure, the user can correctly set the system version and the code version information of each microservice Git code repository associated with it through the version information graphical management submodule; 6. Similar to steps 2 to 5, for complex information related to system versions, such as version-related requirements, fixed defects, upgrade scripts corresponding to each version, etc., you can use the third-party information acquisition submodule to obtain these complex information and establish an association with the system version information [such as Figure 4 As shown by arrows 6, 7 and 8].
[0070] Please refer to Figure 5, which is a schematic diagram of the structure of a system code management system provided by an embodiment of the present application. The system code management system is deployed with a target code library and a system management component of the target system. The target system is divided into multiple microservices. The target code library is composed of microservice code libraries corresponding to multiple microservices. The microservice code library stores microservice codes that implement the corresponding functions of the microservices. For example, Figure 5 As shown, the system code management system 500 includes: The system management component is used to create an overall system version of the target system after receiving a management instruction for a system code version corresponding to the target system, and send a code version acquisition request to the target code library; The target code library is used to feedback code version information to the system management component after receiving the code version acquisition request, wherein the code version information includes a service list of the multiple microservices contained in the target code library and a microservice code version corresponding to each of the microservices; The system management component is further used to establish version association information between the overall system version and a target code version based on the code version information after receiving the code version information, and the target code version belongs to the microservice code version.
[0071] Optionally, each of the microservices corresponds to multiple microservice code versions; The system management component is also used to: After receiving the code version information, display the code version information; After receiving a setting operation on the code version information, determining a target microservice indicated by the setting operation and the target code version corresponding to the target microservice; The version association information is established based on the target microservice, the target code version, and the overall system version.
[0072] Optionally, the system management component is further used to: When running the target system, based on the target microservice and the target code version in the version association information, calling the target microservice code corresponding to the target code version under the target microservice from the target code library; The system function of the target system is implemented by running the target microservice code.
[0073] Optionally, the object code library is also used for: After receiving a code submission request for a target microservice among the multiple microservices, the target microservice code indicated by the code submission request is stored in a target microservice code library corresponding to the target microservice.
[0074] Optionally, the system management component is further used to: If a requirement association instruction for a target microservice among the multiple microservices corresponding to the target code version is received, a target function requirement corresponding to the target code version is obtained; The target code version is associated with the target functional requirement.
[0075] Optionally, the system management component is further used to: If a repair-associated instruction for a target microservice among the multiple microservices corresponding to the target code version is received, a target repair defect of the target code version is obtained; The target code version is associated with the target fixed defect.
[0076] Optionally, the system management component is further used to: If a script association instruction corresponding to the target code version is received for a target microservice among the multiple microservices, a target upgrade script for the target code version is obtained; The target code version and the target upgrade script are associated.
[0077] In summary, the embodiment of the present application provides a system code version management method under a microservice architecture: by adding a system management component, and through the interaction between the system management component and the target code library corresponding to the target system, multiple microservices associated with the target system and the microservice code versions corresponding to each microservice are obtained, and an association relationship between the overall system version corresponding to the target system and the target code version in the microservice code version is established, so as to achieve the purpose of managing the system version information of the target system composed of multiple scattered microservices through the system management component, and provide a global management capability of the system code version under the microservice architecture; compared with the related technology that requires encapsulating a Git code library in the outer layer of multiple microservice code libraries and performing operation management through special Git submodule commands, there is no need to learn complex special commands, thereby reducing the learning cost of system code version management; and it can also provide a visual graphical viewing and management method, thereby improving the convenience of system code version management.
[0078] The exemplary embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to cause the electronic device to perform the method according to the embodiment of the present application when executed by the at least one processor.
[0079] The exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present application.
[0080] The exemplary embodiments of the present application further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to enable the computer to execute the method according to the embodiment of the present application.
[0081] refer to Figure 6 , the structural block diagram of the electronic device 600 that can be used as the server or client of the present application will now be described, which is an example of a hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples, and are not intended to limit the implementation of the present application described and / or required herein.
[0082] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0083] A plurality of components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to the electronic device 600, and the input unit 606 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 607 may be any type of device capable of presenting information, and may include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 608 may include but is not limited to a disk, an optical disk. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0084] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, Figure 1 , Figure 2 , Figure 3 The method shown may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. In some embodiments, the computing unit 601 may be configured to execute the computer program by any other suitable means (e.g., by means of firmware). Figure 1 , Figure 2 , Figure 3 The method shown.
[0085] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0086] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0087] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0088] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0089] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0090] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. A system code management method, characterized in that: The method is applied to a system code management system, in which a target code library and a system management component of a target system are deployed, the target system is divided into multiple microservices, the target code library is composed of microservice code libraries corresponding to the multiple microservices, and the microservice code library stores microservice codes that implement functions corresponding to the microservices, and the method includes: After receiving a management instruction for a system code version corresponding to the target system, creating an overall system version of the target system through the system management component, and sending a code version acquisition request to the target code library; After receiving the code version acquisition request, feeding back code version information to the system management component through the target code library, the code version information including a service list of the multiple microservices contained in the target code library and a microservice code version corresponding to each of the microservices; After receiving the code version information, the system management component establishes version association information between the overall system version and the target code version based on the code version information, and the target code version belongs to the microservice code version.
2. The method according to claim 1, characterized in that Each of the microservices corresponds to a plurality of microservice code versions; After receiving the code version information, establishing version association information between the overall system version and the target code version based on the code version information by the system management component includes: After receiving the code version information, displaying the code version information through the system management component; After receiving the setting operation on the code version information, determining, by the system management component, a target microservice indicated by the setting operation and the target code version corresponding to the target microservice; The version association information is established by the system management component based on the target microservice, the target code version and the overall system version.
3. The method according to claim 2, characterized in that The method further comprises: When the target system is running, the target microservice code corresponding to the target code version under the target microservice is called from the target code library by the system management component based on the target microservice and the target code version in the version association information; The target microservice code is run through the system management component to implement the system function of the target system.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: After receiving a code submission request for a target microservice among the multiple microservices, the target microservice code indicated by the code submission request is stored in a target microservice code library corresponding to the target microservice through the target code library.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If a requirement association instruction for a target microservice among the multiple microservices corresponding to the target code version is received, a target functional requirement corresponding to the target code version is obtained through the system management component; The target code version and the target functional requirement are associated through the system management component.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If a repair-associated instruction for a target microservice among the multiple microservices corresponding to the target code version is received, a target repair defect of the target code version is obtained through the system management component; The target code version and the target repair defect are associated by the system management component.
7. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If a script association instruction corresponding to the target code version is received for a target microservice among the multiple microservices, a target upgrade script for the target code version is obtained through the system management component; The target code version and the target upgrade script are associated through the system management component.
8. A system code management system, characterized in that: The system code management system has a target code library and a system management component of the target system deployed therein, the target system is divided into multiple microservices, the target code library is composed of microservice code libraries corresponding to the multiple microservices, and the microservice code library stores microservice codes that implement functions corresponding to the microservices; The system management component is used to create an overall system version of the target system after receiving a management instruction for a system code version corresponding to the target system, and send a code version acquisition request to the target code library; The target code library is used to feedback code version information to the system management component after receiving the code version acquisition request, wherein the code version information includes a service list of the multiple microservices contained in the target code library and a microservice code version corresponding to each of the microservices; The system management component is further used to establish version association information between the overall system version and a target code version based on the code version information after receiving the code version information, and the target code version belongs to the microservice code version.
9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to execute the system code management method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the system code management method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Code hosting and collaborating system
CN111475197A
Industrial software micro-service merging method and system
CN115827100A
Monomer and micro-service integrated application management system
CN115858008A
Software version issuing method and system based on maven and git
CN116302048A
Code generation and compiling deployment method, platform and equipment based on AI large model
CN117008923A