Architecture online adjustment method and device based on micro-service framework general development specification

By using a microservices framework-based online architecture adjustment method and device, the architecture project and structure are automatically determined, and online adjustments are made in conjunction with development specifications to generate a visual target structure file. This solves the problems of high complexity in development architecture calls and high verification difficulty, and improves the availability of the architecture.

CN115599371BActive Publication Date: 2026-07-24SHENZHEN COMTOP INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN COMTOP INFORMATION TECH
Filing Date
2022-10-27
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

The existing development architecture has high complexity in its calls, and it is difficult to verify after modification. Furthermore, different developers have different architectural design ideas, which makes verification difficult and affects the usability of the development architecture.

Method used

This invention provides a method and apparatus for online architecture adjustment based on a general development specification of a microservice framework. By detecting online architecture adjustment commands, it automatically determines the architecture project and its structure to be adjusted, and performs online architecture adjustment operations in conjunction with preset architecture development specifications. The target structure file is generated and visualized, reducing the difficulty of editing and verification.

Benefits of technology

It improves the accuracy and efficiency of responding to architecture adjustments, reduces the complexity of calling and editing development architectures, and enhances the usability of development architectures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599371B_ABST
    Figure CN115599371B_ABST
Patent Text Reader

Abstract

The application discloses an online adjustment method and device based on a micro-service framework general development specification architecture, which comprises the following steps: according to a detected online architecture adjustment instruction, determining an architecture project to be adjusted and the project structure of the project, a first editing requirement for the project and a second editing requirement for the structure corresponding to the project; then, according to the project structure, the first and second editing requirements, combining the architecture development specification, performing an online architecture adjustment operation on the project, and generating a target structure file matched with a preset data structure according to the obtained adjustment result and the target template data of the completed configuration, the target structure file being used to be displayed to a target user through an online preview editing module to trigger the target user to perform a structure viewing and / or structure editing operation on the target structure file through the online preview editing module. It can be seen that the application can reduce the calling complexity of the development architecture and improve the usability of the development architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of architecture development and adjustment technology, and in particular to an online architecture adjustment method and apparatus based on the general development specifications of microservice frameworks. Background Technology

[0002] When designing a development architecture, various factors such as structural requirements, personal experience, and personal habits result in a wide variety of architectures. Common development architectures include MVC, MVVM, and DDD. Taking the most widely used MVC as an example, different architecture developers, based on their different understandings of architecture, will ultimately design different MVC architectures.

[0003] After designing the development architecture, it's necessary to verify the architecture, manually generate the project, configure the corresponding microservice structure, and manually write the specific code. This includes multiple data verification processes such as entity classes, controller classes, facade classes, appservice classes, data exceptions, and interfaces. Furthermore, if the specific code structure has already been generated after the development architecture design is complete, modifying the architecture requires manual code modification at the structure level. This results in high complexity of architecture modification and invocation, leading to extremely low usability. Additionally, because different developers have different architecture design approaches, the verification process performed by someone other than the architect is extremely difficult. Therefore, reducing the complexity of calling the development architecture and the difficulty of verification after modification, while simultaneously improving the usability of the development architecture, is of paramount importance. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide an online architecture adjustment method and apparatus based on the general development specifications of microservice frameworks, which can reduce the complexity of calling the development architecture and the difficulty of verifying the modified development architecture, while improving the availability of the development architecture.

[0005] To address the aforementioned technical problems, the first aspect of this invention discloses an online architecture adjustment method based on a general development specification for microservice frameworks, the method comprising:

[0006] When an online architecture adjustment instruction is detected, the architecture project to be adjusted and the project structure of the architecture project to be adjusted are determined, and each project structure includes editable parameters that match the project structure;

[0007] According to the online architecture adjustment instruction, a first editing requirement for the architecture project to be adjusted and a second editing requirement for the structure corresponding to the architecture project to be adjusted are determined. The first editing requirement includes the editing requirements corresponding to the editable parameters of the architecture project to be adjusted, and the second editing requirement includes the editing requirements corresponding to the code structure information of the architecture project to be adjusted.

[0008] Based on the project structure, the first editing requirements, and the second editing requirements, and in conjunction with the preset architecture development specifications, an online architecture adjustment operation is performed on the architecture project to be adjusted to obtain the adjustment result corresponding to the architecture to be adjusted. Based on the adjustment result and the target template data that has been configured, a target structure file matching the preset data structure is generated. The target structure file is used to display to the target user through the online preview and editing module to trigger the target user to perform structure viewing and / or structure editing operations on the target structure file through the online preview and editing module.

[0009] As an optional implementation, in the first aspect of the present invention, the engineering structure of the architecture to be adjusted includes any one of the following: a preset multi-level engineering structure, a microservice engineering structure, and a preset logic language engineering structure:

[0010] The editable parameters corresponding to the engineering structure of the architecture project to be adjusted include the structure directory and the project files. The structure directory includes at least one structure file at the level where the structure directory is located.

[0011] The code structure information of the architecture project to be adjusted includes at least one of the basic information, template information and configuration item information corresponding to the code structure of the architecture project to be adjusted, and each item of the code structure information includes editable sub-item information that matches the code structure information.

[0012] As an optional implementation, in the first aspect of the present invention, the second editing requirements of the structure corresponding to the architecture project to be adjusted are determined in the following manner:

[0013] When it is determined that the code structure information of the architecture project to be adjusted includes the basic information and / or the configuration item information, the update data of each sub-item information in the code structure and the number of update items corresponding to the update data are determined.

[0014] Determine whether the number of updated items is equal to the number of information items corresponding to the basic information and / or the configuration item information. When it is determined that the number of updated items is equal to the number of information items corresponding to the basic information and / or the configuration item information, the updated data is determined as the second editing requirement.

[0015] When it is determined that the number of updated items is not equal to the number of information items corresponding to the basic information, the unupdated items are identified, and the default configuration information corresponding to the unupdated items and the updated data are identified as the second editing requirement.

[0016] As an optional implementation, in the first aspect of the present invention, the method further includes:

[0017] When it is determined that the code structure information of the architecture project to be adjusted includes the template information, the template update data is determined. The template update data includes first data updated at the code level for the template information and second data updated on the upper interface of the integrated display.

[0018] Based on the first data and the configuration template matched by the first data, determine the code editing requirements that match the first data;

[0019] The code editing requirements and the second data are determined as the second editing requirements.

[0020] As an optional implementation, in the first aspect of the present invention, after generating a target structure file matching a preset data structure based on the adjustment result and the configured target template data, the method further includes:

[0021] Detect the existence of an architecture reuse instruction, which is used to perform an architecture reuse operation on a certain development architecture, and the architecture reuse instruction includes the architecture reuse requirement corresponding to the architecture reuse instruction;

[0022] When the architecture reuse instruction is detected, it is determined whether the target development architecture corresponding to the architecture reuse instruction is the file architecture to which the target structure file belongs;

[0023] When the judgment result is yes, based on the preset architecture reuse module, the target structure file and the file architecture are subjected to architecture reuse operation according to the architecture reuse requirements.

[0024] As an optional implementation, in the first aspect of the present invention, when it is determined that the target development architecture corresponding to the architecture reuse instruction is not the file architecture, the method further includes:

[0025] Based on the target development architecture, an architecture parameter pairing operation is performed on the reuse architecture database to obtain the architecture pairing result corresponding to the target development architecture. The reuse architecture database stores several reusable architectures that have completed architecture configuration operations.

[0026] When the architecture matching result indicates that there is a target adaptation architecture in the reuse architecture database that matches the target development architecture, an architecture reuse operation is performed on the target adaptation architecture according to the architecture reuse requirements. The target adaptation architecture is an architecture whose architecture adaptation parameters with the target development architecture are higher than a preset adaptation threshold.

[0027] As an optional implementation, in the first aspect of the present invention, the method further includes:

[0028] When the architecture matching result indicates that there is no target adaptation architecture matching the target development architecture in the reuse architecture database, a temporary development architecture corresponding to the architecture configuration parameters is generated according to the architecture configuration parameters corresponding to the target development architecture and combined with the preset architecture template, and an architecture reuse operation is performed on the temporary development architecture according to the architecture reuse requirements.

[0029] The system detects subsequent editing instructions for the temporary development architecture and performs architecture control operations on the temporary development architecture according to the subsequent editing instructions. The subsequent editing instructions include deletion instructions that perform data deletion operations on the temporary development architecture or aggregation and storage instructions that perform data aggregation and storage operations on the temporary development architecture. The architecture control operations include the data deletion operation or the data aggregation and storage operation.

[0030] A second aspect of this invention discloses an online architecture adjustment device based on a general development specification for microservice frameworks, the device comprising:

[0031] The determination module is used to determine the architecture project to be adjusted and the project structure of the architecture project to be adjusted when an online architecture adjustment instruction is detected, wherein each project structure includes editable parameters that match the project structure;

[0032] The determining module is further configured to determine, according to the online architecture adjustment instruction, a first editing requirement for the architecture project to be adjusted and a second editing requirement for the structure corresponding to the architecture project to be adjusted, wherein the first editing requirement includes the editing requirement corresponding to the editable parameters of the architecture project to be adjusted, and the second editing requirement includes the editing requirement corresponding to the code structure information of the architecture project to be adjusted.

[0033] The online adjustment module is used to perform online architecture adjustment operations on the architecture project to be adjusted based on the project structure, the first editing requirements, and the second editing requirements, combined with the preset architecture development specifications, to obtain the adjustment result corresponding to the architecture to be adjusted.

[0034] The generation module is used to generate a target structure file that matches the preset data structure based on the adjustment results and the target template data that has been configured. The target structure file is used to display to the target user through the online preview and editing module, so as to trigger the target user to perform structure viewing and / or structure editing operations on the target structure file through the online preview and editing module.

[0035] As an optional implementation, in the second aspect of the present invention, the engineering structure of the architecture to be adjusted includes any one of the following: a preset multi-level engineering structure, a microservice engineering structure, and a preset logic language engineering structure:

[0036] The editable parameters corresponding to the engineering structure of the architecture project to be adjusted include the structure directory and the project files. The structure directory includes at least one structure file at the level where the structure directory is located.

[0037] The code structure information of the architecture project to be adjusted includes at least one of the basic information, template information and configuration item information corresponding to the code structure of the architecture project to be adjusted, and each item of the code structure information includes editable sub-item information that matches the code structure information.

[0038] As an optional implementation, in a second aspect of the invention, the second editing requirements of the structure corresponding to the architecture project to be adjusted are determined in the following manner:

[0039] When it is determined that the code structure information of the architecture project to be adjusted includes the basic information and / or the configuration item information, the update data of each sub-item information in the code structure and the number of update items corresponding to the update data are determined.

[0040] Determine whether the number of updated items is equal to the number of information items corresponding to the basic information and / or the configuration item information. When it is determined that the number of updated items is equal to the number of information items corresponding to the basic information and / or the configuration item information, the updated data is determined as the second editing requirement.

[0041] When it is determined that the number of updated items is not equal to the number of information items corresponding to the basic information, the unupdated items are identified, and the default configuration information corresponding to the unupdated items and the updated data are identified as the second editing requirement.

[0042] As an optional implementation, in the second aspect of the invention, the second editing requirements of the structure corresponding to the architecture project to be adjusted are further determined by the following method:

[0043] When it is determined that the code structure information of the architecture project to be adjusted includes the template information, the template update data is determined. The template update data includes first data updated at the code level for the template information and second data updated on the upper interface of the integrated display.

[0044] Based on the first data and the configuration template matched by the first data, determine the code editing requirements that match the first data;

[0045] The code editing requirements and the second data are determined as the second editing requirements.

[0046] As an optional implementation, in a second aspect of the invention, the apparatus further includes:

[0047] The detection module is used to detect whether there is an architecture reuse instruction after the generation module generates a target structure file that matches the preset data structure based on the adjustment result and the target template data that has been configured. The architecture reuse instruction is used to perform an architecture reuse operation on a certain development architecture. The architecture reuse instruction includes the architecture reuse requirement corresponding to the architecture reuse instruction.

[0048] The judgment module is used to determine whether the target development architecture corresponding to the architecture reuse instruction is the file architecture to which the target structure file belongs when the architecture reuse instruction is detected.

[0049] The reuse module is used to perform architecture reuse operations on the target structure file and the file architecture according to the architecture reuse requirements when the judgment result of the judgment module is yes, based on the preset architecture reuse module.

[0050] As an optional implementation, in a second aspect of the invention, the apparatus further includes:

[0051] The matching module is used to perform an architecture parameter matching operation on the reuse architecture database according to the target development architecture when the judgment module determines that the target development architecture corresponding to the architecture reuse instruction is not the file architecture, so as to obtain the architecture matching result corresponding to the target development architecture. The reuse architecture database stores a number of reusable architectures that have completed architecture configuration operations.

[0052] The reuse module is further configured to perform an architecture reuse operation on the target adaptation architecture according to the architecture reuse requirements when the architecture matching result indicates that there is a target adaptation architecture in the reuse architecture database that matches the target development architecture. The target adaptation architecture is an architecture whose architecture adaptation parameters with the target development architecture are higher than a preset adaptation threshold.

[0053] As an optional implementation, in the second aspect of the present invention, the generation module is further configured to, when the architecture matching result indicates that there is no target adaptation architecture matching the target development architecture in the reuse architecture database, generate a temporary development architecture corresponding to the architecture configuration parameters according to the architecture configuration parameters corresponding to the target development architecture and in combination with a preset architecture template, and perform an architecture reuse operation on the temporary development architecture according to the architecture reuse requirements;

[0054] The device further includes:

[0055] An architecture management module is used to detect subsequent editing instructions for the temporary development architecture and perform architecture management operations on the temporary development architecture according to the subsequent editing instructions. The subsequent editing instructions include deletion instructions to perform data deletion operations on the temporary development architecture or aggregation and storage instructions to perform data aggregation and storage operations on the temporary development architecture. The architecture management operations include the data deletion operation or the data aggregation and storage operation.

[0056] A third aspect of this invention discloses another online architecture adjustment device based on a general development specification for microservice frameworks, the device comprising:

[0057] Memory containing executable program code;

[0058] A processor coupled to the memory;

[0059] The processor calls the executable program code stored in the memory to execute the online architecture adjustment method based on the general development specification of microservice framework disclosed in the first aspect of the present invention.

[0060] The fourth aspect of this invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute the online architecture adjustment method based on the general development specifications of microservice frameworks disclosed in the first aspect of this invention.

[0061] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0062] This invention provides a method for online architecture adjustment based on a general development specification for a microservice framework. The method includes: when an online architecture adjustment instruction is detected, determining the architecture project to be adjusted and its project structure, each project structure including editable parameters matching the project structure; based on the online architecture adjustment instruction, determining a first editing requirement for the architecture project to be adjusted and a second editing requirement for the corresponding structure of the architecture project to be adjusted, the first editing requirement including editing requirements corresponding to the editable parameters of the architecture project to be adjusted, and the second editing requirement including editing requirements corresponding to the code structure information of the architecture project to be adjusted; based on the project structure, the first editing requirement, and the second editing requirement, combined with a preset architecture development specification, performing an online architecture adjustment operation on the architecture project to be adjusted to obtain the adjustment result corresponding to the architecture to be adjusted; and generating a target structure file matching a preset data structure based on the adjustment result and the completed target template data. The target structure file is used to display to a target user through an online preview and editing module, triggering the target user to perform structure viewing and / or structure editing operations on the target structure file through the online preview and editing module. As can be seen, implementing this invention can automatically determine the architecture project to be adjusted and its structure based on the detected online architecture adjustment command, and simultaneously automatically determine the corresponding first and second editing requirements, improving the efficiency of determining different editing requirements. Thus, it can comprehensively consider the project structure, the first and second editing requirements, and the preset architecture development specifications to perform online architecture adjustment operations on the architecture project to be adjusted, improving the response accuracy based on the online architecture adjustment command and the adjustment efficiency and accuracy for the architecture project to be adjusted. Finally, the generated target structure file is displayed to the user, improving the user experience of editing and browsing the target structure file, realizing the visualization of the architecture to be edited, reducing the difficulty of editing the development architecture, reducing the complexity of calling the development architecture, and the visual editing interface also reduces the difficulty of verifying the edited development architecture, improving the usability of the development architecture. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is a flowchart illustrating an online architecture adjustment method based on a general development specification for a microservice framework, as disclosed in an embodiment of the present invention.

[0065] Figure 2This is a flowchart illustrating another online architecture adjustment method based on the general development specifications of microservice frameworks disclosed in an embodiment of the present invention;

[0066] Figure 3 This is a schematic diagram of the structure of an online architecture adjustment device based on a general development specification for a microservice framework, as disclosed in an embodiment of the present invention.

[0067] Figure 4 This is a schematic diagram of another online architecture adjustment device based on the general development specifications of microservice framework disclosed in an embodiment of the present invention;

[0068] Figure 5 This is a schematic diagram of the structure of another online architecture adjustment device based on the general development specifications of microservice framework disclosed in this embodiment of the invention. Detailed Implementation

[0069] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0070] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0071] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0072] This invention discloses an online architecture adjustment method and apparatus based on a general development specification for a microservice framework. It can automatically determine the architecture project to be adjusted and its structure based on detected online architecture adjustment commands, and simultaneously determine the corresponding first and second editing requirements, improving the efficiency of determining different editing requirements. By comprehensively considering the project structure, the first and second editing requirements, and combining them with preset architecture development specifications, it performs online architecture adjustment operations on the architecture project to be adjusted, improving the response accuracy based on the online architecture adjustment commands and the adjustment efficiency and accuracy for the architecture project to be adjusted. The resulting target structure file is displayed to the user, improving the user experience of editing and browsing the target structure file, realizing visualization of the architecture to be edited, reducing the difficulty of editing the development architecture, reducing the complexity of calling the development architecture, and also reducing the difficulty of verifying the edited development architecture, thus improving the usability of the development architecture. Detailed descriptions follow.

[0073] Example 1

[0074] Please see Figure 1 , Figure 1 This is a flowchart illustrating an online architecture adjustment method based on a general development specification for microservice frameworks, as disclosed in an embodiment of the present invention. Figure 1 The described online architecture adjustment method based on the general development specifications of microservice frameworks can be applied to online architecture adjustment devices based on the general development specifications of microservice frameworks, and the embodiments of the present invention are not limited thereto. Figure 1 As shown, this online architecture adjustment method based on the general development specifications of microservice frameworks can include the following operations:

[0075] 101. When an online architecture adjustment command is detected, determine the architecture project to be adjusted and its project structure. Each project structure includes editable parameters that match the project structure.

[0076] In this embodiment of the invention, the project structure of the architecture project to be adjusted includes any one of the following: a preset multi-level project structure, a microservice project structure, and a preset logic language project structure (Java project structure). The editable parameters corresponding to the project structure of the architecture project to be adjusted include a structure directory and project files. The structure directory includes at least one structure file at the level where the structure directory is located. The code structure information of the architecture project to be adjusted includes at least one of the following: basic information, template information, and configuration item information corresponding to the code structure of the architecture project to be adjusted. Each item of code structure information includes editable sub-item information that matches the code structure information.

[0077] In this embodiment of the invention, a default platform-level development architecture suite is automatically provided. The platform-level development architecture suite includes some commonly used development architecture templates. When the microservice development architecture is not configured, the top-level platform-level development architecture is used by default.

[0078] 102. Based on the online architecture adjustment instructions, determine the first editing requirements for the architecture project to be adjusted and the second editing requirements for the structure corresponding to the architecture project to be adjusted.

[0079] In this embodiment of the invention, the first editing requirement includes the editing requirements corresponding to the editable parameters of the architecture project to be adjusted, and the second editing requirement includes the editing requirements corresponding to the code structure information of the architecture project to be adjusted.

[0080] 103. Based on the project structure, the first editing requirements, and the second editing requirements, and in conjunction with the preset architecture development specifications, perform online architecture adjustment operations on the project whose architecture needs to be adjusted, and obtain the corresponding adjustment results for the architecture to be adjusted.

[0081] 104. Based on the adjustment results and the completed target template data, generate a target structure file that matches the preset data structure. The target structure file is used to display to the target user through the online preview and editing module.

[0082] In this embodiment of the invention, after the target structure file is displayed to the target user through the online preview and editing module, it triggers the target user to perform structure viewing and / or structure editing operations on the target structure file through the online preview and editing module; specifically, the target template data can be FTL template data, and this embodiment of the invention does not limit it.

[0083] It is evident that implementation Figure 1 The described online architecture adjustment method based on the general development specifications of microservice frameworks can automatically determine the architecture project to be adjusted and its structure based on detected online architecture adjustment commands. It also automatically determines the corresponding first and second editing requirements, improving the efficiency of determining different editing needs. By comprehensively considering the project structure, the first and second editing requirements, and pre-defined architecture development specifications, it performs online architecture adjustment operations on the architecture project to be adjusted, improving the accuracy of response to online architecture adjustment commands and the efficiency and accuracy of adjustments. The resulting target structure file is displayed to the user, enhancing the user experience through editing and browsing. This visualizes the architecture to be edited, reduces the difficulty of editing and the complexity of calling the development architecture, and the visual editing interface also reduces the difficulty of verifying the edited architecture, improving its usability.

[0084] In an optional embodiment, the second editing requirements for the structure corresponding to the architecture project to be adjusted are determined in the following way:

[0085] When it is determined that the code structure information of the architecture project to be adjusted includes basic information and / or configuration item information, determine the update data of each sub-item information in the code structure and the number of update items corresponding to the update data;

[0086] Determine whether the number of updated items is equal to the number of information items corresponding to the basic information and / or configuration information. If it is determined that the number of updated items is equal to the number of information items corresponding to the basic information and / or configuration information, the updated data is determined as the second editing requirement.

[0087] When it is determined that the number of updated items is not equal to the number of information items corresponding to the basic information, the items that have not been updated are identified, and the default configuration information and updated data corresponding to the items that have not been updated are identified as the second editing requirement.

[0088] Optionally, the second editing requirements for the structure corresponding to the architecture project to be adjusted can also be determined in the following ways:

[0089] When it is determined that the code structure information of the architecture project to be adjusted includes template information, the template update data is determined. The template update data includes the first data updated at the code level for the template information and the second data updated on the upper-level interface of the integrated display.

[0090] Based on the first data and the configuration template matched by the first data, determine the code editing requirements that match the first data;

[0091] The code editing requirement and the second data were identified as the second editing requirement.

[0092] It should be noted that the first data and the second data can refer to static configuration data in practical applications, or they can refer to data configured in the domain and service class model (class designer). This embodiment of the invention does not limit the scope of the data.

[0093] As can be seen, in this optional embodiment, corresponding requirement matching schemes are provided for the two cases of code structure information: when the code structure information includes basic information and / or configuration item information, the default configuration information of the determined updated items and unupdated items can be automatically converted into the second editing requirement; when the code structure information includes template information, the first data and the second data are automatically converted into code editing requirements; through these two requirement determination schemes, the accuracy and reliability of the final determined second editing requirement are improved.

[0094] Example 2

[0095] Please see Figure 2 , Figure 2This is a flowchart illustrating another online architecture adjustment method based on a general development specification for microservice frameworks disclosed in an embodiment of the present invention. Figure 2 The described online architecture adjustment method based on the general development specifications of microservice frameworks can be applied to online architecture adjustment devices based on the general development specifications of microservice frameworks, and the embodiments of the present invention are not limited thereto. Figure 2 As shown, this online architecture adjustment method based on the general development specifications of microservice frameworks can include the following operations:

[0096] 201. When an online architecture adjustment command is detected, determine the architecture project to be adjusted and its project structure. Each project structure includes editable parameters that match the project structure.

[0097] 202. Based on the online architecture adjustment instructions, determine the first editing requirements for the architecture project to be adjusted and the second editing requirements for the structure corresponding to the architecture project to be adjusted.

[0098] 203. Based on the project structure, the first editing requirements, and the second editing requirements, and in conjunction with the preset architecture development specifications, perform online architecture adjustment operations on the project whose architecture needs to be adjusted, and obtain the corresponding adjustment results for the architecture to be adjusted.

[0099] 204. Based on the adjustment results and the completed target template data, generate a target structure file that matches the preset data structure. The target structure file is used to display to the target user through the online preview and editing module.

[0100] For further descriptions of steps 201-204 in this embodiment of the invention, please refer to the other specific descriptions of steps 101-104 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.

[0101] 205. Check if there is an architecture reuse instruction. The architecture reuse instruction is used to perform an architecture reuse operation on a certain development architecture.

[0102] In this embodiment of the invention, the architecture reuse instruction includes the architecture reuse requirement corresponding to the architecture reuse instruction.

[0103] 206. When an architecture reuse instruction is detected, determine whether the target development architecture corresponding to the architecture reuse instruction is the same file architecture to which the target structure file belongs.

[0104] In this embodiment of the invention,

[0105] 207. When the judgment result is yes, based on the preset architecture reuse module, perform architecture reuse operation on the target structure file and file architecture according to the architecture reuse requirements.

[0106] In this embodiment of the invention, when step 206 determines that the target development architecture corresponding to the architecture reuse instruction is not a file architecture, the method further includes:

[0107] Based on the target development architecture, perform architecture parameter pairing operations on the reuse architecture database to obtain the architecture pairing results corresponding to the target development architecture. The reuse architecture database stores several reusable architectures that have completed architecture configuration operations.

[0108] When the architecture matching result indicates that there is a target adaptation architecture in the reuse architecture database that matches the target development architecture, the architecture reuse operation is performed on the target adaptation architecture according to the architecture reuse requirements. The target adaptation architecture is the architecture whose architecture adaptation parameters with the target development architecture are higher than the preset adaptation threshold.

[0109] Furthermore, the method also includes:

[0110] When the architecture matching result indicates that there is no target adaptation architecture matching the target development architecture in the reuse architecture database, a temporary development architecture corresponding to the architecture configuration parameters is generated based on the architecture configuration parameters corresponding to the target development architecture and combined with the preset architecture template. The architecture reuse operation is then performed on the temporary development architecture according to the architecture reuse requirements.

[0111] The system detects subsequent editing commands for the temporary development architecture and performs architecture control operations on the temporary development architecture based on these commands. The subsequent editing commands include deletion commands that delete data from the temporary development architecture or aggregation and storage commands that aggregate and store data from the temporary development architecture. The architecture control operations include data deletion operations or data aggregation and storage operations.

[0112] It is evident that implementation Figure 2 The described online architecture adjustment method based on the general development specifications of microservice frameworks can prioritize the currently generated target structure file when an architecture reuse instruction is detected. If the target development architecture corresponding to the architecture reuse instruction is the file architecture to which the target structure file belongs, the response efficiency of the corresponding architecture reuse instruction is improved. For cases where the target development architecture is not the file architecture, it can also intelligently match architectures with architecture adaptation parameters higher than the adaptation threshold from the reuse architecture database, or generate a corresponding temporary development architecture based on the architecture configuration parameters corresponding to the target development architecture and a preset architecture template, thereby improving the accuracy and reliability of the final determined development architecture. In addition, if a temporary development architecture is generated, it can also automatically delete the temporary development architecture according to subsequent editing instructions, thereby reducing the amount of redundant data in the temporary development architecture, or collect and store the temporary development architecture for easy subsequent use.

[0113] Example 3

[0114] Please see Figure 3 , Figure 3 This is a schematic diagram of an online architecture adjustment device based on a general development specification for a microservice framework, as disclosed in an embodiment of the present invention. The online architecture adjustment device based on the general development specification for a microservice framework can be an online architecture adjustment terminal, an online architecture adjustment device, an online architecture adjustment system, or an online architecture adjustment server. The online architecture adjustment server can be a local server, a remote server, or a cloud server (also known as a cloud server). When the online architecture adjustment server is not a cloud server, it can communicate with the cloud server; this embodiment of the present invention does not impose limitations. Figure 3 As shown, the online architecture adjustment device based on the general development specifications of microservice frameworks may include a determination module 301, an online adjustment module 302, and a generation module 303, wherein:

[0115] The determination module 301 is used to determine the architecture project to be adjusted and the project structure of the architecture project to be adjusted when an online architecture adjustment instruction is detected. Each project structure includes editable parameters that match the project structure.

[0116] It should be noted that the project structure of the architecture to be adjusted includes any one of the following: a preset multi-level project structure, a microservice project structure, and a preset logic language project structure:

[0117] The editable parameters corresponding to the project structure of the architecture project to be adjusted include the structure directory and project files. The structure directory includes at least one structure file at the level where the structure directory is located.

[0118] The code structure information of the architecture project to be adjusted includes at least one of the following: basic information, template information, and configuration item information corresponding to the code structure of the architecture project to be adjusted, and each code structure information includes editable sub-item information that matches the code structure information.

[0119] The determination module 301 is further configured to determine, based on the online architecture adjustment instruction, a first editing requirement for the architecture project to be adjusted and a second editing requirement for the structure corresponding to the architecture project to be adjusted. The first editing requirement includes the editing requirements corresponding to the editable parameters of the architecture project to be adjusted, and the second editing requirement includes the editing requirements corresponding to the code structure information of the architecture project to be adjusted.

[0120] The online adjustment module 302 is used to perform online architecture adjustment operations on the architecture to be adjusted project based on the project structure, first editing requirements, and second editing requirements, combined with the preset architecture development specifications, and obtain the corresponding adjustment results of the architecture to be adjusted.

[0121] The generation module 303 is used to generate a target structure file that matches the preset data structure based on the adjustment results and the target template data that has been configured. The target structure file is used to display to the target user through the online preview and editing module, so as to trigger the target user to perform structure viewing and / or structure editing operations on the target structure file through the online preview and editing module.

[0122] It is evident that implementation is as follows Figure 3 The described online architecture adjustment device based on the general development specifications of a microservice framework can automatically determine the architecture project to be adjusted and its structure based on detected online architecture adjustment commands. It also automatically determines the corresponding first and second editing requirements, improving the efficiency of determining different editing needs. By integrating the project structure, the first and second editing requirements, and pre-defined architecture development specifications, it performs online architecture adjustment operations on the architecture project to be adjusted, improving the accuracy of response to online architecture adjustment commands and the efficiency and accuracy of adjustments. The resulting target structure file is displayed to the user, enhancing the user experience through editing and browsing. This visualization of the architecture to be edited reduces the difficulty of editing and the complexity of calling the development architecture. Furthermore, the visual editing interface reduces the difficulty of verifying the edited architecture, improving its usability.

[0123] In an optional embodiment, the second editing requirements for the structure corresponding to the architecture project to be adjusted are determined in the following way:

[0124] When it is determined that the code structure information of the architecture project to be adjusted includes basic information and / or configuration item information, determine the update data of each sub-item information in the code structure and the number of update items corresponding to the update data;

[0125] Determine whether the number of updated items is equal to the number of information items corresponding to the basic information and / or configuration information. If it is determined that the number of updated items is equal to the number of information items corresponding to the basic information and / or configuration information, the updated data is determined as the second editing requirement.

[0126] When it is determined that the number of updated items is not equal to the number of information items corresponding to the basic information, the items that have not been updated are identified, and the default configuration information and updated data corresponding to the items that have not been updated are identified as the second editing requirement.

[0127] Optionally, the second editing requirements for the structure corresponding to the architecture project to be adjusted are also determined in the following ways:

[0128] When it is determined that the code structure information of the architecture project to be adjusted includes template information, the template update data is determined. The template update data includes the first data updated at the code level for the template information and the second data updated on the upper-level interface of the integrated display.

[0129] Based on the first data and the configuration template matched by the first data, determine the code editing requirements that match the first data;

[0130] The code editing requirement and the second data were identified as the second editing requirement.

[0131] As can be seen, in this optional embodiment, corresponding requirement matching schemes are provided for the two cases of code structure information: when the code structure information includes basic information and / or configuration item information, the default configuration information of the determined updated items and unupdated items can be automatically converted into second editing requirements; when the code structure information includes template information, the first data and the second data are automatically converted into code editing requirements; through these two schemes for determining the second editing requirements, the accuracy and reliability of the final determined second editing requirements are improved.

[0132] In another alternative embodiment, such as Figure 4 As shown, the device also includes a detection module 304, a judgment module 305, and a multiplexing module 306, wherein:

[0133] The detection module 304 is used to detect whether there is an architecture reuse instruction after the generation module 303 generates a target structure file that matches the preset data structure based on the adjustment results and the target template data that has been configured. The architecture reuse instruction is used to perform an architecture reuse operation on a certain development architecture. The architecture reuse instruction includes the architecture reuse requirements corresponding to the architecture reuse instruction.

[0134] The judgment module 305 is used to determine whether the target development architecture corresponding to the architecture reuse instruction is the file architecture to which the target structure file belongs when an architecture reuse instruction is detected.

[0135] The reuse module 306 is used to perform architecture reuse operations on the target structure file and file architecture according to the architecture reuse requirements when the judgment result of the judgment module 305 is yes.

[0136] Optional, such as Figure 4 As shown, the device also includes a pairing module 307, wherein:

[0137] The pairing module 307 is used to perform an architecture parameter pairing operation on the reuse architecture database according to the target development architecture when the judgment module 305 determines that the target development architecture corresponding to the architecture reuse instruction is not a file architecture, so as to obtain the architecture pairing result corresponding to the target development architecture. The reuse architecture database stores several reusable architectures that have completed architecture configuration operations.

[0138] The reuse module 306 is also used to perform architecture reuse operation on the target adaptation architecture according to the architecture reuse requirements when the architecture matching result indicates that there is a target adaptation architecture that matches the target development architecture in the reuse architecture database. The target adaptation architecture is an architecture whose architecture adaptation parameters with the target development architecture are higher than the preset adaptation threshold.

[0139] Optionally, the generation module 303 is also used to generate a temporary development architecture corresponding to the architecture configuration parameters based on the architecture configuration parameters corresponding to the target development architecture and in combination with the preset architecture template when the architecture matching result indicates that there is no target adaptation architecture matching the target development architecture in the reuse architecture database, and to perform architecture reuse operation on the temporary development architecture according to the architecture reuse requirements.

[0140] like Figure 4 As shown, the device also includes architecture control 308, wherein:

[0141] Architecture control 308 is used to detect subsequent editing instructions for a temporary development architecture and perform architecture control operations on the temporary development architecture according to the subsequent editing instructions. The subsequent editing instructions include deletion instructions to perform data deletion operations on the temporary development architecture or collection and storage instructions to perform data collection and storage operations on the temporary development architecture. Architecture control operations include data deletion operations or data collection and storage operations.

[0142] It is evident that implementation is as follows Figure 4 The described online architecture adjustment device based on the general development specifications of microservice frameworks can prioritize the currently generated target structure file when an architecture reuse instruction is detected. If the target development architecture corresponding to the architecture reuse instruction is the file architecture to which the target structure file belongs, the response efficiency of the corresponding architecture reuse instruction is improved. If the target development architecture is not the file architecture, it can also intelligently match architectures with architecture adaptation parameters higher than the adaptation threshold from the reuse architecture database, or generate a corresponding temporary development architecture based on the architecture configuration parameters corresponding to the target development architecture and a preset architecture template, thereby improving the accuracy and reliability of the final determined development architecture. In addition, if a temporary development architecture is generated, it can also automatically delete the temporary development architecture according to subsequent editing instructions, thereby reducing the amount of redundant data in the temporary development architecture, or collect and store the temporary development architecture for easy subsequent use.

[0143] Example 4

[0144] Please see Figure 5 , Figure 5 This is a schematic diagram of another online architecture adjustment device based on the general development specifications of a microservice framework disclosed in this embodiment of the invention. Figure 5 As shown, the online architecture adjustment device based on the general development specifications of microservice frameworks may include:

[0145] Memory 401 storing executable program code;

[0146] Processor 402 coupled to memory 401;

[0147] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the online architecture adjustment method based on the general development specification of the microservice framework described in Embodiment 1 or Embodiment 2 of the present invention.

[0148] Example 5

[0149] This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute the steps in the online architecture adjustment method based on the general development specification of a microservice framework as described in Embodiment 1 or Embodiment 2 of this invention.

[0150] Example 6

[0151] This invention discloses a computer program product, which includes a non-transitory computer storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the online architecture adjustment method based on the general development specification of a microservice framework described in Embodiment 1 or Embodiment 2.

[0152] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0153] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0154] Finally, it should be noted that the online architecture adjustment method and apparatus based on the general development specification of microservice framework disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for online architecture adjustment based on general development specifications for microservice frameworks, characterized in that, The method includes: When an online architecture adjustment instruction is detected, the architecture project to be adjusted and the project structure of the architecture project to be adjusted are determined, and each project structure includes editable parameters that match the project structure; According to the online architecture adjustment instruction, a first editing requirement for the architecture project to be adjusted and a second editing requirement for the structure corresponding to the architecture project to be adjusted are determined. The first editing requirement includes the editing requirements corresponding to the editable parameters of the architecture project to be adjusted, and the second editing requirement includes the editing requirements corresponding to the code structure information of the architecture project to be adjusted. The code structure information of the architecture project to be adjusted includes at least one of the basic information, template information, and configuration item information corresponding to the code structure of the architecture project to be adjusted, and each item of the code structure information includes editable sub-item information matched by the code structure information. Based on the project structure, the first editing requirements, and the second editing requirements, and in conjunction with the preset architecture development specifications, an online architecture adjustment operation is performed on the architecture project to be adjusted to obtain the adjustment result corresponding to the architecture to be adjusted. Based on the adjustment result and the target template data that has been configured, a target structure file matching the preset data structure is generated. The target structure file is used to display to the target user through the online preview and editing module to trigger the target user to perform structure viewing and / or structure editing operations on the target structure file through the online preview and editing module.

2. The online architecture adjustment method based on the general development specifications of microservice frameworks according to claim 1, characterized in that, The engineering structure of the architecture to be adjusted includes any one of the following: a preset multi-level engineering structure, a microservice engineering structure, and a preset logic language engineering structure: The editable parameters corresponding to the project structure of the architecture project to be adjusted include the structure directory and project files. The structure directory includes at least one structure file at the level where the structure directory is located.

3. The online architecture adjustment method based on the general development specifications of microservice frameworks according to claim 2, characterized in that, The second editing requirements for the structure corresponding to the architecture project to be adjusted were determined in the following way: When it is determined that the code structure information of the architecture project to be adjusted includes the basic information and / or the configuration item information, the update data of each sub-item information in the code structure and the number of update items corresponding to the update data are determined. Determine whether the number of updated items is equal to the number of information items corresponding to the basic information and / or the configuration item information. When it is determined that the number of updated items is equal to the number of information items corresponding to the basic information and / or the configuration item information, the updated data is determined as the second editing requirement. When it is determined that the number of updated items is not equal to the number of information items corresponding to the basic information, the unupdated items are identified, and the default configuration information corresponding to the unupdated items and the updated data are identified as the second editing requirement.

4. The online architecture adjustment method based on the general development specifications of microservice frameworks according to claim 3, characterized in that, The method further includes: When it is determined that the code structure information of the architecture project to be adjusted includes the template information, the template update data is determined. The template update data includes first data updated at the code level for the template information and second data updated on the upper interface of the integrated display. Based on the first data and the configuration template matched by the first data, determine the code editing requirements that match the first data; The code editing requirements and the second data are determined as the second editing requirements.

5. The online architecture adjustment method based on the general development specifications of microservice frameworks according to any one of claims 1-4, characterized in that, After generating a target structure file matching the preset data structure based on the adjustment results and the configured target template data, the method further includes: Detect the existence of an architecture reuse instruction, which is used to perform an architecture reuse operation on a certain development architecture, and the architecture reuse instruction includes the architecture reuse requirement corresponding to the architecture reuse instruction; When the architecture reuse instruction is detected, it is determined whether the target development architecture corresponding to the architecture reuse instruction is the file architecture to which the target structure file belongs; When the judgment result is yes, based on the preset architecture reuse module, the target structure file and the file architecture are subjected to architecture reuse operation according to the architecture reuse requirements.

6. The online architecture adjustment method based on the general development specifications of microservice frameworks according to claim 5, characterized in that, When it is determined that the target development architecture corresponding to the architecture reuse instruction is not the file architecture, the method further includes: Based on the target development architecture, an architecture parameter pairing operation is performed on the reuse architecture database to obtain the architecture pairing result corresponding to the target development architecture. The reuse architecture database stores several reusable architectures that have completed architecture configuration operations. When the architecture matching result indicates that there is a target adaptation architecture in the reuse architecture database that matches the target development architecture, an architecture reuse operation is performed on the target adaptation architecture according to the architecture reuse requirements. The target adaptation architecture is an architecture whose architecture adaptation parameters with the target development architecture are higher than a preset adaptation threshold.

7. The online architecture adjustment method based on the general development specifications of microservice frameworks according to claim 6, characterized in that, The method further includes: When the architecture matching result indicates that there is no target adaptation architecture matching the target development architecture in the reuse architecture database, a temporary development architecture corresponding to the architecture configuration parameters is generated according to the architecture configuration parameters corresponding to the target development architecture and combined with the preset architecture template, and an architecture reuse operation is performed on the temporary development architecture according to the architecture reuse requirements. The system detects subsequent editing instructions for the temporary development architecture and performs architecture control operations on the temporary development architecture according to the subsequent editing instructions. The subsequent editing instructions include deletion instructions that perform data deletion operations on the temporary development architecture or aggregation and storage instructions that perform data aggregation and storage operations on the temporary development architecture. The architecture control operations include the data deletion operation or the data aggregation and storage operation.

8. An online architecture adjustment device based on a general development specification for microservice frameworks, characterized in that, The device includes: The determination module is used to determine the architecture project to be adjusted and the project structure of the architecture project to be adjusted when an online architecture adjustment instruction is detected, wherein each project structure includes editable parameters that match the project structure; The determining module is further configured to determine, according to the online architecture adjustment instruction, a first editing requirement for the architecture project to be adjusted and a second editing requirement for the structure corresponding to the architecture project to be adjusted. The first editing requirement includes the editing requirements corresponding to the editable parameters of the architecture project to be adjusted, and the second editing requirement includes the editing requirements corresponding to the code structure information of the architecture project to be adjusted. The code structure information of the architecture project to be adjusted includes at least one of the basic information, template information, and configuration item information corresponding to the code structure of the architecture project to be adjusted, and each item of the code structure information includes editable sub-item information matched by the code structure information. The online adjustment module is used to perform online architecture adjustment operations on the architecture project to be adjusted based on the project structure, the first editing requirements, and the second editing requirements, combined with the preset architecture development specifications, to obtain the adjustment result corresponding to the architecture to be adjusted. The generation module is used to generate a target structure file that matches the preset data structure based on the adjustment results and the target template data that has been configured. The target structure file is used to display to the target user through the online preview and editing module, so as to trigger the target user to perform structure viewing and / or structure editing operations on the target structure file through the online preview and editing module.

9. An online architecture adjustment device based on a general development specification for microservice frameworks, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the online architecture adjustment method based on the general development specifications of microservice frameworks as described in any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the online architecture adjustment method based on the general development specifications of a microservice framework as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Micro-service generation method and device, terminal equipment and storage medium

    CN111767095A

  • Micro-service module deployment method and device, storage medium and electronic equipment

    CN114047944A