Data architecture generation method and device, electronic equipment and storage medium

By receiving data from microservices and class models to generate a physical model of the data architecture, it solves the consistency and reliability problems in traditional tools, achieves efficient and accurate data architecture design and multi-format output, and supports online collaborative design.

CN121807266APending Publication Date: 2026-04-07SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Traditional data architecture design tools rely on design documents, leading to consistency and reliability issues, low efficiency, and a single output format, which is not conducive to development communication.

Method used

By receiving microservice data and class model data, a physical model of the data architecture is generated, and multiple output formats are supported, enabling online collaborative design of the data architecture and selection of file formats.

Benefits of technology

It improves the efficiency and accuracy of data architecture design, supports collaborative design by multiple people, reduces reliance on professional tools, and enhances development communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807266A_ABST
    Figure CN121807266A_ABST
Patent Text Reader

Abstract

The invention discloses a data architecture generation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining micro-service data and class model data of a target project, generating a physical model of a data architecture based on the micro-service data and the class model data, and generating a data architecture file in a target format based on the physical model. According to the method, upstream design results such as micro-service data and class model data of a target project can be imported, and a conversion request can be generated through one-key operation of a client, so that a physical model of a data architecture is generated based on the micro-service data and the class model data, and a user does not need to design the data architecture from a design document; on the one hand, the problem of low accuracy caused by inconsistent understanding of design documents by different users is avoided, the efficiency and accuracy of data architecture design are improved, on the other hand, the user can select the output format of the data architecture file and can use and browse the data architecture file without installing a professional tool, and the user experience is improved. And development and communication of data architecture design are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software development technology, and in particular to a method, apparatus, electronic device, and storage medium for generating a data architecture. Background Technology

[0002] Software project design includes several important steps such as business domain design, application service design, technical architecture design, development architecture design, data architecture design, and detailed application design. Data architecture design is an essential part of the software project design process. It solves the overall data storage and data model design information when the software project is finally delivered to the user, so as to ensure that the project runs effectively and efficiently after going live.

[0003] Traditional data architecture design tools, such as PowerDesigner and PDManer, rely on existing design documents for data architecture design. On the one hand, different users have different levels of understanding of the design documents, which can easily lead to consistency and reliability issues in the data architecture, directly affecting the effectiveness of the data architecture design. On the other hand, users rely on design documents to design the data architecture from scratch, which is inefficient and affects the development and delivery of the overall project. Furthermore, the output format of data architecture files is uniform, requiring corresponding professional tools to use and view, which is not conducive to development and communication in data architecture design. Summary of the Invention

[0004] This invention provides a method, apparatus, electronic device, and storage medium for generating a data architecture, which can generate a data architecture by converting microservice data and class model data of a target project, and can output a data architecture document in a target format.

[0005] In a first aspect, the present invention provides a method for generating a data architecture, applied to a server of a data architecture design platform, wherein the data architecture design platform further includes a client, comprising:

[0006] Receive data import requests for the target project sent by the client;

[0007] In response to the data import request, obtain the microservice data and class model data of the target project;

[0008] Upon receiving a data transformation request from the client, a physical model of the data architecture is generated based on the microservice data and the class model data;

[0009] Upon receiving a data request in the target format from the client, a data architecture file in the target format is generated based on the physical model, and a download link for the data architecture file is returned to the client, which then downloads the data architecture file based on the download link.

[0010] In a second aspect, the present application provides a data architecture generation apparatus applied to a server of a data architecture design platform, the data architecture design platform further comprising a client, comprising:

[0011] a data import request receiving module configured to receive a data import request for a target project sent by the client;

[0012] a data import module configured to acquire micro-service data and class model data of the target project in response to the data import request;

[0013] a data architecture model generation module configured to generate a physical model of a data architecture based on the micro-service data and the class model data when receiving a data conversion request sent by the client;

[0014] a data architecture file output module configured to generate a data architecture file in a target format based on the physical model when receiving a target format data request sent by the client, and return a download link of the data architecture file to the client, the client being configured to download the data architecture file based on the download link.

[0015] In a third aspect, the present application provides an electronic device, comprising:

[0016] at least one processor; and

[0017] a memory connected with the at least one processor in communication; wherein,

[0018] 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 to enable the at least one processor to execute the data architecture generation method according to any one of the first aspect of the present application.

[0019] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing computer instructions, the computer instructions being used to enable a processor to execute the data architecture generation method according to any one of the first aspect of the present application.

[0020] After the data import request is received from the client, the micro-service data and the class model data of the target project are acquired, when the data conversion request sent by the client is received, the physical model of the data architecture is generated based on the micro-service data and the class model data, and when the target format data request sent by the client is received, the data architecture file in the target format is generated based on the physical model. On the one hand, the upstream design results such as the micro-service data and the class model data of the target project can be imported, and the conversion request can be generated by one-key operation of the client to generate the physical model of the data architecture based on the micro-service data and the class model data. The user does not need to design the data architecture from the design document, avoiding the problem of low accuracy caused by inconsistent understanding of the design document by different users, improving the efficiency and accuracy of the data architecture design. On the other hand, the user can select the output format of the data architecture file, and the user does not need to install professional tools to use and browse the data architecture file, which is beneficial to the development and communication of the data architecture design.

[0021] 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 application, nor is it intended to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0023] Figure 1 is a flowchart of a data architecture generation method provided by the first embodiment of the present application;

[0024] Figure 2 is a flowchart of a data architecture generation method provided by the second embodiment of the present application;

[0025] Figure 3 is a schematic diagram of the interaction interface for class model import in the embodiments of the present application;

[0026] Figure 4 is a schematic diagram of the picture obtained by rendering the graph data after generating the concept model in the present embodiment;

[0027] Figure 5 is a structural schematic diagram of a data architecture generation device provided by the third embodiment of the present application;

[0028] Figure 6 is a structural schematic diagram of an electronic device provided by the fourth embodiment of the present application. DETAILED DESCRIPTION

[0029] 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 should fall within the scope of protection of the present invention.

[0030] Example 1

[0031] Figure 1 This is a flowchart illustrating a data architecture generation method according to Embodiment 1 of the present invention. This embodiment is applicable to data architecture design during software development. The method can be executed by a data architecture generation device, which can be implemented in hardware and / or software and configured in an electronic device. Figure 1 As shown, the method for generating this data architecture includes:

[0032] S101, Receive a data import request for the target project sent by the client.

[0033] This embodiment applies to a data architecture design platform, which may include a client and a server. Optionally, the data architecture design platform may adopt a B / S (Browser / Server) architecture. On the client side, an interactive interface can be displayed through a webpage in a browser. Users can perform data import operations on the interactive page to request the import of upstream design data for a target project. For example, software project design may include multiple stages such as business domain design, application service design, technical architecture design, development architecture design, data architecture design, and application detailed design. Among them, upstream design data may be design results data prior to data architecture design, such as application service design and technical architecture design.

[0034] In one example, users can select the microservice data and class model data of the target project that they need to import in the interactive interface, and after confirming and submitting, the client generates a data import request.

[0035] S102. Respond to the data import request and obtain the microservice data and class model data of the target project.

[0036] In an embodiment, when the server receives the data import request sent by the browser page, the server can load the microservice data and class model data of the target project from the database according to the data identifiers (such as the microservice list and the class model name) in the data import request, wherein the microservice can be a functional service of a software application, and the class model can be a concept in object-oriented programming in software development, which is an abstract representation of things in the real world and is used to describe a collection of objects with the same attributes and behaviors. The microservice data can be the microservice list of the target project, the database type used by the microservice, and the like, and the class model data can include the class name, the class attribute, the relationship between the class models, and the like.

[0037] S103, when receiving the data conversion request sent by the client, generating a physical model of the data architecture based on the microservice data and the class model data.

[0038] The physical model of the data architecture is used to describe the database at the physical storage layer, and the physical model includes the table structure of the data storage, the implementation of the index, the division of the data block, and the like.

[0039] In an embodiment, the data conversion request can be a request for directly converting the microservice data and the class model data to generate the physical model of the data architecture. In another embodiment, the data conversion request can include a conceptual model conversion request and a physical model conversion request, wherein the conceptual model conversion request is used to trigger the conversion of the class model data to a conceptual model (CDM), and the physical model conversion request is used to trigger the conversion of the conceptual model to a physical model (PDM).

[0040] Specifically, when receiving the conversion request, each class model can be mapped to an entity based on the class model data, each entity includes an entity name, an entity attribute, and a relationship between entities. Further, the database type is determined based on the configuration information of the database type in the microservice data. Based on the database type, the entity name is mapped to the table name in the storage structure, the entity attribute is mapped to the field information of the table, the primary key and the foreign key are configured based on the relationship between the entities, and the index configuration and the partition are performed, to obtain the physical model of the data architecture.

[0041] S104, when receiving the target format data request sent by the client, generating a data architecture file in a target format based on the physical model, and returning a download link of the data architecture file to the client, wherein the client is used to download the data architecture file based on the download link.

[0042] After generating the physical model of the data architecture, the user can select the format of the output file on the client side, such as the output format can include various picture formats, SQL, Word, PDM, Excel and the like, the client sends a target format data request to the server, the server can call the corresponding generator of the target format, output the data architecture file in the target format through the generator, and provide a download link of the data architecture file to return to the client, so that the client can download the data architecture file through the download link.

[0043] After the embodiment of the application receives the data import request from the client, the micro-service data and the class model data of the target project are obtained, when the data conversion request sent by the client is received, the physical model of the data architecture is generated based on the micro-service data and the class model data, and when the target format data request sent by the client is received, the data architecture file in the target format is generated based on the physical model. On the one hand, the upstream design results such as the micro-service data and the class model data of the target project can be imported, and the conversion request can be generated through one-key operation of the client to generate the physical model of the data architecture based on the micro-service data and the class model data, so that the user does not need to design the data architecture from the design document, and the problem of low accuracy caused by inconsistent understanding of different users for the design document is avoided, the efficiency and accuracy of the data architecture design are improved, on the other hand, the user can select the output format of the data architecture file, and the user does not need to install professional tools to use and browse the data architecture file, which is beneficial to the development and communication of the data architecture design.

[0044] Embodiment two

[0045] Figure 2 A flowchart of a data architecture generation method provided by the embodiment two of the application is shown in the figure, and the embodiment of the application is optimized on the basis of the above-mentioned embodiment one, which includes the following steps. Figure 2

[0046] S201, receiving the data import request for the target project sent by the client.

[0047] The data architecture design platform can adopt B / S (Browser / Server) architecture, and the interactive interface can be displayed on the client side through a browser, the interactive interface can be realized based on an SVG (Scalable Vector Graphics) rendering engine, the SVG rendering engine draws animation by creating SVG (Scalable Vector Graphics) elements, and the SVG rendering engine is based on DOM tree structure and vector graphics description page. In the embodiment, the interactive interface can provide micro-service data import and class model data import operations, as shown in the figure. Figure 3 Figure 3 ​​The user can select a class model in the interactive interface, such as the "person" class model of the target project, and can also import other class models. Similarly, the user can select the relevant microservice of the target project in the interactive interface of the microservice import. After the user selects the microservice and the class model, the user can generate a data import request and send it to the server after confirming and submitting on the page. The server can receive the data import request sent by the client.

[0048] S202, in response to the data import request, obtaining the microservice data and class model data of the target project.

[0049] The microservice can be a plurality of services with independent functions in a large and complex application. Each microservice has a specific business function and can be independently developed, deployed, and run. For example, an e-commerce platform can be divided into multiple microservices, such as:

[0050] User service: responsible for user registration, login, personal information management, etc.

[0051] Product service: focuses on product display, inventory management, product information maintenance, etc.

[0052] Order service: handles order creation, payment, query, logistics tracking, etc.

[0053] Payment service: dedicated to various payment channels to complete the payment process.

[0054] Each microservice communicates with each other through the network (such as HTTP protocol) to complete the related functions of the e-commerce platform. Each microservice can use an adaptive technology stack and can be independently scaled, such as when the order volume increases during peak shopping periods, the order service can be scaled without affecting other services.

[0055] Class model: a concept in object-oriented programming in software development. The class model can be an abstract representation of things in the real world, used to describe a collection of objects with the same properties and behaviors. The class model defines the structure (properties) and behavior (methods) of the object. For example, the class model can include:

[0056] User class: attributes can include user ID, username, password (encrypted), email, mobile phone number, etc. Methods can include user registration (verify information, create account), user login (verify username and password), modify personal information (update attributes), etc.

[0057] Product category: Attributes may include product ID, product name, product description, price, inventory quantity, category, product image link, etc.; methods may include querying product information (returning attribute values), updating inventory (e.g., reducing inventory after selling a product), modifying product price, etc.

[0058] Order type: Attributes may include order ID, user ID (associated user), list of product IDs (associated purchased products), total order price, order time, order status (pending payment, paid, shipped, completed, etc.), shipping address, etc.; methods may include creating an order (collecting product and user information to generate an order), updating the order status (e.g., changing it to paid after payment), querying order details, etc.

[0059] With class models, developers can create corresponding objects to handle business logic related to users, products, and orders in e-commerce platforms, making code organization and management clearer and more in line with real-world business logic.

[0060] In this embodiment, the microservice data and class model data can be the design results data of application service design and technical architecture design before data architecture design. When the server receives a data import request, it responds to the data import request, parses the microservice list and class model identifier from the data import request, and reads the corresponding microservice data and class model data from the database through the microservice identifier (such as microservice ID or name) and class model identifier (such as class model ID or name) in the microservice list. The microservice data includes at least the type of database that stores the data generated by the microservice, and the class model data can include class name, class attributes, and the association relationship between class models.

[0061] S203. Upon receiving a conceptual model conversion request from the client, the class model data is converted into a conceptual model of the data architecture based on preset mapping rules.

[0062] A conceptual model of data architecture can be an abstraction of data architecture design. The conceptual model describes entities, attributes and their relationships in the business domain from a business perspective. Entities represent objects or concepts in the business domain. For example, in the development of an e-commerce platform, entities can be entities such as "customer" and "order" in the e-commerce business domain. Attributes describe the characteristics or properties of entities. For example, the "customer" entity can include attributes such as "name" and "address". Relationships describe the connections or interactions between entities. For example, there is an "order placement" relationship between "customer" and "order".

[0063] Specific to the embodiment, the class model data can include class name, class attribute, and association relationship of the class model. When receiving the concept model conversion request sent by the client, for each class model, the class name of the class model can be mapped to an entity name, the class attribute can be mapped to an entity attribute, and the association relationship can be mapped to an entity relationship, so as to obtain an entity of the concept model of the data architecture, and the class model is converted into the entity of the concept model based on the class model data.

[0064] In S204, the graph metadata of the entity in the concept model is generated and sent to the client, and the client is used to render and display the concept model of the data architecture based on the graph metadata.

[0065] After the concept model is generated, the graph metadata of the entity in the concept model can be generated, which can include the name of the entity (which can include Chinese and English), the attribute list of the entity, the attribute detail information, and the relationship between entities. The server can send the graph metadata of each entity to the client, and the client can render based on the graph metadata to display the concept model of the data architecture, as shown in Figure 4 Each rectangular graph element can represent an entity in the concept model, and the entity name, attribute list, and attribute details are displayed in each rectangular graph element. When there is an entity relationship between the entities, a connection line graph element with an arrow is used to connect to reflect the entity relationship.

[0066] In S205, the editing operation of the client for the displayed concept model is received, and the concept model of the data architecture is updated.

[0067] As shown in Figure 4 In the interactive interface for displaying the concept model, an editing menu can be provided, which can include a graph element editing menu located on the left side of the canvas and an attribute editing menu located on the right side of the canvas (not shown) Figure 4 After the concept model is displayed, the user can edit the entity in the displayed concept model, such as dragging the entity position, changing the attribute of the entity, adding an entity, deleting an entity, modifying the relationship between entities, etc. After the user editing operation is completed and submitted, when the server receives the editing operation of the first user's client for the data architecture, the editing object is locked, the editing operation is sent to the client of the second user, the second user's client updates the displayed data architecture based on the editing operation, and the editing object is unlocked after the first user edits the editing object.

[0068] Exemplarily, assuming that the first user is user A and the second user is user B, when user A edits an entity C in the concept model, the server locks the entity C to prevent user B from simultaneously editing the entity C, after user A finishes editing the entity C, the client where user A is located uploads an editing operation instruction (such as “updateTableName”) to the server, the server broadcasts the editing operation instruction to the client of user B who is online and in the same project, the client of user B updates the graph metadata of the entity in the concept model after receiving the editing operation instruction, and the server simultaneously unlocks the entity C so that other users can edit the entity C.

[0069] In another implementation, when detecting the editing operation, it can be determined whether a conflict occurs, if the editing operation conflicts, a preset conflict resolution strategy is used to process the editing operation, optionally, the conflict resolution strategy can include last operation priority, manual selection merging, and rollback, wherein the last operation priority can be based on a timestamp of the editing operation, the editing operation with the latest timestamp is updated, the manual selection merging can display an option box of whether to merge in the interactive interface when the conflict occurs, if the merging is selected, the two editing operations are merged, otherwise, the editing operation is cancelled, and the rollback refers to rejecting the current update and rolling back to the previous version.

[0070] The embodiment provides an editing menu in the interactive interface, the user can perform secondary design, editing and other operations on the generated data architecture, the editing operation of the first user can be synchronized to the second user who is online, a conflict resolution strategy is provided, multiple users can collaboratively design the data architecture, the multi-user collaboration capability of the data architecture is improved, and the design efficiency of the data architecture is improved.

[0071] S206, when receiving the physical model conversion request sent by the client, the concept model is converted into a physical model of the data architecture based on the micro-service data.

[0072] After the concept model is generated, when the user triggers a physical model conversion request in the design interface of the physical model, the server receives the physical model conversion request sent by the client, and determines the target type of the database from the micro-service data, maps the entity name, entity attribute and entity relationship of the entity in the concept model into the table structure, index and partition of the database of the target type, and obtains the physical model of the data architecture.

[0073] Specifically, the metadata corresponding to the table model can be generated based on the preconfigured mapping rule and the FreeMarker template, the FreeMarker template is called to automatically match and generate a database table DDL script, the index metadata is automatically constructed for the unique field, and the partition metadata is automatically constructed for the field with a fixed value, for example, logical deletion.

[0074] Exemplarily, after the user completes editing the concept model in the interactive interface, the user can select to convert the physical model from the concept model. The client submits the concept model displayed in the canvas of the interactive interface to the server. After the server receives the data of each entity in the concept model, the server converts the concept model to obtain the physical model according to the preset mapping rule. First, the database type required for storing data is determined based on the database type configuration in the microservice data, and the mapping rule of the database of this type is determined. The mapping rule can be that the entity name is mapped to the database table name when the entity is mapped to the database table, the entity attribute is mapped to the database table field, and the association relationship between entities is mapped to the key of the database. Exemplarily, the entity Chinese name is mapped to the table Chinese name, the entity English name is mapped to the table English name, the attribute Chinese name is mapped to the field Chinese name, the attribute English name is mapped to the field English name, and the attribute data type is mapped to the field data type. For example, the concept model “Variable C” is mapped to VARCHAR, “Integer” is mapped to INT, “Date & Tim” is mapped to TIMESTAMP, the primary identifier (PI) is mapped to the primary key (PK), the secondary identifier is mapped to the unique index (UNIQUE KEY), the primary key of the associated entity is added as a foreign key in any table, an intermediate association table is automatically generated, the primary keys of the two entities are stored as joint foreign keys, and the like.

[0075] For fields containing “fixed values” in the concept model (such as “logical deletion identifier” and “validity period”), partition metadata is automatically constructed according to a predefined rule (such as partitioning according to a time range or partitioning according to an enumeration value). A table creation statement (CREATE TABLE), an index statement (CREATE INDEX), and the like are generated according to the target database type (such as MySQL) by using a FreeMarker template engine.

[0076] In an optional embodiment, after the physical model is obtained by conversion, the physical model can also be checked for legality and compatibility. The checking content includes:

[0077] compatibility of field types with the target database: special types that are not supported by MySQL are automatically replaced with compatible types;

[0078] foreign key relationship closed loop check: the primary key field exists and is consistent in type;

[0079] index coverage rationality check: to avoid duplicate indexes and redundant indexes;

[0080] table name / field name compliance with the naming specification of the target database: to avoid keywords and length not exceeding the limit;

[0081] Optimization logic check: If incompatible issues are detected (such as unsupported field types), automatically adjust to compatible solutions (such as "Variable C(1000)" is converted to TEXT type in MySQL), and record adjustment logs for user review.

[0082] Similarly, after the physical model is converted, the graph metadata (including table, field, index, foreign key, partition, etc.) of the converted physical model can be returned to the client, and the client uses the graph metadata to automatically update the canvas and display a visual physical model design diagram (such as a PDM model design diagram). Users can perform secondary optimization on the displayed physical model design diagram, such as adjusting field types, lengths, default values, adding / deleting indexes, modifying partition strategies, supplementing field annotations, table annotations, and other optimization operations.

[0083] S207, when receiving the target format data request sent by the client, determining the generator of the target format.

[0084] After the physical model is converted and secondary optimization is completed on the physical model, the user can select the target format of the data architecture file, so that the client generates a target format data request and sends it to the server. The server determines the target format from the request, where the target format can be one of the following formats:

[0085] Picture format (PNG / SVG): Based on SVG graph rendering generation, it can intuitively display visual information such as table structure, field association, index distribution, etc. of the physical model of the data architecture. Through the picture format, the data architecture design results can be quickly shared, included in project documents, and displayed in review meetings, without the need to rely on professional tools.

[0086] SQL script format: It can automatically generate table creation statements (CREATE TABLE), index statements (CREATE INDEX), partition configuration statements, etc. based on the physical model, and can be directly executed in the target database (such as MySQL, MongoDB) to quickly land the table structure, supporting one-key deployment in development and test environments.

[0087] Word document format: Generate design documents according to structured templates, including table basic information, field details (type, length, constraints), association relationships, index descriptions, etc. It can be used for project archiving, cross-team review, and delivery to customers. The document can be directly edited and modified, and is suitable for office scenarios.

[0088] PDM file format: Generate a file format compatible with PowerDesigner, which completely preserves table structure, field properties, association relationships, indexes, partitions, and other metadata. It can be connected to traditional design tools, allowing users accustomed to PowerDesigner to continue editing, and realizing seamless connection between new and old tools.

[0089] Excel table format: aggregate table information and field details in table form, including table name, field name, data type, length, primary / foreign key identification, allow null, etc. attributes, which can be used for data architecture analysis, field comparison analysis, quick query field attributes, support data filtering and secondary processing.

[0090] S208, call the generator to generate the data architecture file of the physical model in the target format.

[0091] The embodiment can pre-configure the correspondence between the generator and the format:

[0092] Picture format→SVG rendering generator, used to render canvas elements to PNG / SVG files;

[0093] SQL script→SQL generator, used to generate table creation / index statements based on the physical model and target database type through FreeMarker template;

[0094] Word / Excel→document generator, used to fill in table structure, field details and other structured data according to the preset template;

[0095] PDM file→PDM generator, used to generate PowerDesigner compatible metadata files, retaining complete information of tables, fields, relationships, etc.

[0096] After determining the target format, the dedicated generator of the target format can be matched according to the above correspondence, and the data architecture file of the target format is generated by the generator. For example, the generator first standardizes the received canvas data (such as verifying the legality of field types and supplementing missing attribute descriptions), and then generates the data architecture file of the target format, such as,

[0097] The SQL generator splices DDL statements according to the target database syntax (such as MySQL, Oracle), ensuring direct execution. The document generator (Word / Excel) fills in table name, field name, data type, constraint, etc. according to the template layout, generating structured documents. The SVG rendering generator renders the element layout, connection, and text annotation in the canvas, generating high-definition visual pictures. The PDM generator encapsulates model metadata according to the file format specification of PowerDesigner, ensuring normal editing after import.

[0098] The server can package the content output by the generator into a data architecture file in the target format (such as.sql,.xlsx,.docx,.pdm), and generate a temporary download link, which is returned to the client. The client pops up a download prompt, and the user can save the file to the local by clicking.

[0099] The data architecture generation method of the embodiment has the following beneficial effects:

[0100] The data architecture is obtained by converting the upstream design results such as the microservice data and the class model data of the target project. Designers do not need to start from scratch to design the data architecture depending on design documents, and the repeated labor is reduced. The class model to the conceptual model and the conceptual model to the physical model can be converted by one key, the design efficiency of the data architecture is improved, and the mapping rules and the consistency checking algorithm obtained by the model conversion ensure the conversion accuracy of the class model to the conceptual model to the physical model, avoid design errors caused by document understanding deviation, in addition, the data architecture design can be linked and adjusted with the upstream microservice design, class model design and the like, and after the upstream (such as the class model) is changed, it can be updated to the data architecture design in synchronization, and the integrity of the whole process design of the project is ensured.

[0101] Further, the B / S architecture is adopted, professional tools are not needed to be installed, and only a browser can be used for real-time online editing operation, the design operation is synchronized to all project members in real time, and when conflicts occur, the conflict resolution strategies such as the locking mechanism, the merging prompt and the like are used to avoid achievement covering, so that the online collaborative design of multiple people is realized, the tedious operation of file copying and importing and exporting is reduced, cross-system and cross-device compatibility is achieved, different operating systems (Windows, Mac and the like) do not need to be adapted, and the collaborative design threshold is reduced.

[0102] Further, the data architecture file in multiple formats such as pictures, SQL scripts, Word, Excel, PDM and the like can be exported, the file can be opened and viewed without depending on special tools, and the development and exchange of the data architecture design are facilitated.

[0103] Embodiment three

[0104] Figure 5 A structural schematic diagram of a data architecture generation device provided by the embodiment three is shown in the figure. Figure 5 As shown in the figure, the data architecture generation device comprises:

[0105] A data import request receiving module 501, configured to receive a data import request for a target project sent by a client;

[0106] A data import module 502, configured to respond to the data import request and acquire microservice data and class model data of the target project;

[0107] A data architecture model generation module 503, configured to generate a physical model of a data architecture based on the microservice data and the class model data when receiving a data conversion request sent by the client;

[0108] The data architecture file output module 504 is configured to, when receiving the target format data request sent by the client, generate a data architecture file in a target format based on the physical model, and return a download link of the data architecture file to the client, so that the client downloads the data architecture file based on the download link.

[0109] Optionally, the data architecture model generation module 503 comprises:

[0110] The concept model conversion unit is configured to, when receiving a concept model conversion request sent by the client, convert the class model data into a concept model of the data architecture based on a preset mapping rule.

[0111] The physical model conversion unit is configured to, when receiving a physical model conversion request sent by the client, convert the concept model into a physical model of the data architecture based on the micro-service data.

[0112] Optionally, the class model data comprises a class name, a class attribute, and an association relationship of a class model, and the concept model conversion unit is specifically configured to:

[0113] When receiving the concept model conversion request sent by the client, for each class model data, the class name is mapped into an entity name, the class attribute is mapped into an entity attribute, and the association relationship is mapped into an entity relationship, so as to obtain an entity of the concept model of the data architecture.

[0114] Optionally, the data architecture model generation module 503 further comprises:

[0115] The graph metadata generation module is configured to generate graph metadata based on the entity in the concept model and send the graph metadata to the client, so that the client displays the concept model of the data architecture by rendering the graph metadata.

[0116] The editing update unit is configured to receive an editing operation of the displayed concept model sent by the client, update the concept model of the data architecture, and return the graph metadata generation module.

[0117] Optionally, the micro-service data comprises a preconfigured database type, and the physical model conversion unit is specifically configured to:

[0118] When receiving the physical model conversion request sent by the client, the target type of the database is determined from the micro-service data.

[0119] The entity name, the entity attribute, and the entity relationship of the entity in the concept model are mapped into a table structure, an index, and a partition of the database of the target type, so as to obtain the physical model of the data architecture.

[0120] Optionally, further comprising:

[0121] An editing operation receiving module, configured to lock an editing object when an editing operation on the data architecture on the client of the first user is received;

[0122] An editing operation synchronizing module, configured to send the editing operation to the client of the second user, and the client of the second user updates the displayed data architecture based on the editing operation;

[0123] An unlocking module, configured to unlock the editing object after the editing of the editing object by the first user is completed;

[0124] An editing conflict processing module, configured to process the editing operation by using a preset conflict resolution strategy if the editing operation conflicts.

[0125] Optionally, the data architecture file output module 504 comprises:

[0126] A generator determining unit, configured to determine a generator of the target format when the target format data request sent by the client is received;

[0127] A file output unit, configured to call the generator to generate the data architecture file of the physical model in the target format.

[0128] The data architecture generation apparatus provided by the embodiment of the present application can execute the data architecture generation method provided by any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0129] Embodiment four

[0130] Figure 6 A structural schematic diagram of an electronic device 40 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0131] As Figure 6As shown, the electronic device 40 includes at least one processor 41, and a memory, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., connected to the at least one processor 41 in communication. The memory stores computer programs executable by the at least one processor 41, and the processor 41 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 42 or loaded from the storage unit 48 into the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0132] Various components in the electronic device 40 are connected to the I / O interface 45, including an input unit 46, such as a keyboard, a mouse, etc., an output unit 47, such as various types of displays, a speaker, etc., a storage unit 48, such as a magnetic disk, an optical disk, etc., and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0133] The processor 41 can be various general and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose 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 41 performs various methods and processes described above, such as the generation method of the data architecture.

[0134] In some embodiments, the generation method of the data architecture can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the generation method of the data architecture described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to perform the generation method of the data architecture by any other appropriate means, such as by means of firmware.

[0135] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation 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 special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0136] Computer programs used to implement the processes of the application 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 program

[0137] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, 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.

[0138] To provide for interaction with a user, the systems and techniques described here 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 be used to provide for interaction with a user as well; for example, 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, speech, or tactile input.

[0139] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0140] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0141] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in a different order, as long as the desired results of the present disclosure are achieved, and the present disclosure is not limited herein.

[0142] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and principles of the disclosure. Accordingly, the disclosure is not limited to the specific embodiments described above, but only by the scope of the appended claims.

Claims

1. A method for generating a data architecture, characterized in that, A server used in a data architecture design platform, the data architecture design platform also including a client, comprising: Receive data import requests for the target project sent by the client; In response to the data import request, obtain the microservice data and class model data of the target project; Upon receiving a data transformation request from the client, a physical model of the data architecture is generated based on the microservice data and the class model data; Upon receiving a data request in the target format from the client, a data architecture file in the target format is generated based on the physical model, and a download link for the data architecture file is returned to the client, which then downloads the data architecture file based on the download link.

2. The method according to claim 1, characterized in that, Upon receiving a data transformation request from the client, a physical model of the data architecture is generated based on the microservice data and the class model data, including: Upon receiving a conceptual model conversion request from the client, the class model data is converted into a conceptual model of the data architecture based on preset mapping rules; Upon receiving a physical model conversion request from the client, the conceptual model is converted into a physical model of the data architecture based on the microservice data.

3. The method according to claim 2, characterized in that, The class model data includes class names, class attributes, and class model relationships. Upon receiving a conceptual model conversion request from the client, the class model data is converted into a conceptual model of the data architecture based on preset mapping rules, including: Upon receiving a conceptual model conversion request from the client, for each class model data, the class name is mapped to an entity name, the class attribute is mapped to an entity attribute, and the association is mapped to an entity relationship, thereby obtaining the entity of the conceptual model of the data architecture.

4. The method according to claim 3, characterized in that, After converting the class model data into a conceptual model of the data architecture based on preset mapping rules, the process also includes: Based on the entities in the conceptual model, graph metadata is generated and sent to the client, which uses the graph metadata to render and display the conceptual model of the data architecture. The steps include receiving the client's editing operation on the displayed conceptual model, updating the conceptual model of the data architecture, and returning the steps of generating graph metadata based on the entities in the conceptual model and sending it to the client.

5. The method according to claim 3, characterized in that, The microserver data includes pre-configured database types. Upon receiving a physical model conversion request from the client, the conceptual model is converted into a physical model of the data architecture based on the microserver data, including: Upon receiving a physical model conversion request from the client, the target type of the database is determined from the microservice data; The entity names, entity attributes, and entity relationships of the entities in the conceptual model are mapped to the table structure, indexes, and partitions of the target type database to obtain the physical model of the data architecture.

6. The method according to any one of claims 1-5, characterized in that, Also includes: When receiving an edit operation on the data architecture from the first user's client, the edit object is locked; The editing operation is sent to the second user's client, and the second user's client updates the displayed data architecture based on the editing operation; After the first user finishes editing the object, the edit object is unlocked; If a conflict occurs during the editing operation, a preset conflict resolution strategy will be used to handle the editing operation.

7. The method according to any one of claims 1-5, characterized in that, Upon receiving a target format data request from the client, a data architecture file in the target format is generated based on the physical model, including: Upon receiving a target format data request from the client, determine the generator of the target format; The generator is invoked to generate the data architecture file of the physical model in the target format.

8. A data architecture generation apparatus, characterized in that, A server used in a data architecture design platform, the data architecture design platform also including a client, comprising: The data import request receiving module is used to receive data import requests for the target project sent by the client. The data import module is used to respond to the data import request and obtain the microservice data and class model data of the target project; The data architecture model generation module is used to generate a physical model of the data architecture based on the microservice data and the class model data when it receives a data transformation request sent by the client. The data architecture file output module is used to generate a data architecture file in the target format based on the physical model when it receives a data request in the target format sent by the client, and return a download link of the data architecture file to the client, which is used to download the data architecture file based on the download link.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data architecture generation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for generating the data architecture according to any one of claims 1-7.