A rapid development method for enterprise applications based on a common data model
Through the rapid development method of enterprise applications based on a common data model and dynamic adaptation mechanism, the problems of low efficiency and poor flexibility in traditional development methods are solved, rapid development and expansion are achieved, and it is suitable for enterprise applications in complex business systems and multiple business scenarios.
Patent Information
- Application Number
- CN202411629919.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-11-15
AI Technical Summary
Traditional enterprise application software development methods result in long development cycles, high maintenance costs, poor system flexibility, and difficulty in quickly responding to market and business needs.
Adopting a rapid enterprise application development method based on a common data model and dynamic adaptation mechanism, by building standardized entity definitions, business logic and relationship models, combining automation tools and modular components, dynamically adapting business rules, and achieving rapid development and expansion.
It improves development efficiency, reduces costs, enhances system flexibility and scalability, and can quickly respond to changes in business needs. It is suitable for enterprise application development in complex business systems and multiple business scenarios.
Smart Images

Figure CN119759338B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular to a method for rapid development of enterprise applications based on a universal data model. Background Art
[0002] In the process of enterprise informatization and digital transformation, the development of enterprise application software needs to quickly respond to market and business needs. However, traditional development methods often involve extensive custom development, data model redesign, and system integration, resulting in long development cycles, high maintenance costs, and poor system flexibility.
[0003] There is an urgent need for a standardized, modular, and easily extensible development approach that can improve development efficiency and system reusability while maintaining flexibility and reducing development costs. A development approach based on a common enterprise data model can effectively address these issues. By providing a unified data structure and business logic framework, it enables the rapid development, deployment, and expansion of enterprise applications. Summary of the Invention
[0004] The purpose of the present invention is to solve and improve the efficiency of enterprise application software development, and to provide an enterprise application rapid development method based on a common data model and a dynamic adaptation mechanism, which can avoid a large amount of repeated development work.
[0005] To achieve the above objectives, the present invention designs a method for rapid development of enterprise applications based on a universal data model, the method comprising:
[0006] S1. Build basic models and tools, including:
[0007] S11. Build a universal data model, which includes standard entity definitions, business logic, and relationship models. It covers common business scenarios and data structures of enterprises and can be adapted to different business needs. Developers can quickly develop business applications based on this model to ensure data consistency and standardization.
[0008] S12. Build an automation tool, which includes a database structure generator, an API (Application Program Interface) interface generator, and a basic business logic generator;
[0009] S13. Construct modular components, wherein the modules include at least one of a customer management module, an order management module, an inventory management module, a product management module, a supplier management module, a reporting and analytics module, and an access control module. The present invention adopts a modular design, and each business module can be developed independently and integrated through standardized interfaces.
[0010] The customer management module components include customer entities, customer management services and customer-related APIs;
[0011] The order management module components include order entity, order status management, order status and order-related APIs;
[0012] The inventory management module components include inventory entities, inventory scheduling services, inventory logs and inventory-related APIs;
[0013] The product management module components include product entities, product classification and management services, and product-related APIs;
[0014] The supplier management module components include supplier entities, supplier management services and supplier-related APIs;
[0015] The report and analysis module components include a data report generator, protective gear analysis services and report-related APIs;
[0016] The rights management module components include user entities, role entities, rights allocation services and rights-related APIs;
[0017] S14. Build a dynamic adaptation mechanism, including pre-defining business rule templates and creating a business rule engine; the business rule templates describe the logical relationships of common business rules, making it easier for users to configure business rules based on actual business needs; the business rule engine is used to parse and process changes in business needs.
[0018] Step S1 is the preliminary preparation work, and steps S11, S12, S13, and S14 are executed in no particular order;
[0019] S2. Requirements analysis and rule definition, input rules, including
[0020] S21. Determine a rule type according to business requirements, where the rule type includes at least one of a condition-triggered rule, a process control rule, and a data verification rule;
[0021] S22. Define business rules. Create or select corresponding rules based on rule templates. Through the management console, business personnel can define new business rules and use rule templates to set trigger conditions and operations.
[0022] S23, rule storage and loading, storing the defined rules in the rule library and dynamically loading them through the rule engine;
[0023] S3. Module selection and component combination: Select the required standard modules based on business needs, including:
[0024] S31. Determine the required components and which existing components need to be used to meet the new requirements;
[0025] S32. Configure the integration relationship of components, including data interaction and rule triggering;
[0026] The data interaction includes implementing data interaction between components through REST API, RPC or message queue;
[0027] The rule triggering includes calling the rule engine to evaluate the business rules, determine whether the conditions are met and execute the corresponding business logic;
[0028] S4. Dynamic adaptation of models and rules, including rule integration and parsing and dynamic adjustment of data models. The rule integration and parsing include flexible adaptation of business logic using a rule engine; the dynamic adjustment of data models includes adjusting data structures according to business rules.
[0029] S5, system assembly and rapid application delivery, including module and component integration, testing and rollout, hot updates, and real-time adaptation;
[0030] The module and component integration involves registering selected modules or components (such as order management, customer management, coupon management, etc.) into the system through a service registration and discovery mechanism (such as Eureka) based on existing components, component combinations, and modules, and exposing services externally through an API gateway. Module integration utilizes standardized interfaces: Modules communicate with each other through REST APIs, RPCs, or message queues to ensure efficient collaboration between different modules.
[0031] The testing and launch include ensuring the correctness of rules and normal interactions between modules through automated testing, and using continuous integration and deployment (CI / CD) tools to achieve rapid launch.
[0032] The hot update and real-time adaptation include business personnel adjusting rules in real time according to changes in business needs through the management console, and dynamically loading them into the rule engine so that the system can respond to these changes immediately.
[0033] Furthermore, the general data model includes several items of a customer management model (Customer Management Model), an order management model (Order Management Model), an inventory management model (Inventory Management Model), a supplier management model (Supplier Management Model), and a product management model (ProductManagement Model).
[0034] Furthermore, the database structure generator automatically generates an SQL (Structured Query Language) script of the database table structure according to the model structure by parsing the data model definition file.
[0035] Furthermore, the API interface generator generates CRUD interfaces (including create, read, update, and delete interfaces) based on the REST API standard (a Web API designed based on the REST architectural style), providing operations corresponding to database tables. These interfaces are batch-created through the script generator to implement API support for multiple data models.
[0036] Furthermore, the basic business logic includes general business operations and data processing logic; the basic business logic generator includes code for automatically generating the basic business logic according to the data model to facilitate data transmission between the API layer and the database layer.
[0037] Furthermore, the customer management module manages several items including customer information, tags, and activity records, and supports business logic including at least one of adding, editing, querying, and deleting customers, as well as customer tag management and customer activity record management;
[0038] The order management module manages several items, including order creation, modification, status changes (including unpaid, shipped, or completed), payment, cancellation, and refunds, covering the entire lifecycle of orders. Supported business logic includes new order creation (creating orders and associating them with customers), order status management (handling order status changes from unpaid to shipped or completed), and order cancellation and refunds. This module implements the complete order management process from order placement to delivery, including several items, including order generation and query, order status management (such as paid, shipped, completed, etc.), order payment management, and order records.
[0039] The inventory management module manages several items including inventory query, warehousing, outbound delivery, or inventory transfer (transferring inventory between multiple warehouses). The supported business logic includes inventory query (such as querying the current inventory quantity based on the product ID), inventory change records (warehousing, outbound delivery, inventory transfer), and warehouse location management.
[0040] The product management module manages several items including basic product information, categories, prices, and specifications. The supported business logic includes product addition and editing (managing product information, defining product specifications and prices) and product category management (defining different product categories and labels based on business needs).
[0041] The supplier management module manages several items including supplier information, commodity purchase price, and delivery time, and is applicable to procurement management systems. The supported business logic includes supplier basic information management (name, contact information, address, etc.), supplier commodity information (commodity category, price, delivery time), supplier scoring and rating, supplier information entry (adding and maintaining basic supplier information), and purchased commodity management (recording the commodities and prices that each supplier can provide).
[0042] The report and analysis module manages the generation of statistical reports for various types of data in the system, supports analysis of customer, order, inventory and other data, and supports business logic including the generation of order statistics reports (statisticing the number and amount of orders over a certain period of time), customer behavior analysis (analyzing customer consumption behavior, purchasing preferences, etc.), customer activity statistics, order volume and sales analysis, inventory consumption and replenishment analysis, etc.
[0043] The management content of the permission management module includes managing user and role permissions, and the supported business logic includes user management (user information in the management system), role and permission allocation (defining permissions for different roles to ensure permission control for different users to access the module).
[0044] Furthermore, the combined application system of the modules includes a CRM system (customer relationship management), an ERP system (enterprise resource planning), an e-commerce platform or a supply chain management system;
[0045] The CRM system is composed of a customer management module, a reporting and analysis module, and an order management module. It stores and manages customer information, records and analyzes customer purchasing behavior, manages customer order history, and generates customer activity and consumption reports for marketing analysis. The system can help sales teams understand customer needs, customer lifecycles, and consumption trends to support precision marketing and customer care.
[0046] The ERP system is composed of a customer management module, an order management module, an inventory management module, a supplier management module, a product management module, and a report and analysis module. It manages customer and supplier information, inventory and order management, and the entire process from procurement, production, inventory to sales. It analyzes inventory consumption, order volume, supplier performance, etc., providing data support for decision-making. The ERP system can help enterprises manage resources efficiently, optimize production and sales processes, and realize data sharing among departments, thereby improving operational efficiency.
[0047] The e-commerce platform is composed of a customer management module, an order management module, a product management module, an inventory management module, and a reporting and analysis module. It manages the display and classification of online products, supports customer ordering, payment, and order tracking, updates inventory in real time to prevent overselling or out-of-stock situations, analyzes customer preferences and product sales, and helps the e-commerce platform make product recommendations and promotions. The platform can provide a smooth shopping experience, ensure synchronized inventory updates, and generate personalized recommendation lists through customer analysis to improve conversion rates.
[0048] The supply chain management system is composed of an inventory management module, a supplier management module, and a reporting and analysis module. It maintains the inventory status and change history of goods, realizes inventory allocation and replenishment, manages and evaluates suppliers, tracks the supply cycle and delivery time of goods, generates inventory consumption reports and supplier performance reports, and supports supply chain optimization. The supply chain management system helps enterprises optimize inventory, ensure the efficient operation of all links in the supply chain, and reduce the risk of out-of-stock or backlogs.
[0049] Furthermore, a modular component manager is deployed to dynamically load, unload and update modules.
[0050] Furthermore, the business rule templates include order discount rule templates, inventory alarm rule templates, customer loyalty points rule templates, automated approval rule templates, coupon issuance rule templates, payment failure retry rule templates, product price automatic adjustment rule templates, order cancellation rule templates, product promotion rule templates, membership upgrade rule templates, delayed delivery rule templates, etc.
[0051] Furthermore, the conditional triggering rules include rules for giving customers discounts when the order amount exceeds a certain value, the process control rules include specific process approval rules or dynamic process adjustment rules when boundary conditions are met, and the data verification rules include whether the identity information entered by the customer complies with the prescribed rules.
[0052] Furthermore, the rule integration and parsing includes rule parsing and rule execution; the rule parsing includes when the business scenario changes, the rule engine reads the relevant rule template, parses the rules through the rule parser, and determines the business logic that needs to be executed; the rule execution includes executing corresponding operations based on the results of the parsing, such as applying discounts to orders, sending notifications to administrators, increasing customer points, etc.
[0053] Furthermore, the dynamic adjustment of the data model includes dynamic configuration generation and seamless integration. The dynamic configuration generation includes the rule engine dynamically generating system configurations that adapt to the current business scenario based on the parsing results of the business rules. These configurations may involve data models in the database, business logic of the application, etc.; the seamless integration includes generating configurations through APIs or directly updating the system's configuration files, so that the system can seamlessly adapt to new business scenarios without the need for large-scale code reconstruction.
[0054] Furthermore, the business rule template is stored in a rule base, which includes a database and / or storage files. That is, a database table can be selected to store rule definitions for easy version control and update, or the rule definitions can be stored as files and loaded into the system through an API.
[0055] Furthermore, the construction of the dynamic adaptation mechanism includes designing a rule management console to facilitate business personnel to manage rules. Rules can be added, deleted, modified, and checked through the management console, which facilitates rapid response to business changes.
[0056] Furthermore, the method also includes initializing the rule engine and integrating it with the components before executing step S4; the rule engine initialization includes that when the system starts, the rule engine loads all rule definitions, creates a rule parser, and maintains the hot update capability of these rules so that they can take effect immediately when business rules change; the component integration includes that the rule engine is integrated with the system components through the interface adaptation layer, which can flexibly define and execute rules for different business scenarios.
[0057] The advantages and beneficial effects of the present invention are as follows: The present invention proposes a method for rapid development of enterprise applications based on a universal data model, which aims to solve the problems of low development efficiency and complex system integration in traditional development methods by building a universal data model and modular business components. Through model-driven automated development and the integration of modular components, this method enables enterprises to quickly build applications for different business scenarios, reduce the amount of manual coding, and reduce development and maintenance costs. For some applications with customized requirements or applications facing changing requirements, the enterprise's internal IT technicians can complete customized application development without the need for a professional software company; even if the internal technical personnel are insufficient, professional software companies only need to add corresponding data models and / or modular components to complete the development, greatly reducing the workload. This method is particularly suitable for enterprise application development that integrates complex business systems and multiple business scenarios.
[0058] This invention is suitable for various enterprise application development scenarios, particularly those requiring frequent adjustments to business requirements or rapid deployment. Through this invention, enterprises can develop and deploy efficient application systems in a short period of time, improving system flexibility and scalability. This method is applicable across multiple industries, particularly in complex business systems such as enterprise resource planning (ERP) and customer relationship management (CRM). Thanks to its modular design and dynamic adaptation mechanism, this invention also offers excellent scalability and maintainability, adapting to the long-term development needs of enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 This is a flow chart of the enterprise application rapid development method of the universal data model of the present invention; DETAILED DESCRIPTION
[0060] The following embodiments are further described in conjunction with the accompanying drawings and examples. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Example 1:
[0061] like Figure 1 As shown, the present invention proposes a method for rapid development of enterprise applications based on a universal data model, the development method comprising:
[0062] S1. Build basic models and tools, including:
[0063] S11. Build a universal data model, which includes standard entity definitions, business logic, and relationship models. It covers common business scenarios and data structures of enterprises and can be adapted to different business needs. Developers can quickly develop business applications based on this model to ensure data consistency and standardization.
[0064] S12. Build an automation tool, which includes a database structure generator, an API (Application Program Interface) interface generator, and a basic business logic generator. The present invention is based on a common enterprise data model and uses automation tools to generate the database structure, API interface, and basic business logic required for the application. Developers only need to define business requirement parameters, and the system can automatically generate corresponding code and configuration files, greatly reducing the workload of manual coding and ensuring the flexibility and scalability of the system. The core of this process is that the automation tool can extract key information from the data model and generate SQL scripts, API controllers, and business logic code.
[0065] The implementation of the automation tool relies on parsing the structure of the enterprise's common data model and converting the definitions in the model into database tables, API controllers, and basic business logic code:
[0066] (1) Database structure generation: Generate SQL scripts based on the model to create and manage database tables;
[0067] (2) API interface generation: Generate CRUD interface code based on RESTful standards to support operations on model data;
[0068] (3) Business logic generation: Generate data validation, data conversion, and data access code to ensure data integrity and consistency.
[0069] This process significantly reduces developers' manual coding work and improves the development efficiency and scalability of enterprise applications.
[0070] S13. Construct modular components, wherein the modules include at least one of a customer management module, an order management module, an inventory management module, a product management module, a supplier management module, a reporting and analytics module, and an access control module. The present invention adopts a modular design, and each business module can be developed independently and integrated through standardized interfaces.
[0071] The customer management module components include customer entities, customer management services and customer-related APIs;
[0072] The order management module components include order entity, order status management, order status and order-related APIs;
[0073] The inventory management module components include inventory entities, inventory scheduling services, inventory logs and inventory-related APIs;
[0074] The product management module components include product entities, product classification and management services, and product-related APIs;
[0075] The supplier management module components include supplier entities, supplier management services and supplier-related APIs;
[0076] The report and analysis module components include a data report generator, protective gear analysis services and report-related APIs;
[0077] The rights management module components include user entities, role entities, rights allocation services and rights-related APIs;
[0078] The standardized interfaces include REST (Representational State Transfer) APIs, RPC (Remote Procedure Calls), or message queues (such as Kafka). This embodiment uses the REST API as an application synchronous call interface for frequent data exchange and service calls between modules. RPC is used for remote procedure calls, which require low-latency calls. The calling module does not need to worry about the underlying implementation and can call remote services like local methods. Message queues (such as Kafka) are used for asynchronous communication to decouple strong dependencies between modules and are suitable for business logic that requires asynchronous processing, especially in high-concurrency scenarios.
[0079] By splitting the system into multiple independent business module components, the present invention has the following advantages:
[0080] - Flexibility: Modules can be added or deleted flexibly according to changes in business needs. Each module can be developed and upgraded independently without affecting the normal operation of other modules.
[0081] - Low coupling: Each module independently encapsulates its own business logic and data storage. Modules are integrated through standardized APIs, reducing interdependencies and ensuring low coupling between modules, making them easier to replace or expand.
[0082] - High scalability: Module combinations can be flexibly increased or decreased according to business needs to meet different application scenarios;
[0083] - Easy to maintain: The functions and logic of each module are relatively independent, making it easy to locate problems and perform maintenance.
[0084] S14. Build a dynamic adaptation mechanism, including pre-defining business rule templates and creating a business rule engine. The business rule templates describe the logical relationships of common business rules, allowing users to configure business rules based on actual business needs. The business rule engine is used to parse and process changes in business needs. Common business rule engine tools, such as Drools, can dynamically define business rules and automatically execute different business logic based on different conditions. Business rules are defined by users using a visual format or a rule language (such as DRL) based on the business rule templates and stored in a database or configuration file.
[0085] Business rule templates are stored in a rule repository. These rule templates are defined or updated by administrators through the management console and can be adjusted at any time to meet different business needs. The rule repository includes databases, XML files, JSON files (a file format using JavaScript Object Notation), and YAML files (a data serialization format commonly used for storing configuration files, code metadata, and data exchange). Different formats can define different rule storage structures, and can be edited and managed through a user-friendly interface.
[0086] In dynamic adaptation of business scenarios, administrators or the system can quickly adjust system configurations based on business changes by using predefined business rule templates. These rule templates store operational definitions that can be adjusted to specific business needs, allowing the system to flexibly respond to business changes. The rule engine uses these templates to parse and dynamically generate the configuration required for the current business scenario, making the system highly adaptable and flexible.
[0087] The core function of the rule engine is to parse the input business requirements and dynamically generate configurations based on the business rule templates. The business rule engine can achieve:
[0088] (1) Rule storage and management: All business rule templates can be stored in a database or configuration file for easy management and adjustment;
[0089] (2) Rule parsing and execution: The rule engine reads the template, executes the corresponding rules according to the current business conditions, and adjusts the data model and business logic;
[0090] (3) Dynamic adaptation: Ability to dynamically adjust the system's entity model, business logic, or configuration information based on rule templates to ensure that the system responds quickly to changes in business needs.
[0091] To address the diverse nature of enterprise business scenarios, this paper provides a dynamic adaptation mechanism. This mechanism uses a business rules engine to analyze changing business requirements and automatically adjust the corresponding data model and business logic. This dynamic adaptation mechanism allows for flexible adjustments based on real-time business changes, eliminating the need for large-scale code refactoring and ensuring the system can rapidly respond to changing business needs.
[0092] Step S1 is the preliminary preparation work, and steps S11, S12, S13, and S14 are executed in no particular order;
[0093] S2. Requirements analysis and rule definition, input rules, including
[0094] S21. Determine a rule type based on business needs. The rule type includes at least one of a conditional trigger rule, a process control rule, and a data validation rule. For example, if a customer needs to generate a 10% discount coupon when the total order amount exceeds 500, this is a conditional trigger rule.
[0095] S22. Define business rules. Create or select corresponding rules based on rule templates. Through the management console, business personnel can define new business rules and use rule templates to set trigger conditions and actions. For example, if the order amount exceeds 500 and the customer is a VIP, the "generate discount coupon" action will be triggered.
[0096] S23, rule storage and loading, storing the defined rules in the rule library and dynamically loading them through the rule engine;
[0097] S3. Module selection and component combination: Select the required standard modules based on business needs, including:
[0098] S31. Determine the required components and which existing components are needed to meet the new requirements; for example, order management components, customer management components, and coupon management components;
[0099] S32. Configure the integration relationship of components, including data interaction and rule triggering;
[0100] The data interaction includes implementing data interaction between components through REST API, RPC or message queue; for example, when an order is completed, the order management module uses the rule engine to determine whether to generate a coupon. If the conditions are met, the interface of the coupon management module is called to generate the coupon;
[0101] The rule triggering includes calling the rule engine to evaluate the business rules, determine whether the conditions are met and execute the corresponding business logic; for example, after the order management module executes the operation of completing the order, it calls the rule engine to evaluate the business rules, determine whether the conditions are met and execute the corresponding business logic;
[0102] S4. Dynamic adaptation of models and rules, including rule integration and parsing and dynamic adjustment of data models. The rule integration and parsing includes using the rule engine to flexibly adapt business logic, such as using the rule engine to dynamically adapt business logic in different scenarios based on existing components. The dynamic adjustment of data models includes adjusting the data structure according to business rules, such as adding fields or changing field types. The database structure can be dynamically adjusted through metadata configuration or dynamic execution of DDL statements to ensure that the data structure can adapt to new business needs.
[0103] This embodiment uses the order discount scenario as an example to illustrate the dynamic adaptation operation process:
[0104] (1) Scene changes:
[0105] Assume that due to the needs of a promotion, the administrator needs to adjust the conditions for order discounts, for example, changing it to a 15% discount for orders over 300.
[0106] (2) Administrator operation:
[0107] The administrator accesses the rule configuration interface through the management console, finds the VIP Customer Discount rule template, changes the order amount threshold to 300, and modifies the discount to 15%.
[0108] (3) Rule engine parsing and execution:
[0109] The system rule engine automatically reads the updated template and dynamically adjusts the order module;
[0110] When the order module receives a new order creation request, it automatically applies the new discount logic based on the updated business rules;
[0111] When an order is completed, the order management module calls the rule engine, passing the current order and customer context information. The rule engine determines the order amount and customer type based on predefined rules, triggering the "generate discount coupon" operation to meet specific needs.
[0112] The present invention can dynamically configure different discount logics through the integration of a rule engine. The entire process does not require changes to the internal implementations of existing components such as order management and coupon management, and does not require changes to the codes of existing modules.
[0113] S5, system assembly and rapid application delivery, including module and component integration, testing and rollout, hot updates, and real-time adaptation;
[0114] The module and component integration involves registering selected modules or components (such as order management, customer management, coupon management, etc.) into the system through a service registration and discovery mechanism (such as Eureka) based on existing components, component combinations, and modules, and exposing services externally through an API gateway. Module integration utilizes standardized interfaces: Modules communicate with each other through REST APIs, RPCs, or message queues to ensure efficient collaboration between different modules.
[0115] The testing and launch include ensuring the correctness of rules and normal interactions between modules through automated testing, and using continuous integration and deployment (CI / CD) tools to achieve rapid launch.
[0116] The hot update and real-time adaptation include business personnel adjusting rules in real time according to changes in business needs through the management console, and dynamically loading them into the rule engine so that the system can respond to these changes immediately.
[0117] The method of the present invention enables the system to quickly build new application scenarios when facing new business needs, simply by adjusting business rules and reusing existing components, greatly improving the flexibility and response speed of the system, which is the core advantage of this patented technology.
[0118] Preferably, the universal data model includes several items from the Customer Management Model, Order Management Model, Inventory Management Model, Supplier Management Model, and Product Management Model. These data models implement standardized entity definitions and business relationships, providing a unified data foundation for subsequent business logic and system expansion. Developers can select and expand these models based on actual business needs, allowing them to quickly build diverse enterprise applications while ensuring data consistency, accuracy, and reusability.
[0119] This example uses the customer management model as an example to illustrate the elements of model construction:
[0120] - Objective: To centrally manage customers' basic information, tags, transactions, and activity records for easy application in the CRM system.
[0121] - Structure:
[0122] - Customer Information Table (Customer_Info): records the customer's basic information, such as customer ID, name, contact information, address, registration time, etc.
[0123] - Field Example:
[0124] - `customer_id` (primary key): VARCHAR(50)
[0125] - `name`: VARCHAR(100)
[0126] - `contact`: VARCHAR(50)
[0127] - `address`: TEXT
[0128] - `registration_date`: DATE
[0129] - Customer Tag Table (Customer_Tags): records the customer's personalized tag information, such as VIP customers, potential customers, and other tags.
[0130] - Field Example:
[0131] - `tag_id` (primary key): VARCHAR(50)
[0132] - `customer_id` (foreign key, associated with Customer_Info): VARCHAR(50)
[0133] - `tag_name`: VARCHAR(30) (tag name, such as "VIP", "new user", etc.)
[0134] - `description`: TEXT (label description)
[0135] - Customer Activity Log (Customer_Activity_Log): records customer visits, interactions, and purchase activities.
[0136] - Field Example:
[0137] - `activity_id` (primary key): VARCHAR(50)
[0138] - `customer_id` (foreign key, associated with Customer_Info): VARCHAR(50)
[0139] - `activity_type`: VARCHAR(20) (activity type, such as login, purchase, return)
[0140] - `timestamp`: TIMESTAMP
[0141] Preferably, the database structure generator automatically generates an SQL (Structured Query Language) script for the database table structure based on the model structure by parsing a data model definition file (e.g., an XML or JSON format file). The following is an example code for implementing the database structure generator in this embodiment:
[0142] import java.util.List;
[0143] import java.util.Map;
[0144] public class SQLGenerator {
[0145] public static String generateSQLTable(Map<String, Object> model) {
[0146] StringBuilder sql = new StringBuilder("CREATE TABLE ");
[0147] sql.append(model.get("name")).append(" (\n");
[0148] List <Map<String, String> >fields = (List <Map<String, String> >)model.get("fields");
[0149] for (Map<String, String> field : fields) {
[0150] sql.append(" ").append(field.get("name"))
[0151] .append(" ").append(field.get("type"));
[0152] if (Boolean.parseBoolean(field.getOrDefault("primaryKey","false"))) {
[0153] sql.append(" PRIMARY KEY");
[0154] }
[0155] sql.append(",\n");
[0156] }
[0157] sql.setLength(sql.length() - 2); / / Remove the last comma
[0158] sql.append("\n);");
[0159] return sql.toString();
[0160] }
[0161] public static void main(String[] args) {
[0162] / / Example data model definition
[0163] Map<String, Object>customerModel = Map.of(
[0164] "name", "Customer_Info",
[0165] "fields", List.of(<00003System.out.println(generateSQLTable(customerModel));
[0174] }
[0175] }
[0176] Output:
[0177] CREATE TABLE Customer_Info (
[0178] customer_id VARCHAR(50) PRIMARY KEY,
[0179] name VARCHAR(100),
[0180] contact VARCHAR(50),
[0181] address TEXT,
[0182] registration_date DATE );
[0184] The output SQL script will automatically generate the `Customer_Info` table, including the definitions of each field. This method can generate multiple database table structures in batches, greatly improving development efficiency.
[0185] Preferably, the API interface generator generates CRUD interfaces (including create, read, update, and delete interfaces) based on the REST API standard (a Web API designed based on the REST architectural style), providing operations corresponding to database tables. These interfaces are batch-created using a script generator to implement API support for multiple data models.
[0186] Preferably, the basic business logic includes common business operations and data processing logic, such as data validation, field format conversion, and data access layer (DAO) construction. The basic business logic generator automatically generates code for this basic business logic based on the data model, facilitating data transfer between the API layer and the database layer. This embodiment defines a DAO class for performing database operations on the Customer_Info table. This DAO class uses an automated generator to read field definitions from the model and automatically generate SQL statements for each business method. For example, the `add_customer()` method inserts a new customer record, while `get_customer()` queries specific customer data. This basic business logic is uniformly generated by the generator and injected into the API controller, ensuring consistency and simplicity in system data operations.
[0187] Preferably, the customer management module manages several items including customer information, tags, and activity records, and supports business logic including at least one of adding, editing, querying, and deleting customers, as well as customer tag management and customer activity record management. The customer information includes name, contact information, and address, customer tags include VIP customers, ordinary customers, and potential customers, and customer activity records include visit records, purchase history, and contact records. This embodiment also supports CRUD (Create, Delete, Modify, and Query) operations.
[0188] The order management module manages several items, including order creation, modification, status changes (including unpaid, shipped, or completed), payment, cancellation, and refunds, covering the entire lifecycle of orders. Supported business logic includes new order creation (creating orders and associating them with customers), order status management (handling order status changes from unpaid to shipped or completed), and order cancellation and refunds. This module implements the complete order management process from order placement to delivery, including several items, including order generation and query, order status management (such as paid, shipped, completed, etc.), order payment management, and order records.
[0189] The inventory management module manages several items including inventory query, warehousing, outbound delivery, or inventory transfer (transferring inventory between multiple warehouses). The supported business logic includes inventory query (such as querying the current inventory quantity based on the product ID), inventory change records (warehousing, outbound delivery, inventory transfer), and warehouse location management.
[0190] The product management module manages several items including basic product information, categories, prices, and specifications. The supported business logic includes product addition and editing (managing product information, defining product specifications and prices) and product category management (defining different product categories and labels based on business needs).
[0191] The supplier management module manages several items including supplier information, commodity purchase price, and delivery time, and is applicable to procurement management systems. The supported business logic includes supplier basic information management (name, contact information, address, etc.), supplier commodity information (commodity category, price, delivery time), supplier scoring and rating, supplier information entry (adding and maintaining basic supplier information), and purchased commodity management (recording the commodities and prices that each supplier can provide).
[0192] The report and analysis module manages the generation of statistical reports for various types of data in the system, supports analysis of customer, order, inventory and other data, and supports business logic including the generation of order statistics reports (statisticing the number and amount of orders over a certain period of time), customer behavior analysis (analyzing customer consumption behavior, purchasing preferences, etc.), customer activity statistics, order volume and sales analysis, inventory consumption and replenishment analysis, etc.
[0193] The management content of the permission management module includes managing user and role permissions, and the supported business logic includes user management (user information in the management system), role and permission allocation (defining permissions for different roles to ensure permission control for different users to access the module).
[0194] Preferably, the combined application system of the modules includes a CRM system (customer relationship management), an ERP system (enterprise resource planning), an e-commerce platform or a supply chain management system;
[0195] The CRM system is composed of a customer management module, a reporting and analysis module, and an order management module. It stores and manages customer information, records and analyzes customer purchasing behavior, manages customer order history, and generates customer activity and consumption reports for marketing analysis. The system can help sales teams understand customer needs, customer lifecycles, and consumption trends to support precision marketing and customer care.
[0196] The ERP system is composed of a customer management module, an order management module, an inventory management module, a supplier management module, a product management module, and a report and analysis module. It manages customer and supplier information, inventory and order management, and the entire process from procurement, production, inventory to sales. It analyzes inventory consumption, order volume, supplier performance, etc., providing data support for decision-making. The ERP system can help enterprises manage resources efficiently, optimize production and sales processes, and realize data sharing among departments, thereby improving operational efficiency.
[0197] The e-commerce platform is composed of a customer management module, an order management module, a product management module, an inventory management module, and a reporting and analysis module. It manages the display and classification of online products, supports customer ordering, payment, and order tracking, updates inventory in real time to prevent overselling or out-of-stock situations, analyzes customer preferences and product sales, and helps the e-commerce platform make product recommendations and promotions. The platform can provide a smooth shopping experience, ensure synchronized inventory updates, and generate personalized recommendation lists through customer analysis to improve conversion rates.
[0198] The supply chain management system is composed of an inventory management module, a supplier management module, and a reporting and analysis module. It maintains the inventory status and change history of goods, realizes inventory allocation and replenishment, manages and evaluates suppliers, tracks the supply cycle and delivery time of goods, generates inventory consumption reports and supplier performance reports, and supports supply chain optimization. The supply chain management system helps enterprises optimize inventory, ensure the efficient operation of all links in the supply chain, and reduce the risk of out-of-stock or backlogs.
[0199] Preferably, the business rule templates include several of the following: order discount rule templates, inventory alarm rule templates, customer loyalty points rule templates, automated approval rule templates, coupon issuance rule templates, payment failure retry rule templates, product price automatic adjustment rule templates, order cancellation rule templates, product promotion rule templates, membership upgrade rule templates, and delayed shipment rule templates. This embodiment demonstrates the construction process of each of the above business rule templates.
[0200] Requirement: VIP customers receive a 10% discount when their order amount exceeds 500. The business rule template defines this condition and allows administrators to dynamically adjust the discount conditions or discount amount.
[0201] Business rule template (JSON format):
[0202] ```json
[0203] {
[0204] "ruleId": "vip_discount_rule",
[0205] "name": "VIP Customer Discount",
[0206] "conditions": [
[0207] {"field": "customer.membership", "operator": "equals", "value": "VIP"},
[0208] {"field": "order.totalAmount", "operator": "greaterThan", "value": 500}
[0209] ],
[0210] "actions": [
[0211] {"actionType": "applyDiscount", "value": 10} ]
[0213] }
[0214] ```
[0215] illustrate:
[0216] - conditions: The conditional part of the rule, used to determine whether the business requirements are met. The conditions defined here are that the customer is a VIP and the order amount is greater than 500.
[0217] - actions: Defines the actions to be taken when the conditions are met, in this case, applying a 10% discount to the order.
[0218] Requirement description: When the inventory of a certain product is less than 10, an insufficient inventory alarm notification will be automatically sent to the administrator.
[0219] Business rule template (JSON format):
[0220] ```json
[0221] {
[0222] "ruleId": "low_stock_alert_rule",
[0223] "name": "Low Stock Alert",
[0224] "conditions": [
[0225] {"field": "inventory.quantity", "operator": "lessThan", "value": 10}
[0226] ],
[0227] "actions": [
[0228] {"actionType": "sendAlert", "message": "Insufficient stock, please restock as soon as possible","target": "admin"} ]
[0230] }
[0231] ```
[0232] illustrate:
[0233] - conditions: used to determine whether the product inventory is below a predetermined threshold (here 10).
[0234] - actions: If the conditions are met, send low stock alert to the administrator.
[0235] Requirement description: When a customer consumes more than 5 times in a month, an additional 50 loyalty points will be given.
[0236] Business rule template (YAML format):
[0237] ```yaml
[0238] ruleId: "loyalty_points_reward"
[0239] name: "Monthly Loyalty Points Reward"
[0240] conditions:
[0241] - field: "customer.monthlyPurchaseCount"
[0242] operator: "greaterThan"
[0243] value: 5
[0244] actions:
[0245] - actionType: "addLoyaltyPoints"
[0246] points: 50
[0247] ```
[0248] illustrate:
[0249] - conditions: Check the number of times a customer spends money in a month.
[0250] - actions: If the conditions are met, add 50 loyalty points to the customer.
[0251] Preferably, the conditional triggering rules include rules for giving customers discounts when the order amount exceeds a certain value, the process control rules include specific process approval rules or process dynamic adjustment rules when boundary conditions are met, and the data verification rules include whether the identity information entered by the customer complies with the prescribed rules.
[0252] Preferably, the rule integration and parsing includes rule parsing and rule execution; the rule parsing includes when the business scenario changes, the rule engine reads the relevant rule template, parses the rules through the rule parser, and determines the business logic that needs to be executed; the rule execution includes executing corresponding operations based on the results of the parsing, such as applying discounts to orders, sending notifications to administrators, increasing customer points, etc.
[0253] Preferably, the dynamic adjustment of the data model includes dynamic configuration generation and seamless integration. The dynamic configuration generation includes the rule engine dynamically generating system configurations adapted to the current business scenario based on the parsing results of the business rules. These configurations may involve data models in the database, business logic of the application, etc.; the seamless integration includes generating configurations through an API or directly updating the system's configuration files, so that the system can seamlessly adapt to new business scenarios without the need for large-scale code reconstruction.
[0254] Preferably, the business rule template is stored in a rule base, which is in the form of a database. Example 2:
[0255] The difference from Example 1 is that the rule base is in the form of a storage file, that is, a database table can be selected to store rule definitions for easy version control and update, or the rule definitions can be stored as files and loaded into the system through an API. Example 3:
[0256] This embodiment differs from Example 1 in that, in step S1, a modular component manager is deployed simultaneously to dynamically load, unload, and update modules. Administrators can flexibly enable or disable certain functional modules based on business needs without having to restart or make large-scale system modifications. Modular business components can be combined to meet the needs of different enterprises or applications, enabling customized deployment of enterprise applications. Example 4:
[0257] The difference from Example 1 is that this embodiment designs a rule management console when constructing a dynamic adaptation mechanism to facilitate business personnel to manage rules. Rules can be added, deleted, modified, and checked through the management console, facilitating rapid response to business changes. Example 5:
[0258] The difference from Example 1 is that the method described in this embodiment also includes initializing the rule engine and integrating with the components before executing step S4; the rule engine initialization includes that when the system starts, the rule engine loads all rule definitions, creates a rule parser, and maintains the hot update capability of these rules so that they can take effect immediately when business rules change; the component integration includes that the rule engine is integrated with the system components through the interface adaptation layer, which can flexibly define and execute rules for different business scenarios.
[0259] The basic principle of this invention is to address the long development cycles and poor system scalability inherent in traditional development approaches through model-driven automated development, modular component integration, and dynamic adaptation. This approach not only significantly improves enterprise application development efficiency but also ensures system flexibility and scalability, demonstrating significant technological innovation and broad application prospects.
[0260] The dynamic adaptation mechanism analyzes changes in business requirements through a business rules engine and dynamically adjusts the corresponding data model and business logic to address the diversity of enterprise business scenarios. The integrated design of modular business components enables the system to quickly respond to changes in business requirements, implement modular configuration for different system requirements, and support the construction of enterprise applications across industries and application scenarios. Each module can be independently updated, tested, and deployed, greatly improving the system's maintenance efficiency and scalability.
[0261] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical principles of the present invention, they can also make several improvements and modifications, such as building different automation tools to generate the database structure, API interface and basic business logic required for the application, establishing different business rule templates or rule storage methods, establishing different dynamic adaptation mechanisms, building different user demand input interfaces or interfaces, etc. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for rapid development of enterprise applications based on a common data model, characterized in that: The development method includes: S1. Build basic models and tools, including: S11. Build a universal data model, where the universal data model includes standard entity definitions, business logic, and relationship models; S12. Build an automation tool, which includes a database structure generator, an API interface generator, and a basic business logic generator; S13. Build modular components, including at least one of a customer management module, an order management module, an inventory management module, a product management module, a supplier management module, a report and analysis module, and a rights management module; each business module is integrated through a standardized interface; S14. Build a dynamic adaptation mechanism, including pre-defining business rule templates and creating a business rule engine; the business rule templates describe the logical relationships of common business rules, facilitating user configuration of business rules based on actual business needs; the business rule engine is used to parse and process changes in business needs; Steps S11, S12, S13, and S14 are executed in no particular order; S2. Requirements analysis and rule definition, input rules, including S21. Determine a rule type according to business requirements, where the rule type includes at least one of a condition-triggered rule, a process control rule, and a data verification rule; S22. Define business rules and create or select corresponding rules based on the rule template; S23, rule storage and loading, storing the defined rules in the rule library and dynamically loading them through the rule engine; S3. Module selection and component combination: Select the required standard modules based on business needs, including: S31. Determine the required components and which existing components need to be used to meet the new requirements; S32. Configure the integration relationship of components, including data interaction and rule triggering; The data interaction includes implementing data interaction between components through REST API, RPC or message queue; The rule triggering includes calling the rule engine to evaluate the business rules, determine whether the conditions are met and execute the corresponding business logic; S4. Dynamic adaptation of models and rules, including rule integration and parsing, and dynamic adjustment of data models. The rule integration and parsing includes utilizing a rule engine to flexibly adapt business logic; the dynamic adjustment of data models includes adjusting data structures according to business rules. S5, system assembly, including module and component integration, testing and launch, hot update and real-time adaptation; The module and component integration includes registering the selected modules or components into the system through the service registration and discovery mechanism based on the existing components, component combinations and modules, and exposing the services externally through the API gateway; The testing and launch process includes ensuring the correctness of rules and the normal interaction between modules through automated testing, and achieving rapid launch using continuous integration and deployment tools; The hot update and real-time adaptation include business personnel adjusting rules in real time according to changes in business needs through the management console, and dynamically loading them into the rule engine, so that the system responds to these changes immediately.
2. The method for rapid enterprise application development based on a general data model according to claim 1, characterized in that: The general data model includes several items of a customer management model, an order management model, an inventory management model, a supplier management model, and a product management model.
3. The method for rapid enterprise application development based on a general data model according to claim 1, characterized in that: The database structure generator automatically generates SQL scripts for database table structures based on the model structure by parsing the data model definition file.
4. The method for rapid enterprise application development based on a general data model according to claim 1, characterized in that: The API interface generator generates a CRUD interface based on the REST API standard and provides operations corresponding to the database table.
5. The method for rapid enterprise application development based on a general data model according to claim 1, characterized in that: The basic business logic includes common business operations and data processing logic; the basic business logic generator includes a code for automatically generating the basic business logic according to the data model so as to perform data transmission between the API layer and the database layer.
6. The method for rapid enterprise application development based on a general data model according to claim 1, characterized in that: The customer management module manages customer information, tags, and several items in activity records, and supports business logic including several items in customer addition, editing, querying, and deletion, as well as customer tag management and customer activity record management; The order management module manages several items including order creation, modification, status change, payment, cancellation, and refund. The supported business logic includes new order creation, order status management, and several items including order cancellation and refund. The inventory management module manages several items including inventory query, warehousing, outbound delivery, and inventory transfer, and supports business logic including inventory query, inventory change records, and several items in warehouse location management; The product management module manages several items including basic product information, categories, prices, and specifications, and supports business logic including product addition and editing, as well as product category management; The supplier management module manages several items including supplier information, product purchase price, and delivery time. The business logic supported includes supplier basic information management, supplier product information, supplier scoring and rating, supplier information entry, and several items in purchased product management. The report and analysis module management content includes generating statistical reports of various data in the system, supporting analysis of customer, order, inventory and other data, and supporting business logic including generating order statistics reports, customer behavior analysis, customer activity statistics, order volume and sales analysis, inventory consumption and replenishment analysis; The rights management module manages content including user and role rights, and supports business logic including user management, role and rights allocation.
7. The method for rapid enterprise application development based on a universal data model according to claim 1, characterized in that: The combined application system of the modules includes a CRM system, an ERP system, an e-commerce platform or a supply chain management system; The CRM system is composed of a customer management module, a report and analysis module, and an order management module; The ERP system is composed of a customer management module, an order management module, an inventory management module, a supplier management module, a product management module and a report and analysis module; The e-commerce platform is composed of a customer management module, an order management module, a product management module, an inventory management module, and a report and analysis module; The supply chain management system is composed of an inventory management module, a supplier management module, and a report and analysis module.
8. The method for rapid enterprise application development based on a general data model according to claim 1, characterized in that: Deploy a modular component manager for dynamically loading, unloading, and updating modules.
9. The method for rapid enterprise application development based on a general data model according to claim 1, characterized in that: The business rule templates include several items including order discount rule templates, inventory alarm rule templates, customer loyalty points rule templates, automated approval rule templates, coupon issuance rule templates, payment failure retry rule templates, product price automatic adjustment rule templates, order cancellation rule templates, product promotion rule templates, membership upgrade rule templates, and delayed delivery rule templates.
10. The method for rapid enterprise application development based on a universal data model according to claim 1, characterized in that: The conditional trigger rules include rules for giving customers discounts when the order amount exceeds a certain value, the process control rules include specific process approval rules or dynamic process adjustment rules when boundary conditions are met, and the data verification rules include whether the identity information entered by the customer complies with the specified rules.
11. The method for rapid enterprise application development based on a universal data model according to claim 1, characterized in that: The rule integration and parsing includes rule parsing and rule execution; the rule parsing includes the rule engine reading the relevant rule template, parsing the rules through the rule parser, and determining the business logic that needs to be executed; the rule execution includes executing corresponding operations based on the results of the parsing.
12. The method for rapid enterprise application development based on a universal data model according to claim 11, characterized in that: The dynamic adjustment of the data model includes dynamic configuration generation and seamless integration. The dynamic configuration generation includes the rule engine dynamically generating a system configuration adapted to the current business scenario based on the parsing results of the business rules; the seamless integration includes generating configuration through an API or directly updating the system configuration file.
13. The method for rapid enterprise application development based on a universal data model according to claim 1, characterized in that: The business rule template is stored in a rule base, which includes a database and / or storage files.
14. The method for rapid enterprise application development based on a universal data model according to claim 13, characterized in that: Design a rule management console to add, delete, modify and check rules through the management console, making it easy to quickly respond to business changes.
15. The method for rapid enterprise application development based on a universal data model according to claim 1, characterized in that: The method also includes initializing the rule engine and integrating it with components before executing step S4; the rule engine initialization includes, when the system starts, the rule engine loading all rule definitions, creating a rule parser, and maintaining the hot update capability of these rules so that changes to business rules take effect immediately; the component integration includes integrating the rule engine with system components through an interface adaptation layer to flexibly define and execute rules for different business scenarios.
16. The method for rapid enterprise application development based on a universal data model according to claim 1, characterized in that: The customer management module components include customer entities, customer management services and customer-related APIs; The order management module components include order entity, order status management, order status and order-related APIs; The inventory management module components include inventory entities, inventory scheduling services, inventory logs and inventory-related APIs; The product management module components include product entities, product classification and management services, and product-related APIs; The supplier management module components include supplier entities, supplier management services and supplier-related APIs; The report and analysis module components include a data report generator, protective gear analysis services and report-related APIs; The rights management module components include user entities, role entities, rights allocation services and rights-related APIs.
Citation Information
Patent Citations
Service software construction method and system adapting to multiple business abstraction levels
CN101794226A
Drool-based dynamic rule solving method, electronic equipment and readable storage medium
CN115358402A
Factory rule management platform
CN115796758A
Flexible software development method and kit for industrial complex business requirements
CN117270825A