Application architecture generation method and device, electronic equipment and storage medium
Through the combination of vectorization and graph generation models, the standardized application architecture is automatically generated, which solves the problem of lack of standardization and modeling of the architecture design transformation logic in the existing technology, and improves the rationality and accuracy of the application architecture.
Patent Information
- Application Number
- CN202510143651.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-30
AI Technical Summary
In existing software engineering, the transformation logic between architectural designs lacks standardization and modeling, which makes it difficult to guarantee the rationality and accuracy of the application architecture.
By vectorizing the business architecture, functional architecture and application architecture templates, the target content is extracted to generate the initial application architecture, and input the initial application architecture and application architecture template vector table into the architecture graph generation model, generate the architecture diagram and embed it into the initial application architecture, and generate a standardized application architecture.
There is no need for manual conversion, which avoids the influence of the architect's personal experience and understanding ability, improves the rationality and accuracy of the application architecture, and realizes standardized and modeled architectural transformation.
Smart Images

Figure CN120066490A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular, to a method, device, electronic device, and storage medium for generating an application architecture. Background Art
[0002] In the software development process, the design phase includes multiple architecture designs, and there are certain dependency relationships and transformation logics between the architecture designs. The accuracy of the transformation logic determines the final quality of the software.
[0003] The architecture of software is a definition from a multi-dimensional perspective. For example, the business architecture is the form of software seen from the perspective of business experts, the functional architecture is the form of software seen from the perspective of system analysts, and the application architecture is the form of software seen from the perspective of application architects. In current software engineering, for the transformation logic between architectures, most rely on the personal experience and understanding ability of architects, and no standardized and modeled architecture transformation rules have been formed, resulting in risks in the transformation when the business architecture and functional architecture are transformed into the application architecture, and causing deviations in the rationality and accuracy of the application architecture. Summary of the Invention
[0004] The present invention provides a method, device, electronic device, and storage medium for generating an application architecture, which can generate a standardized application architecture without manually converting the functional architecture and business architecture into the application architecture, and improve the rationality and accuracy of the application architecture.
[0005] In a first aspect, the present invention provides a method for generating an application architecture, including:
[0006] Responding to an architecture conversion operation, obtaining a business architecture, a functional architecture, and an application architecture template;
[0007] Respectively vectorizing the business architecture, the functional architecture, and the application architecture template to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table;
[0008] Extracting target content from the business architecture and the functional architecture based on the business architecture vector table, the functional architecture vector table, and the application architecture template vector table to generate an initial application architecture;
[0009] Inputting the initial application architecture and the application architecture template vector table into an architecture graph generation model to obtain an architecture graph;
[0010] Embedding the architecture graph into the initial application architecture to obtain a target application architecture.
[0011] Optionally, the respectively vectorizing the business architecture, the functional architecture, and the application architecture template to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table includes:
[0012] Vectorize the text of each chapter in the business architecture, functional architecture, and application architecture templates respectively to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table.
[0013] Optionally, the application architecture template vector table includes an application list vector table and a service list vector table. Generating an initial application architecture by extracting target content from the business architecture and functional architecture based on the business architecture vector table, functional architecture vector table, and application architecture template vector table includes:
[0014] Determine target business architecture content from the business architecture according to the business architecture vector table and the application list vector table;
[0015] Determine target functional architecture content from the functional architecture according to the functional architecture vector table and the service list vector table;
[0016] Construct a standard application architecture including an application list chapter and a service list chapter;
[0017] Copy the target business architecture content to the application list chapter, and copy the target functional architecture content to the service list chapter to obtain an initial application architecture.
[0018] Optionally, determining target business architecture content from the business architecture according to the business architecture vector table and the application list vector table includes:
[0019] Input the business architecture vector table and the application list vector table into a pre-trained vector matching model;
[0020] Match the application list vector table with the application list vector table in the vector matching model to obtain target business architecture vectors that match each vector in the application list vector table;
[0021] Obtain the text content of the target business architecture vectors from the business architecture as the initial business architecture content;
[0022] Preprocess the initial business architecture content to obtain target business architecture content.
[0023] Optionally, determining target functional architecture content from the functional architecture according to the functional architecture vector table and the service list vector table includes:
[0024] Input the business architecture vector table and the service list vector table into a pre-trained vector matching model;
[0025] Match the service list vector table and the functional architecture vector table in the vector matching model to obtain target functional architecture vectors that match each vector in the service list vector table;
[0026] Obtain the text content of the target functional architecture vector from the functional architecture as the initial functional architecture content;
[0027] Preprocess the initial functional architecture content to obtain the target functional architecture content.
[0028] Optionally, the application architecture template vector table includes a graphic vector table. Inputting the initial application architecture and the application architecture template vector table into an architecture graph generation model to obtain an architecture graph includes:
[0029] Input each graphic vector in the graphic vector table and the content vector table of the content in the initial application architecture into the vector matching model;
[0030] Match the graphic vector table and the content vector table in the vector matching model to obtain at least one target content vector that matches each image vector in the graphic vector table;
[0031] Extract the target text of the target content vector from the initial application architecture;
[0032] Input the target text and the graphic corresponding to the graphic vector into the architecture graph generation model to obtain an architecture graph.
[0033] Optionally, the vector matching model is trained through the following steps:
[0034] Obtain a training data set. Each piece of training data in the training data set includes a business architecture sample vector table, a functional architecture sample vector table, and an application architecture sample vector table. Each vector in the application architecture sample vector table is labeled with a first correlation degree with each vector in the business architecture sample vector table and the functional architecture sample vector table;
[0035] Construct a vector matching model and initialize the model parameters of the vector matching model;
[0036] Input the business architecture sample vector table, the functional architecture sample vector table, and the application architecture sample vector table into the vector matching model to obtain a second correlation degree between each vector in the application architecture sample vector table and each vector in the business architecture sample vector table and the functional architecture sample vector table;
[0037] Calculate a loss value using the first correlation degree and the second correlation degree;
[0038] Determine whether the stop training condition is satisfied;
[0039] If so, determine that the vector matching model has completed training;
[0040] If not, adjust the parameters of the vector matching model according to the loss value, and return to the step of inputting the business architecture sample vector table, the functional architecture sample vector table, and the application architecture sample vector table into the vector matching model.
[0041] In a second aspect, the present invention provides an application architecture generation device, including:
[0042] An architecture conversion operation response module, configured to respond to an architecture conversion operation and obtain a business architecture, a functional architecture, and an application architecture template;
[0043] A vectorization module, configured to vectorize the business architecture, the functional architecture, and the application architecture template respectively to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table;
[0044] An initial application architecture generation module, configured to generate an initial application architecture by extracting target content from the business architecture and the functional architecture based on the business architecture vector table, the functional architecture vector table, and the application architecture template vector table;
[0045] An architecture diagram generation module, configured to input the initial application architecture and the application architecture template vector table into an architecture graph generation model to obtain an architecture diagram;
[0046] A target application architecture generation module, configured to embed the architecture diagram into the initial application architecture to obtain a target application architecture.
[0047] In a third aspect, the present invention provides an electronic device, where the electronic device includes:
[0048] At least one processor; and
[0049] A memory communicatively connected to the at least one processor; wherein,
[0050] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the application architecture generation method described in the first aspect of the present invention.
[0051] In a fourth aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the application architecture generation method described in the first aspect of the present invention is implemented.
[0052] Embodiments of the present invention can respond to an architecture conversion operation, vectorize the business architecture, functional architecture, and application architecture templates uploaded by a user to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table, and extract target content from the business architecture and functional architecture based on the business architecture vector table, functional architecture vector table, and application architecture template vector table to generate an initial application architecture. Input the initial application architecture and the application architecture template vector table into an architecture graph generation model to obtain an architecture graph, and embed the architecture graph into the initial application architecture to obtain a target application architecture. There is no need for manual conversion of the business architecture and functional architecture, avoiding the influence of the personal experience and understanding ability of architects. Moreover, based on the application architecture template and after vectorization, an architecture graph is generated through a model and embedded into the initial application architecture to obtain a target application architecture, which can standardize and model the conversion of the business architecture and functional architecture, improving the rationality and accuracy of the generated application architecture.
[0053] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0055] Figure 1 is a flowchart of an application architecture generation method provided by an embodiment of the present invention;
[0056] Figure 2 is a schematic diagram of a human-computer interaction interface according to an embodiment of the present invention;
[0057] Figure 3 is a schematic diagram of the vectorization of the business architecture, functional architecture, and application architecture template according to an embodiment of the present invention;
[0058] Figure 4 is a schematic diagram of generating an architecture graph according to an embodiment of the present invention;
[0059] Figure 5 is an overall flowchart of generating an application architecture according to an embodiment of the present invention;
[0060] Figure 6 is a flowchart of the processing logics of M1 and M2 according to an embodiment of the present invention;
[0061] Figure 7It is a schematic structural diagram of an application architecture generation device provided by an embodiment of the present invention;
[0062] Figure 8 It is a schematic structural diagram of an electronic device provided by Embodiment 4 of the present invention. Detailed implementation manners
[0063] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0064] Figure 1 It is a flowchart of an application architecture generation method provided by an embodiment of the present invention. This embodiment is applicable to the situation of converting a business architecture and a functional architecture into an application architecture. This method can be executed by an application architecture generation device, and the application architecture generation device can be implemented in the form of hardware and / or software and can be configured in an electronic device. As Figure 1 shown, the application architecture generation method includes:
[0065] S101. Respond to an architecture conversion operation, and obtain a business architecture, a functional architecture, and an application architecture template.
[0066] In this embodiment, the business architecture may be a file used to describe the hierarchical structure of a business and the relationships and interactions between different levels during the software switch design process. The functional architecture may be a file used to describe each functional module in the software, the relationships and interaction behaviors between the functional modules. The application architecture template is a file that describes the applications, services, and their interaction relationships of the software. Among them, the business architecture, the functional architecture, and the application architecture template may be electronic documents in various formats, such as text documents, slide documents, etc.
[0067] The architecture generation operation may be an operation performed by a user on a preset control on a human-machine interaction interface. As Figure 2 shown is a schematic diagram of the human-machine interaction interface. On this human-machine interaction interface, the user can upload a software design specification including a business architecture and a functional architecture and an application architecture template by uploading files. Of course, the user can also enter the business architecture, the functional architecture, and the application architecture template by copying and pasting in the human-machine interaction interface. When the user clicks the conversion control on the human-machine interaction interface, the background (such as a server) receives the architecture conversion operation, indicating that the user needs to convert the uploaded business architecture and functional architecture into an application architecture with reference to the application architecture template. The background can receive the business architecture, the functional architecture, and the application architecture template uploaded by the user.
[0068] S102. Vectorize the business architecture, functional architecture, and application architecture templates respectively to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table.
[0069] As Figure 2 shown, the business architecture, functional architecture, and application architecture templates usually organize text by chapter to describe the business architecture, functional architecture, application architecture templates, etc. The text content of each chapter in the business architecture, functional architecture, and application architecture templates can be vectorized respectively, and the vectors of each chapter after vectorization can be stored in the form of a table to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table. Among them, each vector in the business architecture vector table, functional architecture vector table, and application architecture template vector table can also establish a vector index for convenient vector search.
[0070] In one embodiment, a bag-of-words model, One Hot encoding, Word2vec, BERT, etc. can be used to vectorize the text of the business architecture, functional architecture, and application architecture templates to obtain vectors.
[0071] As Figure 3 shown, after vectorizing the business architecture and functional architecture, a business architecture vector table and a functional architecture vector table can be obtained. Each vector in the business architecture vector table and the functional architecture vector table is set with a vector index. In addition to text, the application architecture template includes graphics. After encoding the text and graphics in the application architecture template, an application list vector table, a service list vector table, and a graphics vector table can be obtained. Among them, the vectors in the application list vector table are used to describe the titles of each application in the application list chapter of the application architecture template, the vectors in the service list vector table are used to describe the titles of each service in the service list chapter of the application architecture template, and the graphics vector table is used to describe the image elements of the applications and services in the application architecture template.
[0072] S103. Extract target content from the business architecture and functional architecture based on the business architecture vector table, functional architecture vector table, and application architecture template vector table to generate an initial application architecture.
[0073] In this embodiment, a vector matching model can be pre-trained. After the vector matching model matches vectors with high relevance to the vectors in the application architecture template vector table from the business architecture vector table and the functional architecture vector table, the target content of the vectors with high relevance is extracted from the business architecture and functional architecture to generate an initial application architecture. Specifically, the vector matching model can be trained through the following steps:
[0074] S1. Obtain a training data set.
[0075] In this embodiment, various real business architectures, functional architectures, and application architectures in the software development process can be used as samples. After vectorizing the real business architecture, functional architecture, and application architecture, a business architecture sample vector table, a functional architecture sample vector table, and an application architecture sample vector table are obtained. That is, one piece of training data includes a business architecture sample vector table, a functional architecture sample vector table, and an application architecture sample vector table. Each vector in the application architecture sample vector table is marked with a first correlation degree with each vector in the business architecture sample vector table and the functional architecture sample vector table. For example, the application architecture sample vector table includes an application list sample vector table, a service list sample vector table, and a graphic sample vector table. The first correlation degree between the vectors in the application list sample vector table and the vectors in the business architecture sample vector table can be marked. This first correlation degree represents the correlation degree between the applications in the application chapter of the real application architecture and the text of each chapter in the real business architecture. Similarly, the first correlation degree between the vectors in the service list sample vector table and the vectors in the functional architecture sample vector table is marked, and the first correlation degree between each vector in the graphic vector table and each vector in the application list sample vector table and the service list sample vector table is marked.
[0076] S2. Construct a vector matching model and initialize the model parameters of the vector matching model.
[0077] In this embodiment, the vector matching model can adopt RNN (Recurrent Neural Networks). After constructing the RNN as the vector matching model, the model parameters of the vector matching model are initialized, such as initializing the network parameters of the RNN.
[0078] S3. Input the business architecture sample vector table, the functional architecture sample vector table, and the application architecture sample vector table into the vector matching model to obtain the second correlation degree between each vector in the application architecture sample vector table and each vector in the business architecture sample vector table and the functional architecture sample vector table.
[0079] After inputting the business architecture sample vector table, the functional architecture sample vector table, and the application architecture sample vector table into the vector matching model, the vector matching model matches the business architecture sample vector table, the functional architecture sample vector table, and the application architecture sample vector table to obtain a matching result, which can be represented by the second correlation degree.
[0080] S4. Calculate the loss value using the first correlation degree and the second correlation degree.
[0081] In one embodiment, the mean square error loss value and the cross-entropy loss value can be calculated using the first correlation degree and the second correlation degree of each dimension vector as the loss value of the vector matching model.
[0082] S5. Determine whether the stop training condition is satisfied. If yes, execute S6; if not, execute S7.
[0083] In one embodiment, the stop training condition may be that the loss value is less than a preset value, or the number of iterative trainings reaches a preset number.
[0084] S6. Determine that the vector matching model has completed training.
[0085] If the stop training condition is satisfied, determine that the accuracy of the vector matching model is high enough and the training of the vector matching model can be stopped.
[0086] S7. Adjust the parameters of the vector matching model according to the loss value and return to S3.
[0087] If the stop training condition is not satisfied, determine that the accuracy of the vector matching model is still insufficient after this iterative training. The model parameters can be adjusted according to the loss value. Exemplarily, the gradient descent of the model parameters can be performed through the stochastic gradient descent algorithm, batch gradient descent algorithm, mini-batch gradient descent algorithm, etc., to obtain the vector matching model with adjusted model parameters, and return to S3 to continue training the vector matching model, so that the vector matching model learns to match vectors with high relevance to the vectors in the application architecture sample vector table from the business architecture sample vector table and the functional architecture sample vector table.
[0088] In this embodiment, the application architecture template vector table may include an application list vector table and a service list vector table. The initial application architecture may be an application architecture described in text in a format that conforms to the application architecture template. In one embodiment, S103 may include the following steps:
[0089] S1031. Determine the target business architecture content from the business architecture according to the business architecture vector table and the application list vector table.
[0090] As Figure 3 shown, after the application architecture template is vectorized, an application list vector table is obtained. The application list vector table may be the vector of the title or other summary information of each application in the application list chapter of the application architecture template. The business architecture vector table and the application list vector table can be input into a pre-trained vector matching model, and in the vector matching model, the application list vector table is matched with the application list vector table to obtain the target business architecture vectors matching each vector in the application list vector table. The text content of the target business architecture vectors is obtained from the business architecture as the initial business architecture content, and the initial business architecture content is further preprocessed to obtain the target business architecture content.
[0091] Specifically, in the vector matching model, the input application list vector table can be obtained. By querying the vectors in the application list vector table in the business architecture vector table, the target business architecture vectors with high relevance to the vectors in the application list vector table can be obtained. For example, those highly relevant to the application list are "business processes" or "business domains". The text content under "business processes" or "business domains" in the business architecture can be determined as the initial business architecture content, and the initial business architecture content is subject to duplicate removal and simplification to obtain the target business architecture content.
[0092] S1032. Determine the target functional architecture content from the functional architecture according to the functional architecture vector table and the service list vector table.
[0093] Such as Figure 3 As shown, after the application architecture template is vectorized, the service list vector table is obtained. The service list vector table can be the vectors of the titles or other summary information of each service in the service list section of the application architecture template. The functional architecture vector table and the service list vector table can be input into a pre-trained vector matching model. In the vector matching model, the service list vector table is matched with the application list vector table to obtain the target functional architecture vectors that match each vector in the service list vector table. The text content of the target functional architecture vectors is obtained from the functional architecture as the initial functional architecture content, and the initial functional architecture content is further pre-processed to obtain the target functional architecture content.
[0094] Specifically, in the vector matching model, the input service list vector table can be obtained. By querying the vectors in the service list vector table in the functional architecture vector table, the target functional architecture vectors with high relevance to the vectors in the service list vector table can be obtained. For example, those highly relevant to the service list are the "UI interface" (related to front-end services) or "program interfaces" (related to back-end services). The text content under "business processes" or "business domains" in the business architecture can be determined as the initial functional architecture content, and the initial functional architecture content is subject to duplicate removal and simplification to obtain the target functional architecture content.
[0095] S1033. Construct a standard application architecture including an application list section and a service list section.
[0096] Specifically, a document with the same format as the application architecture template can be created as the standard application architecture. As Figure 2 shown in the converted application architecture, the standard application architecture includes an application list section and a service list section. The application list section can include multiple application titles, and the service list section includes multiple service titles.
[0097] S1034. Copy the target business architecture content to the application list section and copy the target functional architecture content to the service list section to obtain the initial application architecture.
[0098] Specifically, after extracting the target business architecture content of each application under the application list section from the business architecture, the target business architecture content can be copied to the corresponding application in the standard application architecture. Similarly, after extracting the target functional architecture content of each service under the service list section from the functional architecture, the target functional architecture content can be copied to the corresponding service in the standard application architecture to obtain a standardized initial application architecture described in text.
[0099] S104. Input the initial application architecture and the application architecture template vector table into the architecture graph generation model to obtain the architecture graph.
[0100] The application architecture template vector table in this embodiment further includes a graphic vector table, which is the vector obtained after vectorizing the graphic elements in the application architecture template. Each graphic vector in the graphic vector table and the content vector table of the content in the initial application architecture can be input into the vector matching model. In the vector matching model, the graphic vector table and the content vector table are matched to obtain at least one target content vector that matches each image vector in the graphic vector table. The target text of the target content vector is extracted from the initial application architecture, and the target text and the graphic corresponding to the graphic vector are input into the architecture graph generation model to obtain the architecture graph, where the architecture graph generation model can be a GAN (Generative Adversarial Network).
[0101] Figure 4 The following shows a schematic diagram of generating the architecture graph. In Figure 4 the body description text under "application list" in the initial application architecture includes "suggest" and "feedback", and thus graphic elements with high relevance are found, such as Figure 4 shown in a of Figure 4 The two generated architecture graphs are shown in b of
[0102] S105. Embed the architecture graph into the initial application architecture to obtain the target application architecture.
[0103] Specifically, the architecture graph can be inserted below the target text content in the initial application architecture so that the target application architecture includes both the body text and the architecture graph.
[0104] To enable those skilled in the art to more clearly understand the application architecture generation method of the embodiments of the present invention, the following combines Figure 5 to illustrate the application architecture generation process of the embodiments of the present invention. As Figure 5 shown, it specifically includes the following steps:
[0105] S1. The user uploads a software design specification, which includes a business architecture and a functional architecture;
[0106] S2. The user uploads a software design specification template, which includes an application architecture template;
[0107] S3. Vectorize the business architecture, functional architecture, and application architecture template according to the processing logic P1, and establish a vector table and a vector index.
[0108] Specifically, the processing logic P1 is as Figure 3 Vectorize the business architecture, functional architecture, and application architecture template.
[0109] S4. According to the processing logic M1, retrieve the content corresponding to the business architecture and functional architecture and generate the text content of the main body of the initial application architecture.
[0110] Specifically, as Figure 6 shown in the M1 processing logic, in the "application list" of the processed application architecture template vector table, query the vector table to obtain the corresponding content vector v(n). Through the content vector v(n), query the vector table of the business architecture to obtain the content with a relatively high correlation with the "business process" or "business domain", and copy the content after duplicate removal and simplification to the "application list" chapter of the initial application architecture; Figure 3 In the "service list" of the processed application architecture template vector table, query the vector table to obtain the corresponding content vector v(n). Through the content vector v(n), query the vector table of the functional architecture. The "UI interface" is related to the front-end service, and the "program interface" is related to the back-end service. Obtain the relevant content in the functional architecture, remove duplicates and simplify it, and then copy it to the "service list" chapter of the initial application architecture.
[0111] In Figure 3 In the "service list" of the processed application architecture template vector table, query the vector table to obtain the corresponding content vector v(n). Through the content vector v(n), query the vector table of the functional architecture. The "UI interface" is related to the front-end service, and the "program interface" is related to the back-end service. Obtain the relevant content in the functional architecture, remove duplicates and simplify it, and then copy it to the "service list" chapter of the initial application architecture.
[0112] S5. After the above S1 - S4, an initial application architecture that conforms to the application architecture template format and contains text content is obtained, that is, the standard application architecture.
[0113] Specifically, a new document that conforms to the application architecture template format can be constructed, and the text content is written into the application chapter and service chapter of the new document to obtain the initial application architecture.
[0114] S6. According to the processing logic M2, retrieve the text content in the initial application architecture, generate the graphic elements of the graphic vector table in the application architecture template, and insert them under the relevant text of the initial application architecture.
[0115] Specifically, as Figure 6The following is a schematic diagram of the processing logic M2. First, obtain the graphic element g1 of the application architecture template (such as Figure 4 a) in it, query the graphic vector table to obtain the corresponding vector v1 (the graphic element representing the application vector), and query the text vector c2 in the initial application architecture according to the vector v1 (the "Suggest" and "Feedback" in the application list section, and the text comes from the business architecture and the functional architecture. After the business architecture and the functional architecture are vectorized, the text already has the corresponding vector), obtain the text content with high relevance ("Suggest" and "Feedback"), input the text content c2 with high relevance and the graphic element g1 into the architecture diagram generation model (GAN) to obtain the graphic element combination gc1, and insert the graphic element combination gc1 below the corresponding text content in the initial application architecture.
[0116] S7. Output the target application architecture including the standard architecture diagram.
[0117] The embodiment of the present invention can respond to the architecture conversion operation, vectorize the business architecture, the functional architecture, and the application architecture template uploaded by the user to obtain the business architecture vector table, the functional architecture vector table, and the application architecture template vector table, and extract the target content from the business architecture and the functional architecture based on the business architecture vector table, the functional architecture vector table, and the application architecture template vector table to generate the initial application architecture. Input the initial application architecture and the application architecture template vector table into the architecture graphic generation model to obtain the architecture diagram, and embed the architecture diagram into the initial application architecture to obtain the target application architecture. There is no need for manual conversion of the business architecture and the functional architecture, avoiding the influence of the personal experience and understanding ability of the architect. And based on the application architecture template and after vectorization, the architecture diagram is generated by the model and embedded into the initial application architecture to obtain the target application architecture, which can standardize and model the conversion of the business architecture and the functional architecture, and improve the rationality and accuracy of the generated application architecture.
[0118] Figure 7 The following is a schematic diagram of the structure of an application architecture generation device provided by an embodiment of the present invention. As Figure 7 shown, the application architecture generation device includes:
[0119] An architecture conversion operation response module 701, configured to respond to the architecture conversion operation and obtain the business architecture, the functional architecture, and the application architecture template;
[0120] A vectorization module 702, configured to vectorize the business architecture, the functional architecture, and the application architecture template respectively to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table;
[0121] An initial application architecture generation module 703, configured to extract target content from the business architecture and the functional architecture based on the business architecture vector table, the functional architecture vector table, and the application architecture template vector table, and generate an initial application architecture;
[0122] An architecture diagram generation module 704, configured to input the initial application architecture and the application architecture template vector table into an architecture diagram generation model to obtain an architecture diagram;
[0123] A target application architecture generation module 705, configured to embed the architecture diagram into the initial application architecture to obtain a target application architecture.
[0124] Optionally, the vectorization module 702 includes:
[0125] A vector conversion unit, configured to vectorize the text of each chapter in the business architecture, the functional architecture, and the application architecture template respectively, to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table.
[0126] Optionally, the application architecture template vector table includes an application list vector table and a service list vector table, and the initial application architecture generation module 703 includes:
[0127] A target business content determination unit, configured to determine target business architecture content from the business architecture according to the business architecture vector table and the application list vector table;
[0128] A target functional content determination unit, configured to determine target functional architecture content from the functional architecture according to the functional architecture vector table and the service list vector table;
[0129] A standard application architecture construction unit, configured to construct a standard application architecture including an application list chapter and a service list chapter;
[0130] An initial application architecture generation unit, configured to copy the target business architecture content to the application list chapter, and copy the target functional architecture content to the service list chapter, to obtain an initial application architecture.
[0131] Optionally, the target business content determination unit includes:
[0132] A first vector input subunit, configured to input the business architecture vector table and the application list vector table into a pre-trained vector matching model;
[0133] A first vector matching subunit, configured to match the application list vector table with the application list vector table in the vector matching model, to obtain target business architecture vectors matching each vector in the application list vector table;
[0134] An initial service content determination subunit, configured to obtain the text content of the target service architecture vector from the service architecture as the initial service architecture content;
[0135] An initial service content preprocessing subunit, configured to preprocess the initial service architecture content to obtain the target service architecture content.
[0136] Optionally, the target function content determination unit includes:
[0137] A second vector input subunit, configured to input the service architecture vector table and the service list vector table into a pre-trained vector matching model;
[0138] A second vector matching subunit, configured to match the service list vector table with the function architecture vector table in the vector matching model to obtain a target function architecture vector that matches each vector in the service list vector table;
[0139] An initial function content determination subunit, configured to obtain the text content of the target function architecture vector from the function architecture as the initial function architecture content;
[0140] An initial function content preprocessing subunit, configured to preprocess the initial function architecture content to obtain the target function architecture content.
[0141] Optionally, the application architecture template vector table includes a graphic vector table, and the architecture diagram generation module 704 includes:
[0142] A graphic vector table input unit, configured to input each graphic vector in the graphic vector table and the content vector table of the content in the initial application architecture into the vector matching model;
[0143] A graphic vector matching unit, configured to match the graphic vector table with the content vector table in the vector matching model to obtain at least one target content vector that matches each image vector in the graphic vector table;
[0144] A target file determination unit, configured to extract the target text of the target content vector in the initial application architecture;
[0145] An architecture diagram generation unit, configured to input the target text and the graphic corresponding to the graphic vector into an architecture diagram generation model to obtain an architecture diagram.
[0146] Optionally, the vector matching model is trained by the following modules:
[0147] A training data acquisition module for acquiring a training data set, where each piece of training data in the training data set includes a business architecture sample vector table, a functional architecture sample vector table, and an application architecture sample vector table, and each vector in the application architecture sample vector table is labeled with a first correlation degree with each vector in the business architecture sample vector table and the functional architecture sample vector table;
[0148] A model construction module for constructing a vector matching model and initializing the model parameters of the vector matching model;
[0149] A training module for inputting the business architecture sample vector table, the functional architecture sample vector table, and the application architecture sample vector table into the vector matching model to obtain a second correlation degree between each vector in the application architecture sample vector table and each vector in the business architecture sample vector table and the functional architecture sample vector table;
[0150] A loss value calculation module for calculating a loss value using the first correlation degree and the second correlation degree;
[0151] A training condition judgment module for judging whether a stop training condition is satisfied; if so, execute a completed training determination module, if not, execute a model parameter adjustment module;
[0152] A completed training determination module for determining that the vector matching model has completed training;
[0153] A model parameter adjustment module for adjusting the parameters of the vector matching model according to the loss value and returning to the training module.
[0154] The application architecture generation device provided by the embodiments of the present invention can execute the application architecture generation method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0155] Figure 8 FIG. shows a schematic structural diagram of an electronic device 80 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, 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 (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0156] As Figure 8As shown, the electronic device 80 includes at least one processor 81 and a memory communicatively connected to the at least one processor 81, such as a read-only memory (ROM) 82, a random access memory (RAM) 83, etc. The memory stores computer programs executable by the at least one processor. The processor 81 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 82 or the computer programs loaded from the storage unit 88 into the random access memory (RAM) 83. In the RAM 83, various programs and data required for the operation of the electronic device 80 can also be stored. The processor 81, the ROM 82, and the RAM 83 are connected to each other via a bus 84. An input / output (I / O) interface 85 is also connected to the bus 84.
[0157] Multiple components in the electronic device 80 are connected to the I / O interface 85, including: an input unit 86, such as a keyboard, a mouse, etc.; an output unit 87, such as various types of displays, speakers, etc.; a storage unit 88, such as a magnetic disk, an optical disc, etc.; and a communication unit 89, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 89 allows the electronic device 80 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0158] The processor 81 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 81 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 81 executes the various methods and processes described above, such as the application architecture generation method.
[0159] In some embodiments, the application architecture generation method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 88. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 80 via the ROM 82 and / or the communication unit 89. When the computer program is loaded into the RAM 83 and executed by the processor 81, one or more steps of the application architecture generation method described above can be executed. Alternatively, in other embodiments, the processor 81 can be configured to execute the application architecture generation method by any other appropriate means (e.g., by means of firmware).
[0160] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or a general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0161] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0162] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0163] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 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 a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds 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).
[0164] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0165] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0166] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0167] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for generating an application architecture, characterized in that: include: Respond to architecture conversion operations and obtain business architecture, functional architecture, and application architecture templates; Vectorizing the business architecture, functional architecture, and application architecture template respectively to obtain a business architecture vector table, a functional architecture vector table, and an application architecture template vector table; Extract target content from the business architecture and the functional architecture based on the business architecture vector table, the functional architecture vector table and the application architecture template vector table to generate an initial application architecture; Inputting the initial application architecture and the application architecture template vector table into an architecture graph generation model to obtain an architecture graph; The architecture diagram is embedded in the initial application architecture to obtain a target application architecture.
2. The method according to claim 1, characterized in that The business architecture, functional architecture and application architecture template are respectively vectorized to obtain a business architecture vector table, a functional architecture vector table and an application architecture template vector table, including: The text of each chapter in the business architecture, functional architecture and application architecture template is vectorized respectively to obtain a business architecture vector table, a functional architecture vector table and an application architecture template vector table.
3. The method according to claim 1, characterized in that The application architecture template vector table includes an application list vector table and a service list vector table, and extracts target content from the business architecture and the functional architecture based on the business architecture vector table, the functional architecture vector table and the application architecture template vector table to generate an initial application architecture, including: Determining target business architecture content from the business architecture according to the business architecture vector table and the application list vector table; Determining target functional architecture content from the functional architecture according to the functional architecture vector table and the service list vector table; Build a standard application architecture including application manifest section and service manifest section; The target business architecture content is copied to the application list section, and the target functional architecture content is copied to the service list section to obtain an initial application architecture.
4. The method according to claim 3, characterized in that Determining target business architecture content from the business architecture according to the business architecture vector table and the application list vector table includes: Inputting the business architecture vector table and the application inventory vector table into a pre-trained vector matching model; matching the application list vector table with the application list vector table in the vector matching model to obtain a target business architecture vector that matches each vector in the application list vector table; Acquire text content of the target business architecture vector from the business architecture as initial business architecture content; The initial business architecture content is preprocessed to obtain the target business architecture content.
5. The method according to claim 3, characterized in that: Determining target functional architecture content from the functional architecture according to the functional architecture vector table and the service list vector table includes: Inputting the business architecture vector table and the service list vector table into a pre-trained vector matching model; Matching the service list vector table with the functional architecture vector table in the vector matching model to obtain a target functional architecture vector that matches each vector in the service list vector table; Acquire the text content of the target functional architecture vector from the functional architecture as the initial functional architecture content; The initial functional architecture content is preprocessed to obtain the target functional architecture content.
6. The method according to claim 1, characterized in that The application architecture template vector table includes a graphic vector table, and the initial application architecture and the application architecture template vector table are input into an architecture graphic generation model to obtain an architecture graph, including: Inputting each graphic vector in the graphic vector table and a content vector table of content in the initial application architecture into a vector matching model; Matching the graphic vector table with the content vector table in the vector matching model to obtain at least one target content vector that matches each image vector in the graphic vector table; extracting a target text of the target content vector in the initial application framework; The target text and the graphics corresponding to the graphic vector are input into an architecture diagram generation model to obtain an architecture diagram.
7. The method according to claim 4, 5 or 6, characterized in that: The vector matching model is trained by the following steps: Obtain a training data set, wherein each piece of training data in the training data set includes a business architecture sample vector table, a functional architecture sample vector table, and an application architecture sample vector table, and each vector in the application architecture sample vector table is annotated with a first correlation with each vector in the business architecture sample vector table and the functional architecture sample vector table; Constructing a vector matching model and initializing model parameters of the vector matching model; Input the business architecture sample vector table, the functional architecture sample vector table and the application architecture sample vector table into the vector matching model to obtain a second correlation between each vector in the application architecture sample vector table and each vector in the business architecture sample vector table and the functional architecture sample vector table; Calculating a loss value using the first correlation and the second correlation; Determine whether the training stop condition is met; If so, determining that the vector matching model has completed training; If not, adjust the parameters of the vector matching model according to the loss value, and return to the step of inputting the business architecture sample vector table, the functional architecture sample vector table and the application architecture sample vector table into the vector matching model.
8. An application architecture generation device, characterized in that: include: The architecture conversion operation response module is used to respond to the architecture conversion operation and obtain the business architecture, functional architecture and application architecture templates; A vectorization module, used to vectorize the business architecture, functional architecture and application architecture template respectively to obtain a business architecture vector table, a functional architecture vector table and an application architecture template vector table; An initial application architecture generation module, used to extract target content from the business architecture and the functional architecture to generate an initial application architecture based on the business architecture vector table, the functional architecture vector table and the application architecture template vector table; An architecture diagram generation module, used for inputting the initial application architecture and the application architecture template vector table into an architecture graph generation model to obtain an architecture diagram; The target application architecture generation module is used to embed the architecture diagram into the initial application architecture to obtain the target application architecture.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the application architecture generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the application architecture generation method according to any one of claims 1 to 7 when executed.