Device and method for a low-code platform to support multi-language code generation

Through the combination of intelligent recommendation module, multi-language mapping module and definition generation module, the seamless integration problem of multi-language development of low-code platforms is solved, automatic selection and efficient compatibility of different programming languages are achieved, and the flexibility and scalability of low-code platforms are improved.

CN119440490BActive Publication Date: 2025-07-08SHANDONG INSPUR SCI RES INST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510038573.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-07-08
Estimated Expiration
2045-01-10

AI Technical Summary

Technical Problem

The existing low-code development platform only supports a single programming language, resulting in additional coding and integration costs in multilingual development projects, making it impossible to achieve seamless integration and efficient compatibility of different programming languages.

Method used

The intelligent recommendation module is used to recommend programming languages based on business logic types and target platform characteristics. The AST operation is mapped into executable code of the target programming language through the multilingual mapping module, and the interface code is generated by the definition generation module to achieve seamless integration and optimization of different programming languages.

Benefits of technology

It realizes that the appropriate programming language is automatically selected according to developer needs or system environment, generates code with high compatibility, reduces the workload of developers, and improves the flexibility and scalability of low-code platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440490B_ABST
    Figure CN119440490B_ABST
Patent Text Reader

Abstract

The present invention discloses a device and method for a low-code platform to support multi-language code generation, which relates to the technical field of software development. Aiming at the problem that the low-code platform cannot automatically generate multi-language code, the device includes: introducing three modules of intelligent recommendation, multi-language mapping, and definition generation in the low-code platform; the intelligent recommendation module intelligently recommends programming languages according to the business logic type and target platform characteristics; the multi-language mapping module maps the operations in the AST to the code of the selected programming language according to the language rules and grammar definitions of the selected programming language, where the AST is generated by the low-code platform according to the conversion of business logic; the definition generation module defines the interface specification, automatically generates the corresponding interface code based on the programming language to be docked and inserts it into the target position of the code, realizing data interaction and function call between the codes of different programming languages. The present invention also provides a corresponding method. The present invention is used to achieve seamless integration and optimization between different programming languages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and specifically, to a device and method for a low-code platform to support multi-language code generation. Background Art

[0002] Existing low-code development platforms mainly focus on the visual construction of business logic and the simplification of the code generation process. However, existing low-code platforms usually only support code generation in a single programming language, resulting in limitations in their practical applications. Different development projects require the use of multiple programming languages to adapt to different development requirements and platform environments (such as Web, mobile, embedded systems, etc.), bringing additional coding and integration costs to developers. Therefore, how to automatically generate multi-language code in a low-code platform and ensure the compatibility and efficient integration between the generated codes has become a technical problem to be solved urgently. Summary of the Invention

[0003] In view of the current technical development needs and deficiencies, the present invention provides a device and method for a low-code platform to support multi-language code generation, which can automatically select a suitable programming language according to the needs of developers or the system environment and generate corresponding codes, while realizing seamless integration and optimization between code modules in different programming languages.

[0004] In a first aspect, the present invention provides a device for a low-code platform to support multi-language code generation. The technical solution adopted to solve the above technical problems is as follows:

[0005] A device for a low-code platform to support multi-language code generation, which is deployed on a low-code platform and includes:

[0006] An intelligent recommendation module, which is used to intelligently recommend programming languages for developers to choose according to the type of business logic defined by developers through the low-code platform and the characteristics of the target platform. The programming language selected by the developer is the target programming language;

[0007] A multi-language mapping module, which is used to map the operations in the AST to executable codes in the target programming language according to the language rules and syntax definitions of the target programming language, where the AST is generated by the low-code platform according to the business logic defined by the developer;

[0008] A definition generation module, which is used to define interface specifications, automatically generate corresponding interface codes based on the programming languages to be docked, and insert them into the target positions of the executable codes to realize data interaction and function calls between codes in different programming languages.

[0009] Optionally, the types of business logic defined by developers through the low-code platform include compute-intensive, IO-intensive, data-driven, event-driven, rule engine-based, microservices architecture-based, and domain-driven design-based;

[0010] The target platform defined by the developer through the low-code platform refers to the type of environment where the application runs, including web applications, mobile applications, embedded systems, and backend services;

[0011] The intelligent recommendation module first analyzes the type of business logic and the characteristics of the target platform, and then generates a list of programming language recommendations for the developer to choose from according to preset rules. Among them, the preset rules include the following:

[0012] (a) When the target platform is a web application: If the business logic type is computationally intensive, programming languages Java or TypeScript are recommended; if the business logic type is I / O intensive, programming languages JavaScript or Python are recommended; if the business logic type is data-driven, programming languages Python or R are recommended; if the business logic type is event-driven, programming languages JavaScript or Node.js are recommended; if the business logic type is rule engine-based, programming languages Python or Drools are recommended; if the business logic type is microservices architecture-based, programming languages Java, Python, or Go are recommended; if the business logic type is domain-driven design-based, programming languages Java or C# are recommended;

[0013] (b) When the business logic type is one of computationally intensive, I / O intensive, data-driven, event-driven, rule engine-based, microservices architecture-based, and domain-driven design-based: If the target platform is an Android mobile application, programming language Java is recommended; if the target platform is an iOS mobile application, programming languages Swift or Objective-C are recommended; if the target platform is an embedded system, programming languages C or C++ are recommended; if the target platform is a high-concurrency backend service, programming languages Java or Go are recommended.

[0014] Optionally, the involved multi-language mapping module maps the operations in the AST to executable code in the target programming language according to the language rules and syntax definitions of the target programming language. The specific operations include:

[0015] Traverse the entire AST to identify the type and content of each node;

[0016] For each AST node, find the corresponding syntax structure and operation according to the pre-loaded language rules;

[0017] Generate code snippets in the target programming language according to the matched language rules;

[0018] Concatenate the generated code snippets into complete executable code and output it to the developer.

[0019] Optionally, the involved definition generation module is responsible for defining a set of general interface specifications in the low-code platform. The interface specifications include interface names and descriptions, parameter types and formats, return value types and formats, error handling mechanisms, and communication protocols;

[0020] According to the defined interface specifications, the definition generation module automatically generates corresponding interface codes based on the programming languages to be docked and inserts them into the executable codes automatically, enabling data interaction and function calls between codes in different programming languages through the interface codes.

[0021] In a second aspect, the present invention provides a method for a low-code platform to support multi-language code output. The technical solutions adopted to solve the above technical problems are as follows:

[0022] A method for a low-code platform to support multi-language code output, which is based on the device described in the first aspect, includes the following implementation steps:

[0023] S1. Developers define business logics and target platforms through the low-code platform, and the low-code platform converts the business logics defined by the developers into ASTs;

[0024] S2. An intelligent recommendation module is introduced into the low-code platform. The intelligent recommendation module intelligently recommends programming languages for developers to choose according to the types of business logics and the characteristics of the target platforms. The programming language selected by the developers is the target programming language;

[0025] S3. A multi-language mapping module is introduced into the low-code platform. The multi-language mapping module maps the operations in the AST into executable codes in the target programming language according to the language rules and grammar definitions of the target programming language;

[0026] S4. For the executable codes output by the multi-language mapping module, the low-code platform performs dynamic compilation to detect the correctness of the codes and ensure that the codes can be successfully compiled and pass basic syntax checks;

[0027] S5. After the dynamic compilation passes, the low-code platform optimizes the executable codes output by the multi-language mapping module to ensure the best practices of code styles and performance, and automatically formats the codes based on the best coding specifications of the programming language selected by the developers to ensure that the codes comply with the standards;

[0028] S6. A definition generation module is introduced into the low-code platform. Developers define interface specifications through the definition generation module. The definition generation module automatically generates corresponding interface codes based on the programming languages to be docked and inserts them into the target positions of the executable codes to achieve seamless integration between executable codes in different programming languages.

[0029] Optionally, the types of business logics defined by developers through the low-code platform include compute-intensive, I / O-intensive, data-driven, event-driven, rule engine-based, microservices architecture-based, and domain-driven design-based;

[0030] The target platforms defined by developers through the low-code platform refer to the types of application running environments, including web applications, mobile applications, embedded systems, and backend services.

[0031] Optionally, in step S2, the intelligent recommendation module first analyzes the type of business logic and the target platform, and then generates a programming language recommendation list for developers to choose from according to preset rules. The preset rules include the following:

[0032] (a) When the target platform is a web application: if the business logic type is compute-intensive, programming languages Java or TypeScript are recommended; if the business logic type is I / O-intensive, programming languages JavaScript or Python are recommended; if the business logic type is data-driven, programming languages Python or R are recommended; if the business logic type is event-driven, programming languages JavaScript or Node.js are recommended; if the business logic type is rule engine-based, programming languages Python or Drools are recommended; if the business logic type is microservices architecture-based, programming languages Java, Python, or Go are recommended; if the business logic type is domain-driven design-based, programming languages Java or C# are recommended;

[0033] (b) When the business logic type is one of compute-intensive, I / O-intensive, data-driven, event-driven, rule engine-based, microservices architecture-based, and domain-driven design-based: if the target platform is an Android mobile application, programming language Java is recommended; if the target platform is an iOS mobile application, programming languages Swift or Objective-C are recommended; if the target platform is an embedded system, programming languages C or C++ are recommended; if the target platform is a high-concurrency backend service, programming languages Java or Go are recommended.

[0034] Optionally, after executing step S2, the low-code platform loads the corresponding language rules and syntax definitions according to the target programming language. The language rules and syntax definitions exist in the form of configuration files or built-in data structures and are used to describe the syntax and features of the target programming language;

[0035] After the low-code platform converts the business logic defined by the developer into an AST, the multi-language mapping module performs the following operations:

[0036] Traverse the entire AST to identify the type and content of each node;

[0037] For each AST node, according to the pre-loaded language rules, find the corresponding syntax structure and operations;

[0038] Generate code snippets in the target programming language according to the matched language rules;

[0039] Concatenate the generated code snippets into a complete executable code and output it to the developer.

[0040] Optionally, when performing step S4, for the executable code output by the multi-language mapping module, the low-code platform automatically calls the corresponding compiler for real-time compilation, detects the correctness of the code, ensures that the code can be successfully compiled and passes basic syntax checks, and generates compilation results and logs at the same time;

[0041] If an error occurs during compilation, the compiler will generate error messages. Subsequently, the low-code platform uses built-in static code analysis tools to deeply analyze the errors, identify common code problems and provide repair suggestions; the error messages and repair suggestions are displayed to the developer through the graphical interface of the low-code platform, and the developer can directly click on the suggestions to perform repairs.

[0042] Optionally, step S6 specifically includes the following operations:

[0043] The developer defines the interface specification of the generation module. The interface specification includes interface name and description, parameter types and formats, return value types and formats, error handling mechanisms, and communication protocols;

[0044] According to the defined interface specification, the definition generation module automatically generates the corresponding interface code based on the programming language to be docked and automatically inserts it into the target position of the executable code, enabling data interaction and function calls between codes in different programming languages through the interface code;

[0045] The low-code platform comprehensively tests the integrated code, verifies whether the interface code between different programming languages can work properly, ensures data consistency and functional integrity, and then automatically generates a detailed interface document for the developer to understand and use.

[0046] A device and method for a low-code platform supporting multi-language code output according to the present invention have the beneficial effects compared with the prior art:

[0047] The present invention can automatically select an appropriate programming language according to the developer's requirements or system environment and generate corresponding code, and at the same time achieve seamless integration and optimization between code modules in different programming languages; it can improve the flexibility and scalability of the existing low-code platform, reduce the workload of developers, and ensure the compatibility and stability of the generated code. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Appendix Figure 1 is a schematic diagram of the module in the first embodiment of the present invention;

[0049] Appendix Figure 2 is a flowchart of the method in the second embodiment of the present invention. Detailed implementation manners

[0050] To make the technical solutions, the technical problems solved, and the technical effects of the present invention clearer and more understandable, the following describes the technical solutions of the present invention clearly and completely in conjunction with specific embodiments.

[0051] Embodiment 1: Referring to Appendix Figure 1 , this embodiment proposes a device for a low-code platform to support multi-language code generation, which is deployed on a low-code platform and includes:

[0052] An intelligent recommendation module, which is used to intelligently recommend programming languages for developers to choose according to the type of business logic defined by the developers through the low-code platform and the characteristics of the target platform. The programming language selected by the developers is the target programming language;

[0053] A multi-language mapping module, which is used to map the operations in the AST into executable code of the target programming language according to the language rules and syntax definitions of the target programming language, where the AST is generated by the low-code platform according to the business logic defined by the developers;

[0054] A definition and generation module, which is used to define interface specifications, automatically generate corresponding interface codes based on the programming languages to be docked, and insert them into the target positions of the executable codes to achieve data interaction and function calls between codes in different programming languages.

[0055] The low-code platform in this embodiment has the following functions: converting the business logic defined by the developers into an AST, dynamically compiling the executable code, detecting the correctness of the code to ensure that the code can be successfully compiled and pass basic syntax checks, optimizing the executable code to ensure the best practices of code style and performance, and automatically formatting the code based on the best coding specifications of the programming language selected by the developers to ensure that the code complies with the standards. Based on these functions, the low-code development platform specifically used in this embodiment can be one of Mendix, OutSystems, and PowerApps (Microsoft).

[0056] In this embodiment, the types of business logic defined by the developers through the low-code platform include compute-intensive, IO-intensive, data-driven, event-driven, rule engine-based, microservices architecture-based, and domain-driven design-based; the target platforms defined by the developers through the low-code platform refer to the types of application running environments, including web applications, mobile applications, embedded systems, and backend services.

[0057] The intelligent recommendation module first analyzes the type of business logic and the characteristics of the target platform, and then generates a programming language recommendation list for developers to choose according to preset rules. The preset rules include the following:

[0058] (a) When the target platform is a Web application: If the business logic type is computationally intensive, programming languages Java or TypeScript are recommended; if the business logic type is I / O intensive, programming languages JavaScript or Python are recommended; if the business logic type is data-driven, programming languages Python or R are recommended; if the business logic type is event-driven, programming languages JavaScript or Node.js are recommended; if the business logic type is rule engine-based, programming languages Python or Drools are recommended; if the business logic type is microservices architecture-based, programming languages Java, Python or Go are recommended; if the business logic type is domain-driven design-based, programming languages Java or C# are recommended;

[0059] (b) When the business logic type is one of computationally intensive, I / O intensive, data-driven, event-driven, rule engine-based, microservices architecture-based, and domain-driven design-based: If the target platform is an Android mobile application, programming language Java is recommended; if the target platform is an iOS mobile application, programming languages Swift or Objective-C are recommended; if the target platform is an embedded system, programming languages C or C++ are recommended; if the target platform is a high-concurrency backend service, programming languages Java or Go are recommended.

[0060] In this embodiment, the multi-language mapping module maps the operations in the AST to executable code in the target programming language according to the language rules and syntax definitions of the target programming language. The specific operations include:

[0061] Traverse the entire AST to identify the type and content of each node;

[0062] For each AST node, find the corresponding syntax structure and operation according to the pre-loaded language rules;

[0063] Generate code snippets in the target programming language according to the matched language rules;

[0064] Concatenate the generated code snippets into complete executable code and output it to the developer.

[0065] In this embodiment, the definition generation module is responsible for defining a set of general interface specifications in the low-code platform. The interface specifications include interface names and descriptions, parameter types and formats, return value types and formats, error handling mechanisms, and communication protocols.

[0066] According to the defined interface specifications, the definition generation module automatically generates corresponding interface codes based on the programming languages to be docked and automatically inserts them into the executable codes, enabling data interaction and function calls between codes in different programming languages through the interface codes.

[0067] Embodiment 2: Referring to the appendix Figure 2 , based on the device in Embodiment 1, this embodiment further proposes a method for a low-code platform to support multi-language code generation. The specific implementation steps are as follows:

[0068] S1. Developers define business logics and target platforms through the low-code platform, and the low-code platform converts the business logics defined by the developers into ASTs.

[0069] S2. An intelligent recommendation module is introduced into the low-code platform. The intelligent recommendation module intelligently recommends programming languages for developers to choose according to the types of business logics and the characteristics of target platforms. The programming language selected by the developers is the target programming language.

[0070] Subsequently, the low-code platform loads the corresponding language rules and grammar definitions according to the target programming language. The language rules and grammar definitions exist in the form of configuration files or built-in data structures and are used to describe the grammar and characteristics of the target programming language.

[0071] S3. A multi-language mapping module is introduced into the low-code platform. The multi-language mapping module maps the operations in the AST into executable codes in the target programming language according to the language rules and grammar definitions of the target programming language. This process specifically includes:

[0072] Traverse the entire AST and identify the types and contents of each node;

[0073] For each AST node, find the corresponding grammar structures and operations according to the pre-loaded language rules;

[0074] Generate code snippets in the target programming language according to the matched language rules;

[0075] Concatenate the generated code snippets into complete executable codes and output them to the developers.

[0076] S4. For the executable code output by the multilingual mapping module, the low-code platform automatically invokes the corresponding compiler for real-time compilation, and detects the correctness of the code to ensure that the code can be successfully compiled and pass basic syntax checks. At the same time, compilation results and logs are generated.

[0077] If an error occurs during the compilation process, the compiler will generate error messages. Subsequently, the low-code platform uses built-in static code analysis tools to deeply analyze the errors, identify common code problems and provide repair suggestions; the error messages and repair suggestions are displayed to the developer through the graphical interface of the low-code platform, and the developer can directly click on the suggestions to perform repairs.

[0078] S5. After successful dynamic compilation, the low-code platform optimizes the executable code output by the multilingual mapping module to ensure best practices in code style and performance, and automatically formats the code based on the best coding specifications of the programming language selected by the developer to ensure that the code complies with the standards.

[0079] S6. Introduce a definition generation module in the low-code platform;

[0080] The developer defines the interface specification through the definition generation module. The interface specification includes the interface name and description, parameter types and formats, return value types and formats, error handling mechanisms, and communication protocols;

[0081] According to the defined interface specification, the definition generation module automatically generates the corresponding interface code based on the programming language to be docked and inserts it into the target position of the executable code, enabling code in different programming languages to perform data interaction and function calls through the interface code;

[0082] Subsequently, the low-code platform conducts comprehensive testing on the integrated code to verify whether the interface code between different programming languages can work properly, ensure data consistency and functional integrity, and finally automatically generate a detailed interface document for developers to understand and use.

[0083] For example, the user can choose Java as the backend language and JavaScript as the frontend language. After performing the aforementioned steps S1 - S5, in step S6, according to the defined interface specification, the definition generation module automatically generates the corresponding interface code based on the programming languages Java and JavaScript and inserts it into the target position of the executable code, enabling code in different programming languages (Java and JavaScript) to perform data interaction and function calls through the interface code. Of course, the low-code platform will also ensure interface consistency between different programming languages through a unified data exchange format (such as JSON or XML), and the user does not need to manually handle cross-language compatibility issues.

[0084] In summary, by using the device and method for supporting multi-language code generation of the low-code platform of the present invention, it is possible to automatically select an appropriate programming language and generate corresponding code according to the needs of developers or the system environment, and at the same time achieve seamless integration and optimization between code modules of different programming languages; it can improve the flexibility and scalability of the existing low-code platform, reduce the workload of developers, and ensure the compatibility and stability of the generated code.

[0085] The above specific application examples have elaborated in detail the principle and implementation manner of the present invention. These examples are only used to help understand the core technical content of the present invention. Based on the above specific embodiments of the present invention, those skilled in the art of this technology, without departing from the principle of the present invention, any improvements and modifications made to the present invention shall fall within the scope of patent protection of the present invention.

Claims

1. An apparatus for a low-code platform to support multi-language code generation, characterized in that, It is deployed on a low-code platform, including: An intelligent recommendation module, which is used to intelligently recommend programming languages for developers to choose according to the type of business logic defined by the developers through the low-code platform and the characteristics of the target platform. The programming language selected by the developer is the target programming language; A multi-language mapping module, which is used to map the operations in the AST into executable code in the target programming language according to the language rules and grammar definitions of the target programming language. Herein, the AST is generated by the low-code platform through the transformation of the business logic defined by the developers; A definition generation module, which is used to define interface specifications, automatically generate corresponding interface codes based on the programming languages to be docked, and insert them into the target positions of the executable codes, so as to realize data interaction and function calls between codes in different programming languages; Wherein: The types of business logic defined by the developers through the low-code platform include compute-intensive, I / O-intensive, data-driven, event-driven, rule engine, microservices architecture, and domain-driven design; The target platforms defined by the developers through the low-code platform refer to the types of application running environments, including web applications, mobile applications, embedded systems, and backend services; The intelligent recommendation module first analyzes the type of business logic and the characteristics of the target platform, and then generates a programming language recommendation list for developers to choose according to preset rules. The preset rules include the following contents: (a) When the target platform is a web application: if the business logic type is compute-intensive, Java or TypeScript is recommended; if the business logic type is I / O-intensive, JavaScript or Python is recommended; if the business logic type is data-driven, Python or R is recommended; if the business logic type is event-driven, JavaScript or Node.js is recommended; if the business logic type is rule engine, Python or Drools is recommended; if the business logic type is microservices architecture, Java, Python, or Go is recommended; if the business logic type is domain-driven design, Java or C# is recommended; (b) When the business logic type is one of compute-intensive, I / O-intensive, data-driven, event-driven, rule engine, microservices architecture, and domain-driven design: if the target platform is an Android mobile application, Java is recommended; if the target platform is an iOS mobile application, Swift or Objective-C is recommended; if the target platform is an embedded system, C or C++ is recommended; if the target platform is a high-concurrency backend service, Java or Go is recommended.

2. The device for supporting multi-language code generation on a low-code platform according to claim 1, characterized in that The multi-language mapping module maps the operations in the AST into executable code in the target programming language according to the language rules and grammar definitions of the target programming language. The specific operations include: Traverse the entire AST and identify the type and content of each node; For each AST node, find the corresponding grammar structure and operations according to the pre-loaded language rules; Generate code snippets in the target programming language according to the matched language rules; Concatenate the generated code snippets into complete executable code and output it to the developer.

3. A device for a low-code platform to support multi-language code generation according to claim 1, characterized in that, The definition generation module is responsible for defining a set of common interface specifications in the low-code platform. The interface specifications include interface names and descriptions, parameter types and formats, return value types and formats, error handling mechanisms, and communication protocols; According to the defined interface specifications, the definition generation module automatically generates corresponding interface code based on the programming language to be docked and automatically inserts it into the executable code, enabling data interaction and function calls between codes in different programming languages through the interface code.

4. A method for a low-code platform to support multi-language code generation, characterized in that, Based on the device described in any one of claims 1-3, it includes the following implementation steps: S1. The developer defines the business logic and the target platform through the low-code platform, and the low-code platform converts the business logic defined by the developer into an AST; S2. Introduce an intelligent recommendation module in the low-code platform. The intelligent recommendation module first analyzes the business logic type and the target platform, and then generates a programming language recommendation list for the developer to choose according to the preset rules. The programming language selected by the developer is the target programming language; among them, the preset rules include the following: (a) When the target platform is a Web application: If the business logic type is computationally intensive, it is recommended to use programming languages Java or TypeScript; if the business logic type is I / O intensive, it is recommended to use programming languages JavaScript or Python; if the business logic type is data-driven, it is recommended to use programming languages Python or R; if the business logic type is event-driven, it is recommended to use programming languages JavaScript or Node.js; if the business logic type is rule engine type, it is recommended to use programming languages Python or Drools; if the business logic type is microservices architecture type, it is recommended to use programming languages Java, Python or Go; if the business logic type is domain-driven design type, it is recommended to use programming languages Java or C#; (b) When the business logic type is one of computationally intensive, I / O intensive, data-driven, event-driven, rule engine type, microservices architecture type, and domain-driven design type: If the target platform is an Android mobile application, it is recommended to use programming language Java; if the target platform is an iOS mobile application, it is recommended to use programming languages Swift or Objective-C; if the target platform is an embedded system, it is recommended to use programming languages C or C++; if the target platform is a high-concurrency backend service, it is recommended to use programming languages Java or Go; S3. Introduce a multi-language mapping module in the low-code platform. The multi-language mapping module maps the operations in the AST to executable code in the target programming language according to the language rules and grammar definitions of the target programming language; S4. For the executable code output by the multilingual mapping module, the low-code platform performs dynamic compilation to detect the correctness of the code, ensuring that the code can be successfully compiled and pass basic syntax checks. S5. After successful dynamic compilation, the low-code platform optimizes the executable code output by the multilingual mapping module to ensure best practices in code style and performance, and automatically formats the code based on the best coding standards of the programming language selected by the developer to ensure that the code complies with the standards. S6. Introduce a definition generation module in the low-code platform. The developer defines the interface specification through the definition generation module. The definition generation module automatically generates the corresponding interface code based on the programming language to be docked and inserts it into the target position of the executable code to achieve seamless integration between the executable codes of different programming languages.

5. A method for a low-code platform to support multi-language code generation, as claimed in claim 4, wherein The types of business logics defined by the developer through the low-code platform include compute-intensive, I / O-intensive, data-driven, event-driven, rule engine-based, microservices architecture-based, and domain-driven design-based. The target platforms defined by the developer through the low-code platform refer to the types of application running environments, including web applications, mobile applications, embedded systems, and backend services.

6. A method for a low-code platform to support multi-language code generation, as claimed in claim 4, wherein After executing step S2, the low-code platform loads the corresponding language rules and syntax definitions according to the target programming language. The language rules and syntax definitions exist in the form of configuration files or built-in data structures and are used to describe the syntax and features of the target programming language. After the low-code platform converts the business logic defined by the developer into an AST, the multilingual mapping module performs the following operations: Traverse the entire AST to identify the type and content of each node. For each AST node, find the corresponding syntax structure and operations according to the pre-loaded language rules. Generate code snippets in the target programming language according to the matched language rules. Concatenate the generated code snippets into a complete executable code and output it to the developer.

7. A method for a low-code platform to support multi-language code generation according to claim 4, characterized in that, When executing step S4, for the executable code output by the multilingual mapping module, the low-code platform automatically invokes the corresponding compiler for real-time compilation, detects the correctness of the code, ensures that the code can be successfully compiled and pass basic syntax checks, and generates compilation results and logs at the same time. If an error occurs during the compilation process, the compiler generates error messages. Subsequently, the low-code platform uses the built-in static code analysis tool to deeply analyze the errors, identify common code problems, and provide repair suggestions. The error messages and repair suggestions are displayed to the developer through the graphical interface of the low-code platform, and the developer can directly click on the suggestions to perform repairs.

8. A method for a low-code platform to support multi-language code generation according to claim 4, characterized in that, Step S6 specifically includes the following operations: The developer defines the interface specification through the definition generation module. The interface specification includes the interface name and description, parameter types and formats, return value types and formats, error handling mechanisms, and communication protocols. According to the defined interface specification, the definition generation module automatically generates the corresponding interface code based on the programming language to be docked and automatically inserts it into the target position of the executable code, enabling data interaction and function calls between the codes of different programming languages through the interface code. The low-code platform conducts comprehensive testing on the integrated code to verify whether the interface code between different programming languages can work properly, ensuring data consistency and functional integrity. Subsequently, it automatically generates detailed interface documentation for developers to understand and use.

Citation Information

Patent Citations

  • Source code file generation method and device, electronic equipment and storage medium

    CN115357252A