Application class model generation method and device, computer equipment and readable storage medium

By converting the variable references, expressions, and function conversion rules in the framework, the target application class model is generated and the associated mapping relationship is established, which solves the problem of model data migration between the software design collaboration platform and the development platform, realizes the complete migration and synchronous update of the model data, and improves the R&D efficiency and quality.

CN120743232APending Publication Date: 2025-10-03SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510791393.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

During the digital transformation of enterprises, the migration of model data between software design collaboration platforms and software development platforms suffers from problems of lack of model data integrity and data inconsistency, resulting in low R&D efficiency and poor quality.

Method used

Through the variable reference, expression and function conversion rules in the conversion framework, the structured storage files of the development model are mapped and logically calculated to generate the target application class model, and an association mapping relationship is established between the development model and the target application class model to achieve complete migration and synchronous update of model data.

Benefits of technology

It significantly improves R&D efficiency, reduces the workload of designers in manually completing model data, ensures the integrity and consistency of model data, avoids data loss and conflicts, and realizes cross-platform two-way synchronous updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743232A_ABST
    Figure CN120743232A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer software, and provides an application class model generation method and device, computer equipment and a readable storage medium. The method comprises the following steps: mapping variables in a structured storage file of a development model according to a variable reference conversion rule of a conversion framework to obtain variables of a target application class model corresponding to the development model; according to an expression conversion rule of the conversion framework, converting an expression in a structured storage file of the development model into data processing operation of a plurality of variables to obtain an expression of a target application class model; according to a function conversion rule of the conversion framework, calling an external function to perform logic calculation on a function in a structured storage file of the development model, and taking a return value of the external function as a variable of the target application class model; and generating the target application class model according to the variable and the expression of the target application class model. By adopting the method, efficient and complete conversion of the development model can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer software technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for generating an application class model. Background Art

[0002] In the digital transformation of enterprises, software design collaboration platforms and software development platforms have become core R&D tools. Software design collaboration platforms support architects in completing key software design activities, ensuring design quality and efficiency; software development platforms assist developers in achieving efficient software development. The typical R&D model involves completing application model design on the software design collaboration platform, pushing it to the R&D platform for conversion into a physical model, which then drives code generation.

[0003] With the diversification of enterprise businesses, the demand for iterative software system upgrades has surged. Some legacy systems suffer from missing design artifacts: existing physical models are retained only on the software development platform, while corresponding application models are not available on the software design collaboration platform. Consequently, when developing new projects, designers must expend considerable effort to reverse engineer application models from the physical models on the R&D platform and manually enter them into the software design collaboration platform. This process is not only time-consuming and labor-intensive, but also prone to data errors due to manual operation, resulting in inconsistent model data between the two platforms and severely impacting R&D efficiency and quality.

[0004] Currently, the entity model of the software development platform can be converted into the application model of the software design collaboration platform through the model data file to achieve model data migration. However, the above method of achieving model data migration has the problem of lack of model data integrity. Summary of the Invention

[0005] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for generating an application class model in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for generating an application class model, comprising:

[0007] According to the variable reference conversion rules in the conversion framework, the variables in the structured storage file of the development model are mapped to obtain the variables of the target application class model; the target application class model is the application class model corresponding to the development model;

[0008] According to the expression conversion rules in the conversion framework, the expression in the structured storage file of the development model is converted into a data processing operation of multiple variables to obtain the expression of the target application class model;

[0009] According to the function conversion rules in the conversion framework, an external function is called to perform logical calculation on the function in the structured storage file of the development model, and the return value of the external function is used as a variable of the target application class model;

[0010] Generate a target application class model based on the variables and expressions of the target application class model.

[0011] In one embodiment, after generating the target application class model based on the variables and expressions of the target application class model, the method further includes:

[0012] Generate a unique association identifier for each model element between the development model and the target application class model; the model elements include attributes, methods and classes;

[0013] Based on the unique association identifier corresponding to each model element, an association mapping relationship is established between the development model and the target application class model.

[0014] In one embodiment, the method further comprises:

[0015] When merging or updating the target application class model, the association mapping relationship between the development model and the target application class model is identified based on the unique association identifier;

[0016] Identifying the modified content of the target application class model based on the association mapping relationship between the development model and the target application class model;

[0017] The development model is synchronously updated according to the modified content of the target application class model.

[0018] In one embodiment, the method further comprises:

[0019] When updating the development model, the association mapping relationship between the development model and the target application class model is identified based on the unique association identifier;

[0020] Identifying the modified content of the development model based on the association mapping relationship between the development model and the target application class model;

[0021] According to the modified content of the development model, the target application class model is synchronously updated.

[0022] In one embodiment, the method further comprises:

[0023] When merging several target application class models, matching the model elements in the several target application class models by using the unique association identifier;

[0024] When there is a match between the model elements in the plurality of target application class models, determining the model element as a matching model element;

[0025] Merge matching model elements based on the conflict resolution strategy.

[0026] In one embodiment, the conflict resolution strategy is a priority strategy, and merging matching model elements according to the conflict resolution strategy includes:

[0027] Determine the priority of each matching model element according to the pre-set priority rules;

[0028] The matching model elements are merged according to their priorities.

[0029] In one embodiment, the conflict resolution strategy is a manual intervention strategy, and merging matching model elements according to the conflict resolution strategy includes:

[0030] Display the visual merge interface;

[0031] According to the user's adjustment operation of the matching model elements in the visual merging interface, the matching model elements are merged.

[0032] In a second aspect, the present application further provides a device for generating an application class model, comprising:

[0033] A variable conversion module is used to map the variables in the structured storage file of the development model according to the variable reference conversion rules in the conversion framework to obtain the variables of the target application class model; the target application class model is the application class model corresponding to the development model;

[0034] An expression conversion module, configured to convert the expression in the structured storage file of the development model into a data processing operation of multiple variables according to the expression conversion rules in the conversion framework, so as to obtain the expression of the target application class model;

[0035] A function conversion module is used to call an external function to perform logical calculations on the functions in the structured storage file of the development model according to the function conversion rules in the conversion framework, and use the return value of the external function as a variable of the target application class model;

[0036] The model generation module is used to generate the target application class model according to the variables and expressions of the target application class model.

[0037] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program and the processor executes the above method.

[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used by a processor to execute the above method.

[0039] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product includes a computer program, and the computer program is executed by a processor to execute the above method.

[0040] The above-mentioned generation method, device, computer equipment, computer-readable storage medium and computer program product of the application class model, according to the variable reference conversion rules in the conversion framework, maps the variables in the structured storage file of the development model to obtain the variables of the target application class model; the target application class model is the application class model corresponding to the development model; according to the expression conversion rules in the conversion framework, the expression in the structured storage file of the development model is converted into a data processing operation of multiple variables to obtain the expression of the target application class model; according to the function conversion rules in the conversion framework, the external function is called to perform logical calculations on the function in the structured storage file of the development model, and the return value of the external function is used as the variable of the target application class model; according to the variables and expressions of the target application class model, the target application class model is generated. This application obtains the variables and expressions of the target application class model according to the variable reference conversion rules, expression conversion rules and function conversion rules in the conversion framework to generate the target application class model, which can realize the complete migration of model data, can greatly reduce the workload of designers to manually complete model data, and significantly improve R&D efficiency, thereby realizing efficient and complete conversion of the development model. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 An application environment diagram of a method for generating an application class model in one embodiment;

[0043] Figure 2 1 is a flow chart of a method for generating an application class model in one embodiment;

[0044] Figure 3 is a schematic diagram of a conversion framework in one embodiment;

[0045] Figure 4 An entity diagram of a model relationship mapping system in one embodiment;

[0046] Figure 5 is a schematic diagram of a visual merging interface in one embodiment;

[0047] Figure 6 is a structural block diagram of a device for generating an application class model in one embodiment;

[0048] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0050] It should be noted that the terms "including" and "having" and any variations thereof used in this application are intended to cover non-exclusive inclusions. The term "plurality" used in this application refers to two or more. The term "and / or" used in this application refers to one or more solutions.

[0051] The method for generating an application class model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can convert the variables, expressions and functions in the structured storage file of the development model according to the conversion framework to obtain the variables and expressions of the target application class model to generate the target application class model. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, drones, low-altitude aircraft, Internet of Things devices and portable wearable devices. The server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0052] In an exemplary embodiment, Figure 2 As shown, a method for generating an application class model is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate the process, including the following steps S201 to S204.

[0053] Step S201 , mapping the variables in the structured storage file of the development model according to the variable reference conversion rules in the conversion framework to obtain the variables of the target application class model; the target application class model is the application class model corresponding to the development model.

[0054] A standardized development package export function can be built into the software development platform to store core development models, such as entities, enumerations, and exceptions, in structured storage files. These files can be in the JSON (JavaScript Object Notation) format. These development model structured storage files (referred to as packages) adhere to the following unified data specifications:

[0055] (1) Entity model: Contains basic information (such as model name, version), attribute definition, method signature, data type declaration, and parent entity inheritance relationship, etc., and fully retains the core attributes and structure of the entity model during the development phase;

[0056] (2) Enumeration model: records basic information, attribute list, method description and enumeration item definition;

[0057] (3) Exception model: stores basic information and error coding information.

[0058] You can design on the software design collaboration platform Figure 3 The extensible transformation framework shown in the figure supports customizing model transformation rules in configuration files, enabling mapping of entity models (source models) to target application class models. The target application class model is the application class model corresponding to the development model. The application class model can also be called the application class design model.

[0059] By configuring the input entity model variables and the target application class model output variables, you can determine the variable reference conversion rules of the conversion framework and implement direct mapping of attribute values. For example:

[0060] <rule input="attr1" output="classAttr1" / > ;

[0061] Among them, rule means rule, input means input, attr means attribute, output means output, and classAttr means class attribute.

[0062] The variable reference conversion rules of the conversion framework have the following characteristics:

[0063] (1) Deep nested parsing: supports nested.attr1.attr2 multi-level attribute path parsing, and implements complex data extraction through the JSON Path expression engine; nested means nested;

[0064] (2) Type adaptation mechanism: built-in automatic type conversion rules (such as string to date), and provides a custom type converter extension interface.

[0065] Step S202 : According to the expression conversion rules in the conversion framework, the expressions in the structured storage file of the development model are converted into data processing operations of multiple variables to obtain the expressions of the target application class model.

[0066] According to the expression conversion rules in the conversion framework, flexible data processing can be achieved through the Expression Language (EL) syntax, and the expressions in the structured storage files of the development model can be converted into data processing operations on multiple variables. For example, the expressions in the structured storage files of the development model can be converted into splicing, interception or function calculation operations of multiple input variables to obtain the expression of the target application class model.

[0067] For example, attr2 and attr3 of the entity model are concatenated and assigned to the target application class model:

[0068] <rule expression="${attr2}_${attr3}" output="classAttr2" / > ;

[0069] Among them, rule means rule, input means input, attr means attribute, output means output, and classAttr means class attribute.

[0070] Expression transformation rules can integrate mathematical operations and string processing with built-in functions, such as the rounding function (round()) and the substring function (substring()).

[0071] Step S203 , according to the function conversion rules in the conversion framework, call the external function to perform logical calculation on the function in the structured storage file of the development model, and use the return value of the external function as a variable of the target application class model.

[0072] Functions in the structured storage files of the development model, including complex business logic, can be converted to deep conversion by calling external functions (such as Java class methods) based on the function conversion rules in the conversion framework to perform logical calculations on the functions in the structured storage files of the development model. The return value of the external function is used as a variable in the target application class model. The sample configuration is as follows:

[0073] <rule output="classAttr3"> ;

[0074] <param1> attr4< / param1> ;

[0075] <param2> attr5< / param2> ;

[0076] <method> com.xx.XXClass.XXmethod< / method> ;

[0077] < / rule> ;

[0078] "rule" represents a rule, "output" represents an output, "attr" represents an attribute, "classAttr" represents a class attribute, "param" represents a parameter, and "method" represents a method. "com.xx" represents a package name, "XXClass" represents a class name, and "Xxmethod" represents a method in that class. "com.xx.XXClass.XXmethod" is often used to describe the full path to a specific method in Java.

[0079] Step S204: Generate a target application class model according to the variables and expressions of the target application class model.

[0080] The corresponding target application class model can be generated by analyzing and processing the variables and expressions of the target application class model.

[0081] In the above-mentioned method for generating application class models, the variables and expressions of the target application class model are obtained according to the variable reference conversion rules, expression conversion rules and function conversion rules in the conversion framework to generate the target application class model. This can realize the complete migration of model data, greatly reduce the workload of designers to manually complete model data, significantly improve R&D efficiency, and thus realize efficient and complete conversion of development models.

[0082] In one embodiment, after generating the target application class model based on the variables and expressions of the target application class model, the method provided by the present application also includes: generating a unique association identifier for each model element between the development model and the target application class model; the model elements include attributes, methods and classes; based on the unique association identifier corresponding to each model element, establishing an association mapping relationship between the development model and the target application class model.

[0083] Based on the cross-platform dynamic association identification system, when converting the entity model of the software development platform into the application class model of the software design collaboration platform, a cross-platform model association mapping can be established between the software design collaboration platform and the R&D platform, and a unique and traceable association identifier can be generated for each model element (attribute, method and class) between the development model and the target application class model, and stored in the database mapping table.

[0084] Based on the unique association identifier corresponding to each model element, the association mapping relationship between the development model and the target application class model can be established. Figure 4 shown.

[0085] In this embodiment, a unique association identifier is generated for each model element between the development model and the target application class model, thereby establishing a bidirectional mapping relationship between the entity model and the application class model.

[0086] In one embodiment, the method provided by the present application also includes: when merging or updating the target application class model, identifying the association mapping relationship between the development model and the target application class model based on the unique association identifier; identifying the modified content of the target application class model based on the association mapping relationship between the development model and the target application class model; and synchronously updating the development model according to the modified content of the target application class model.

[0087] When merging or updating the target application class model, the software design collaboration platform can automatically identify the association mapping relationship (also called corresponding relationship) between the development model and the target application class model based on the unique association identifier.

[0088] Based on the association mapping relationship between the development model and the target application class model, the modified content of the target application class model can be identified; according to the modified content of the target application class model, the development model can be synchronously updated to ensure the accurate synchronization of operations such as attribute modification and structural adjustment, and avoid merging problems such as attribute duplication and conflict.

[0089] When the target application class model is modified on the software design collaboration platform and pushed back to the R&D platform, the R&D platform can automatically identify the modified content of the target application class model based on the association mapping relationship between the development model and the target application class model, and synchronously update the development model. This can ensure the accurate synchronization of operations such as attribute modification and structural adjustment, avoid duplicate attribute creation or data loss, and achieve two-way consistent updates of cross-platform models.

[0090] In this embodiment, when the target application class model is merged or updated, the association mapping relationship between the development model and the target application class model is identified based on the unique association identifier to identify the modified content of the target application class model, and the development model is synchronously updated, thereby realizing real-time, two-way synchronous update of the models between the two platforms.

[0091] In one embodiment, the method provided by the present application also includes: when updating the development model, identifying the association mapping relationship between the development model and the target application class model based on the unique association identifier; identifying the modified content of the development model based on the association mapping relationship between the development model and the target application class model; and synchronously updating the target application class model according to the modified content of the development model.

[0092] When updating the development model, the association mapping relationship between the development model and the target application class model is identified based on the unique association identifier; the modified content of the development model can be automatically identified based on the association mapping relationship between the development model and the target application class model; according to the modified content of the development model, the target application class model is synchronously updated, thereby ensuring the accurate synchronization of operations such as attribute modification and structural adjustment, and avoiding duplicate attribute creation or data loss, and realizing bidirectional consistency update of cross-platform models.

[0093] In this embodiment, when the development model is updated, the association mapping relationship between the development model and the target application class model is identified based on the unique association identifier to identify the modified content of the development model and synchronize the target application class model, thereby realizing real-time, two-way synchronous update of the models between the two platforms.

[0094] In one embodiment, the method provided by the present application also includes: when merging several target application class models, matching the model elements in the several target application class models through unique association identifiers; when there is a match between the model elements in the several target application class models, determining the model element as a matching model element; and merging the matching model elements according to a conflict resolution strategy.

[0095] When merging several target application class models, the model elements in the several target application class models can be matched through unique association identifiers; specifically, the model elements in the several target application class models can be matched with the model elements already existing in the database. If no match is found, the model element is determined to be a newly added model element.

[0096] When there is a match between model elements in several target application class models, the model element is determined as a matching model element; and the matching model elements can be merged according to a conflict resolution strategy.

[0097] In this embodiment, when merging several target application class models, the model elements in the several target application class models are matched through unique association identifiers; when there is a match between the model elements in the several target application class models, the model element is determined as a matching model element; according to the conflict resolution strategy, the matching model elements are merged to ensure that the merged target application class model functions normally and is structurally compliant, avoid potential defects introduced due to improper handling of model element conflicts, and reduce the number of problems in subsequent development stages.

[0098] In one embodiment, the conflict resolution strategy is a priority strategy. According to the conflict resolution strategy, the matching model elements are merged. The specific steps are as follows: according to a pre-set priority rule, the priority of each matching model element is determined; according to the priority of each matching model element, the matching model elements are merged.

[0099] Model elements in several target application class models can be matched with model elements already existing in the database through unique association identifiers. When there are matches between model elements in several target application class models, the model elements in the several target application class models can be called source model elements.

[0100] The priority rules of "database model element priority" or "source model element priority" can be pre-set. The priority of each matching model element can be determined based on the pre-set priority rules.

[0101] The matching model elements may be merged according to their priorities.

[0102] In this embodiment, the priority of each matching model element is determined according to a preset priority rule to merge the matching model elements, thereby avoiding duplication or overlap of matching model elements.

[0103] In one embodiment, the conflict resolution strategy is a manual intervention strategy. According to the conflict resolution strategy, the matching model elements are merged. The specific steps are as follows: displaying a visual merging interface; adjusting the matching model elements according to the user's matching model element adjustment operation in the visual merging interface, and merging the matching model elements.

[0104] You can show users Figure 5 The visual merging interface shown; users can perform matching model element adjustment operations in the visual merging interface, such as selectively retaining attribute operations or determining merging method logic operations; matching model elements can be merged based on the user's matching model element adjustment operations in the visual merging interface.

[0105] In this embodiment, matching model elements are merged according to the matching model element adjustment operation performed by the user in the visual merging interface, so that the merged target application class model can better meet business requirements.

[0106] In order to better understand the above method, an application example of the method for generating an application class model of the present application is described in detail below.

[0107] In the digital transformation of enterprises, software design collaboration platforms and software development platforms have become core R&D tools. The former supports architects in completing key software design activities, ensuring design quality and efficiency; the latter assists developers in achieving efficient software development. The typical R&D model involves completing application model design on the software design collaboration platform, pushing it to the R&D platform for conversion into a physical model, which then drives code generation.

[0108] With the diversification of enterprise businesses, the demand for iterative software system upgrades has surged. Some legacy systems suffer from missing design results: only existing physical models are retained on the software development platform, while corresponding application models are not available on the software design collaboration platform. In this context, when developing new projects, designers need to expend considerable effort to reverse-derive application models from the physical models on the R&D platform and manually enter them into the software design collaboration platform. This process is not only time-consuming and labor-intensive, but also prone to data errors due to manual operation, resulting in inconsistent model data between the two platforms, seriously affecting R&D efficiency and quality. There is an urgent need to use technical means to achieve automated conversion and two-way synchronization of model data to improve the enterprise-level software development ecosystem.

[0109] Currently, to address the issue of manual entry of application class models, model data migration can be achieved with the help of a tool called model data software. Its main function is to convert entity models into model data files containing structured data such as the entity model's class model information (such as class name, attributes, methods, inheritance relationships, and interfaces), entity relationship diagrams, and unified modeling language diagrams. The specific process is as follows: software designers export entity models from the enterprise software development platform as model data files. This file format is compatible with common model data software in the industry and contains the class model information required for subsequent design. Subsequently, using the import function provided by the software design collaboration platform, the class model data in the model data file is imported into the design platform, completing the transfer of model data from the R&D platform to the design platform and reducing manual entry operations.

[0110] However, this solution still has significant limitations: in addition to manual operation costs, converting the physical model of the software development platform into the application model of the software design collaboration platform through model data files also faces two core technical bottlenecks: lack of data integrity and failure of cross-platform model association.

[0111] (1) Data information loss and high completion costs: The model data file format has model-like expression limitations and cannot fully carry the key metadata of the entity model of the software development platform. For example, information such as Uniform Resource Locator (URL) references, business annotations, security constraints, and performance indicator requirements in the entity model are easily lost during the conversion process, forcing designers to manually complete the information by consulting documents and tracing historical records. This type of supplementary work is not only time-consuming and labor-intensive, but may also cause missing or incorrect model content due to incomplete information tracing or misunderstanding, directly affecting the quality of design results and the subsequent development process.

[0112] (2) Cross-platform model association breaks and merge conflicts: The existing model data file conversion method only realizes one-way data migration and fails to establish a two-way mapping relationship between the application class model of the software design collaboration platform and the entity model of the software development platform. When the designer iteratively optimizes the application class model on the software collaboration platform (such as modifying attribute names, adjusting structures, etc.) and pushes the model back to the software development platform, the system cannot accurately identify the model changes due to the lack of corresponding relationship identification, resulting in data merging anomalies. For example, if the attribute name in the application class model is changed from demo code (demoCode) to demo code 1 (demoCode1), the software development platform will mistakenly retain the new and old attributes at the same time due to the lack of mapping basis, resulting in duplicate fields or data overwriting conflicts, seriously damaging the entity model structure, increasing development and debugging costs, and even causing project delay risks.

[0113] (3) Insufficient technical compatibility and scalability: The conversion method of model data files is highly dependent on the support of third-party tools, and there is a risk of format compatibility. For example, the syntax differences of different versions of model data files may cause parsing failures. At the same time, the solution lacks standardized interfaces and is difficult to adapt to the personalized functional requirements of the company's self-developed platform. It cannot flexibly respond to changes in business scenarios, which hinders the automation and integration of the R&D tool chain.

[0114] To solve the above problem, this embodiment provides a method for generating an application class model, which is mainly divided into the following steps:

[0115] 1. Standardized export of development results package:

[0116] A standardized development package export function can be built into the software development platform to store core development models, such as entities, enumerations, and exceptions, in structured storage files. These files can be in the JSON (JavaScript Object Notation) format. These development model structured storage files (referred to as packages) adhere to the following unified data specifications:

[0117] (1) Entity model: Contains basic information (such as model name, version), attribute definition, method signature, data type declaration, and parent entity inheritance relationship, etc., and fully retains the core attributes and structure of the entity model during the development phase;

[0118] (2) Enumeration model: records basic information, attribute list, method description and enumeration item definition;

[0119] (3) Exception model: stores basic information and error coding information.

[0120] 2. Intelligent conversion framework and rule engine:

[0121] You can design on the software design collaboration platform Figure 3 The extensible transformation framework shown in the figure supports customizing model transformation rules in configuration files to achieve mapping of entity models (source models) to target application class models. The target application class model is the application class model corresponding to the development model.

[0122] 2.1. Variable reference conversion:

[0123] By configuring the input entity model variables and the target application class model output variables, you can determine the variable reference conversion rules of the conversion framework and implement direct mapping of attribute values. For example:

[0124] <rule input="attr1" output="classAttr1" / > ;

[0125] Among them, rule means rule, input means input, attr means attribute, output means output, and classAttr means class attribute.

[0126] The variable reference conversion rules of the conversion framework have the following characteristics:

[0127] (1) Deep nested parsing: supports nested.attr1.attr2 multi-level attribute path parsing, and implements complex data extraction through the JSON Path expression engine; nested means nested;

[0128] (2) Type adaptation mechanism: built-in automatic type conversion rules (such as string to date), and provides a custom type converter extension interface.

[0129] 2.2, Custom expression:

[0130] According to the expression conversion rules in the conversion framework, flexible data processing can be achieved through the Expression Language (EL) syntax, and the expressions in the structured storage files of the development model can be converted into data processing operations on multiple variables. For example, the expressions in the structured storage files of the development model can be converted into splicing, interception or function calculation operations of multiple input variables to obtain the expression of the target application class model.

[0131] For example, attr2 and attr3 of the entity model are concatenated and assigned to the target application class model:

[0132] <rule expression="${attr2}_${attr3}" output="classAttr2" / > ;

[0133] Among them, rule means rule, input means input, attr means attribute, output means output, and classAttr means class attribute.

[0134] Expression transformation rules can integrate mathematical operations and string processing with built-in functions, such as the rounding function (round()) and the substring function (substring()).

[0135] 2.3. Custom function conversion rules:

[0136] Functions in the structured storage files of the development model, including complex business logic, can be converted to deep conversion by calling external functions (such as Java class methods) based on the function conversion rules in the conversion framework to perform logical calculations on the functions in the structured storage files of the development model. The return value of the external function is used as a variable in the target application class model. The sample configuration is as follows:

[0137] <rule output="classAttr3"> ;

[0138] <param1> attr4< / param1> ;

[0139] <param2> attr5< / param2> ;

[0140] <method> com.xx.XXClass.XXmethod< / method> ;

[0141] < / rule> ;

[0142] "rule" represents a rule, "output" represents an output, "attr" represents an attribute, "classAttr" represents a class attribute, "param" represents a parameter, and "method" represents a method. "com.xx" represents a package name, "XXClass" represents a class name, and "Xxmethod" represents a method in that class. "com.xx.XXClass.XXmethod" is often used to describe the full path to a specific method in Java.

[0143] 3. Intelligent conflict detection and multi-strategy merging mechanism:

[0144] 3.1. Conflict Detection

[0145] Based on the bidirectional mapping system, data conflicts are automatically detected. Model elements in several target application class models can be matched with model elements already existing in the database through unique association identifiers. If no match is found, the model element is determined to be a new model element. When there is a match between model elements in several target application class models, the conflict handling process is triggered, and the model element is determined to be a matching model element. According to the conflict resolution strategy, the matching model elements are merged.

[0146] 3.2 Conflict Resolution Strategy

[0147] Priority strategy: You can pre-set priority rules for "database model elements first" or "source model elements first." You can prioritize matching model elements based on these rules. You can also merge matching model elements based on their priorities to avoid duplication or overlap.

[0148] Manual intervention strategy: You can show users how Figure 5 The visual merging interface shown; users can perform matching model element adjustment operations in the visual merging interface, such as selectively retaining attribute operations or determining merging method logic operations; matching model elements can be merged based on the user's matching model element adjustment operations in the visual merging interface.

[0149] 4. Construction of bidirectional association mapping:

[0150] A cross-platform model association mapping can be established between the software design collaboration platform and the R&D platform, generating a unique and traceable association identifier for each model element (attribute, method, and class) between the development model and the target application class model, and storing it in the database mapping table. Figure 4 shown.

[0151] When merging or updating the target application class model, the software design collaboration platform can automatically identify the association mapping relationship (also called corresponding relationship) between the development model and the target application class model based on the unique association identifier.

[0152] Based on the association mapping relationship between the development model and the target application class model, the modified content of the target application class model can be identified; according to the modified content of the target application class model, the development model can be synchronously updated to ensure the accurate synchronization of operations such as attribute modification and structural adjustment, and avoid merging problems such as attribute duplication and conflict.

[0153] When the target application class model is modified on the software design collaboration platform and pushed back to the R&D platform, the R&D platform can automatically identify the modified content of the target application class model based on the association mapping relationship between the development model and the target application class model, and synchronously update the development model. This can ensure the accurate synchronization of operations such as attribute modification and structural adjustment, avoid duplicate attribute creation or data loss, and realize real-time, two-way synchronous update of models between the two platforms.

[0154] This embodiment provides a method for generating an application class model. This method deeply analyzes, converts, and generates an application class model based on existing development results. This method can reversely update the physical model (development results) of existing projects on the software development platform to the application class model (design results) of the software design collaboration platform. This method has the following innovative features:

[0155] (1) Lossless parsing and conversion mechanism for development results: Based on the deep parsing and completion technology of entity models (development results), a parsing and conversion framework for entity models is constructed by performing structured parsing of entity models. In addition to conventional class structure information, it can also accurately identify Uniform Resource Locator (URL) information, annotations, security constraints, performance constraints, and other information in the entity model. When converting to an application class model, standardized metadata tags and mapping rules are used to completely migrate this information, avoiding a large amount of manual completion work for designers and achieving efficient and complete conversion of development results.

[0156] (2) Intelligent conflict detection and resolution strategy: Provides an intelligent conflict detection algorithm that automatically scans and detects potential conflicts in attributes, structures, etc. before merging application models. Combined with pre-set conflict resolution rules (such as priority strategy and manual intervention strategy), conflicts are automatically handled or a visual conflict prompt interface is provided to assist developers in efficiently completing model merging and improve the reliability and efficiency of model conversion and collaborative design.

[0157] (3) Model association mapping system: Create a cross-platform dynamic association identification system. When converting the software development platform entity model into the software design collaboration platform application model, the software design collaboration platform establishes the model association mapping relationship and generates a unique and traceable association identifier for each model element. When merging application models, the association identifier is used to establish a precise mapping relationship. The system can accurately identify the modified content based on the mapping relationship and avoid merge problems such as attribute duplication and conflict. At the same time, when the application model is modified on the design collaboration platform and pushed back to the software development platform, the software development platform can also accurately identify the modified content based on the mapping relationship, avoid merge problems such as attribute duplication and conflict, and achieve two-way consistency update of cross-platform models.

[0158] The method for generating an application class model provided in this embodiment has the following beneficial effects:

[0159] (1) Reduce manual intervention: Automatic completion assistance greatly reduces the workload of designers in manually completing information, significantly improving R&D efficiency.

[0160] (2) Ensure model quality: Visual conflict prompts and regularized conflict resolution methods ensure that the merged model functions properly and complies with structural requirements, avoid potential defects introduced by improper conflict handling, and reduce the number of problems in subsequent development stages.

[0161] (3) The bidirectional association mapping system supports bidirectional collaborative updates: through real-time maintenance of the mapping table, it supports bidirectional synchronization of model modifications between the two platforms. Modifications on either platform can be quickly and accurately reflected on the other platform, avoiding information lag and version inconsistency, and achieving seamless cross-platform collaboration.

[0162] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps. It is understandable that the various steps in different embodiments can be freely combined as needed, and the various non-contradictory schemes formed by the combination all fall within the scope of protection of this application.

[0163] Based on the same inventive concept, the embodiments of the present application also provide an apparatus for generating an application class model for implementing the aforementioned method for generating an application class model. The implementation solution provided by this apparatus is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of the embodiments of one or more apparatuses for generating application class models provided below can be found in the above-mentioned limitations of the method for generating application class models, and will not be repeated here.

[0164] In an exemplary embodiment, Figure 6 As shown, a device for generating an application class model is provided, wherein:

[0165] The variable conversion module 601 is used to map the variables in the structured storage file of the development model according to the variable reference conversion rules in the conversion framework to obtain the variables of the target application class model; the target application class model is the application class model corresponding to the development model;

[0166] An expression conversion module 602 is configured to convert the expression in the structured storage file of the development model into a data processing operation of multiple variables according to the expression conversion rules in the conversion framework, thereby obtaining an expression of the target application class model;

[0167] Function conversion module 603, for calling an external function to perform logical calculations on the functions in the structured storage file of the development model according to the function conversion rules in the conversion framework, and using the return value of the external function as a variable of the target application class model;

[0168] The model generation module 604 is used to generate a target application class model according to the variables and expressions of the target application class model.

[0169] In one embodiment, the device also includes an association mapping module, which is used to: generate a unique association identifier for each model element between the development model and the target application class model; the model elements include attributes, methods and classes; based on the unique association identifier corresponding to each model element, establish an association mapping relationship between the development model and the target application class model.

[0170] In one embodiment, the device also includes a synchronous update module, which is used to: when merging or updating the target application class model, identify the association mapping relationship between the development model and the target application class model based on the unique association identifier; identify the modified content of the target application class model based on the association mapping relationship between the development model and the target application class model; and synchronously update the development model according to the modified content of the target application class model.

[0171] In one embodiment, the synchronous update module is also used to: when updating the development model, identify the association mapping relationship between the development model and the target application class model based on the unique association identifier; identify the modified content of the development model based on the association mapping relationship between the development model and the target application class model; and synchronously update the target application class model according to the modified content of the development model.

[0172] In one embodiment, the device also includes a model element merging module, which is used to: when merging several target application class models, match the model elements in the several target application class models through unique association identifiers; when there is a match between the model elements in the several target application class models, determine the model element as a matching model element; and merge the matching model elements according to a conflict resolution strategy.

[0173] In one embodiment, the model element merging module is further configured to: determine the priority of each matching model element according to a preset priority rule; and merge the matching model elements according to the priority of each matching model element.

[0174] In one embodiment, the model element merging module is further configured to: display a visual merging interface; and merge matching model elements according to a user's adjustment operation on matching model elements on the visual merging interface.

[0175] Each module in the above-mentioned application class model generation device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0176] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of an embodiment of the method for generating an application class model. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating an application class model is implemented.

[0177] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0178] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0179] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0180] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0181] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0182] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0183] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0184] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for generating an application class model, characterized in that: The method comprises: According to the variable reference conversion rules in the conversion framework, the variables in the structured storage file of the development model are mapped to obtain the variables of the target application class model; the target application class model is the application class model corresponding to the development model; According to the expression conversion rules in the conversion framework, the expression in the structured storage file of the development model is converted into a data processing operation of multiple variables to obtain the expression of the target application class model; According to the function conversion rules in the conversion framework, an external function is called to perform logical calculation on the function in the structured storage file of the development model, and the return value of the external function is used as a variable of the target application class model; Generate a target application class model based on the variables and expressions of the target application class model.

2. The method according to claim 1, characterized in that After generating the target application class model according to the variables and expressions of the target application class model, the method further includes: Generate a unique association identifier for each model element between the development model and the target application class model; the model elements include attributes, methods and classes; Based on the unique association identifier corresponding to each model element, an association mapping relationship is established between the development model and the target application class model.

3. The method according to claim 2, characterized in that The method further comprises: When merging or updating the target application class model, the association mapping relationship between the development model and the target application class model is identified based on the unique association identifier; Identifying the modified content of the target application class model based on the association mapping relationship between the development model and the target application class model; The development model is synchronously updated according to the modified content of the target application class model.

4. The method according to claim 2, characterized in that The method further comprises: When updating the development model, the association mapping relationship between the development model and the target application class model is identified based on the unique association identifier; Identifying the modified content of the development model based on the association mapping relationship between the development model and the target application class model; According to the modified content of the development model, the target application class model is synchronously updated.

5. The method according to claim 1, wherein The method further comprises: When merging several target application class models, matching the model elements in the several target application class models by using the unique association identifier; When there is a match between the model elements in the plurality of target application class models, determining the model element as a matching model element; Merge matching model elements based on the conflict resolution strategy.

6. The method according to claim 5, characterized in that The conflict resolution strategy is a priority strategy. The merging of matching model elements according to the conflict resolution strategy includes: Determine the priority of each matching model element according to the pre-set priority rules; The matching model elements are merged according to their priorities.

7. The method according to claim 5, characterized in that The conflict resolution strategy is a manual intervention strategy. The merging of matching model elements according to the conflict resolution strategy includes: Display the visual merge interface; According to the user's adjustment operation of the matching model elements in the visual merging interface, the matching model elements are merged.

8. A device for generating an application class model, characterized in that: The device comprises: A variable conversion module is used to map the variables in the structured storage file of the development model according to the variable reference conversion rules in the conversion framework to obtain the variables of the target application class model; the target application class model is the application class model corresponding to the development model; An expression conversion module, configured to convert the expression in the structured storage file of the development model into a data processing operation of multiple variables according to the expression conversion rules in the conversion framework, so as to obtain the expression of the target application class model; A function conversion module is used to call an external function to perform logical calculations on the functions in the structured storage file of the development model according to the function conversion rules in the conversion framework, and use the return value of the external function as a variable of the target application class model; The model generation module is used to generate the target application class model according to the variables and expressions of the target application class model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.