A method and system for full-stack code automatic generation from data models to C++-web services

By defining JPP, a domain-specific language for data models, the system achieves automated generation of data structures, serialization code, database scripts, and web service layers from a single data model. This solves the problems of low efficiency, difficulty in multilingual adaptation, and insufficient support for domestic databases in C++ application development, thereby improving development efficiency and data consistency.

CN122195418APending Publication Date: 2026-06-12NANKAI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANKAI UNIV
Filing Date
2026-03-13
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In C++ application development, existing technologies suffer from low development efficiency, complex multi-language heterogeneous communication, difficulty in adapting to domestic databases, and a disconnect between front-end and back-end models. In particular, in the fields of high-performance computing, industrial control, and financial transactions, there is a lack of methods for automatically generating full-stack code.

Method used

This paper presents a method for automating the generation of full-stack code from data models to C++-Web services. By defining a domain-specific language JPP for data models and using a C++-like syntax structure and annotation mechanism, it generates multi-language data structures, serialization code, database scripts, and Web service layer code. It supports domestic databases such as DM Database and realizes the automated generation of multi-language data structures from a single data model.

🎯Benefits of technology

It significantly improves the efficiency of C++ application development, reduces boilerplate code writing by more than 80%, lowers the cost of domestic migration, ensures data structure consistency and interface consistency, improves serialization performance, and supports multi-language collaborative development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122195418A_ABST
    Figure CN122195418A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of software engineering and automatic code generation, and discloses a full-stack automatic code generation method and system from a data model to a C++-Web service. A JPP field-specific language of a C++ type syntax is designed, and an annotation mechanism is introduced for fine control. A JPP source file is input, an abstract syntax tree is constructed through syntax analysis, and a unified intermediate representation is generated. A pluggable generator architecture is adopted to generate a multi-language data structure, JSON / binary serialization code, a MySQL / SQLite / Dream database table creation script, a DAO layer code based on SOCI, a Web service layer code based on Drogon and a Word document from the same intermediate representation. The application can reduce more than 80% of the sample coding work, significantly improve the C++ application development efficiency, and realize full-stack automatic code generation from a data model to a Web service.
Need to check novelty before this filing date? Find Prior Art