Method and system for generating industrial low-code application based on specific language

By introducing application-specific language ASL on low-code platforms, unified management of business modules and conversion into multiple target languages, the problem of inconsistent DSL standards of different engines is solved, reducing development costs and improving development efficiency.

CN120215896APending Publication Date: 2025-06-27ZHEJIANG LANZHUO IND INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411614934.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing low-code platforms have different programming languages ​​because each engine uses different programming languages, resulting in inconsistent standards when expressing the same functions, which increases the learning cost and development difficulty of developers.

Method used

By abstracting an application-specific language ASL on the low-code integrated development environment platform X-IDE, it serves as a base to manage various business modules uniformly, and convert the Json format business logic into ASL's TypeScript language code, and finally convert it into multiple target languages ​​according to business needs.

Benefits of technology

It reduces the learning cost of developers for different programming languages, unifies the description method of DSL, improves development efficiency, and provides flexible code generation capabilities for different business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215896A_ABST
    Figure CN120215896A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of programming languages, and provides a method for generating an industrial low-code application based on a specific language, which comprises the following steps: S1, analyzing APP metadata of X-IDE, functions of each engine and a domain specific language DSL used by each engine, and obtaining an analysis result; on the basis of a TypeScript language, a set of application specific language ASL suitable for the low-code integrated development environment platform X-IDE is abstracted to serve as a base of the low-code integrated development environment platform X-IDE; s2, uniformly managing each service module by applying a specific language ASL, describing service logic by a developer through a domain specific language DSL definition provided by an engine, storing the service logic in a Json format, and converting the service logic in the Json format into a code of the TypeScript language abstracted into the specific language ASL by an ASL server during operation; and S3, according to different business requirements, codes of the specific language ASL are converted into multiple target languages, and industrial low-code application is generated. The learning cost of developers in the industrial low-code application development process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of programming languages, and in particular, to a method and system for generating industrial low-code applications based on a specific language. Background Art

[0002] In general, in order to reduce the difficulty of developers in developing applications during the process of building applications on a low-code platform, various visual designers are used to lower the development threshold. Each designer generates a structure or behavior according to a set of model definitions provided by the underlying corresponding engine, which is generally described in the form of DSL. The running engine parses the DSL to generate a runnable program. For example, page models, process models, logic models, rule models, etc. Each engine often uses different programming languages due to technical requirements, resulting in the problem that the defined DSLs use their own standards when describing the same or similar functions. For developers, they need to understand the DSLs defined by each engine.

[0003] In addition, considering the ease of use and low complexity of the visual editor layout (the "impossible triangle" of low code) on the low-code platform, it is impossible to use visual layout for all business functions. When the visual layout cannot fully express the business logic, developers are allowed to continue using scripts (such as JavaScript, Groovy, etc.) or other high-level languages.

[0004] Such as Figure 1 shown, is a reference architecture of a low-code development platform. As the meta-model of the low-code development platform continues to increase, the platform will bring two relatively large technical problems. One is that when each engine is implemented, different programming languages are used at the bottom layer, resulting in inconsistent standards for DSLs when expressing the same function, which is very unfriendly to developers. The other is the introduction of a high-code script engine, which requires developers to master different programming languages, raising the threshold for developers and increasing the difficulty of developing applications. For example, the definitions of Array in different languages, JS uses {"hello","world"}, Java uses ["hello","world"], etc. Therefore, the low-code platform requires a specific low-code language to solve the above problems. Summary of the Invention

[0005] In view of the above problems, the purpose of the present invention is to provide a method and system for generating industrial low-code applications based on a specific language. By writing a set of specific low-code programming languages, it is possible to support the unified description of data types, statements, expressions, functions, etc. among various low-code business engines. This reduces the learning cost of developers during the development process of industrial low-code applications. Developers no longer need to understand the differences in syntax and semantics of various programming languages, and use a unified low-code language to develop low-code applications. Similar to setting SQL as a specific standard language during the management and operation of relational databases.

[0006] The above object of the present invention is achieved by the following technical solutions: A method for generating industrial low-code applications based on a specific language, comprising the following steps: S1: Analyze the APP metadata of the low-code integrated development environment platform X-IDE, as well as the functions of each engine and the domain-specific language DSL used by the engine as a meta-model. On the basis of the TypeScript language, abstract a set of application-specific language ASL suitable for the low-code integrated development environment platform X-IDE as the base of the low-code integrated development environment platform X-IDE; S2: Uniformly manage each business module through the application-specific language ASL. Developers describe business logic through the definition of the domain-specific language DSL provided by the engine and store it in Json format. The business logic in Json format is converted into code in the TypeScript language abstracted into the specific language ASL by the ASL server at runtime; S3: According to different business requirements, convert the code of the specific language ASL into multiple target languages to generate industrial low-code applications.

[0007] Further, in step S1, on the basis of the TypeScript language, abstract a set of application-specific language ASL suitable for the low-code integrated development environment platform X-IDE. The application-specific language ASL includes the following functions: Data type definition: Define various data types including numbers, strings, dates, etc.; Variable declaration and assignment: Declare variables and assign values to them; Expression calculation: Support the calculation of various types of expressions including arithmetic expressions, logical expressions, etc.; Control flow: Support control flow structures including conditional judgment, loop, etc.; Function definition and call: Define and call custom functions; Modularization: Modularize the code to improve the maintainability of the code.

[0008] Further, in step S3, according to different business requirements, the code of the specific language ASL is converted into multiple target languages to generate the industrial low-code application, specifically: Apply the specific language ASL uniformly to the client and server of the industrial low-code application; Based on the pre-set mapping rules, convert the abstract model and control structure in the specific language ASL into the corresponding implementations in the target language; For the server, assist in designing each parsing engine according to each target language to complete the conversion of the specific language ASL into the target language.

[0009] Further, in step S3, it also includes: Design a code optimizer to optimize the code mapped to the target language.

[0010] Further, it also includes designing a visual development environment, specifically: Each designer in the visual development environment generates the corresponding domain-specific language DSL as the meta-model through operations in the forward direction; When it is necessary to modify or view the existing domain-specific language DSL, the domain-specific language DSL as the meta-model is generated in the reverse direction into the visual development environment, and the domain-specific language DSL is converted and presented in the visual development environment; The content generated by each designer in the visual development environment during the operation process is processed and integrated by converting the domain-specific language DSL into the application-specific language ASL.

[0011] Further, it also includes implementing the graphicalization of the control structure in the visual development environment by dragging and dropping components, specifically: In the visual development environment, design a dedicated logic construction area for developers to build the control structure. The component library stores various control structure components, which are selected and dragged to the logic construction area; When the developer drags the control structure component to the logic construction area, freely place the control structure component; For the branch structure component, it can be connected to different operation modules. For the sequential structure component, multiple operation steps are connected in sequence through arrows or other connection methods. For the nested structure component, the relevant control structure components are included; When the user constructs a control structure through drag-and-drop and connection operations, the platform converts these graphical operations into corresponding code or internal data structures in the background based on the Application Specific Language (ASL), and generates control structure statements that conform to the syntax of the language.

[0012] Furthermore, it also includes designing a script editor based on the Application Specific Language (ASL), specifically: The script editor provides a basic function library necessary for developing a Low-Code Development Platform (LCDP), unifies the definition of metadata at each layer of the Low-Code Development Platform (LCDP), and supports the development of industrial low-code applications with a unified syntax. The script editor based on the Application Specific Language (ASL) supports debugging functions, allowing developers to step through the script and check the values of variables and expressions.

[0013] A system for generating industrial low-code applications based on a specific language for implementing the method of generating industrial low-code applications based on a specific language as described above, includes: An Application Specific Language (ASL) generation module, which is used to analyze the APP metadata of the Low-Code Integrated Development Environment Platform (X-IDE), as well as the functions of each engine and the Domain Specific Language (DSL) used by the engine as a meta-model, and abstracts a set of Application Specific Languages (ASL) suitable for the Low-Code Integrated Development Environment Platform (X-IDE) on the basis of the TypeScript language, as the base of the Low-Code Integrated Development Environment Platform (X-IDE). An Application Specific Language (ASL) management module, which is used to uniformly manage each business module through the Application Specific Language (ASL). Developers describe business logic through the definition of the Domain Specific Language (DSL) provided by the engine and store it in Json format. The business logic in Json format is converted into code in the TypeScript language abstracted into the specific language ASL by the ASL server during runtime. An industrial low-code application generation module, which is used to convert the code of the specific language ASL into multiple target languages according to different business requirements, and generate industrial low-code applications.

[0014] A computer device includes a memory and one or more processors. When the computer code stored in the memory is executed by the one or more processors, the one or more processors execute the method as described above.

[0015] A computer-readable storage medium stores computer code, and when the computer code is executed, the method as described above is executed.

[0016] Compared with the prior art, the present invention has at least one of the following beneficial effects: (1) The present invention solves the problems of the prior art, provides a unified programming model, which is fundamentally different from some existing low-code development platforms, and proposes concepts such as low-code specific languages.

[0017] (2) The present invention provides a basic language based on TS that combines the metadata of the low-code development platform, unifies each DSL, and provides a unified semantics and execution environment.

[0018] (3) The system has good scalability and can easily integrate other business engines of low-code, providing basic support for building the low-code platform itself. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the reference architecture of the low-code development platform of the present invention; Figure 2 It is the overall flowchart of the method for generating industrial low-code applications based on a specific language of the present invention; Figure 3 It is a schematic diagram of the layered architecture design of the low-code development of the present invention; Figure 4 It is a schematic diagram of the ASL architecture design of the present invention; Figure 5 It is a schematic diagram that components between form pages of the present invention need to implement data filtering functions through a filtering filter; Figure 6 It is a schematic diagram that the workflow of the present invention uses a filtering function to judge whether to enter a branch in mutually exclusive and compatible branches; Figure 7 It is the overall structure diagram of the system for generating industrial low-code applications based on a specific language of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0021] Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present invention means the presence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups.

[0022] Term explanations related to this application: (1)X-IDE Definition: X-IDE is a low-code integrated development environment platform. It provides developers with an integrated development environment for creating low-code applications.

[0023] Functional features Integrity: Integrates a variety of development tools and functions, such as code editors, visual designers, debugging tools, etc., facilitating developers to carry out all aspects of application development in a unified environment.

[0024] Low-code feature: By providing a visual operation interface and predefined components, developers can build applications without writing a large amount of code. This greatly reduces the development threshold, improves development efficiency, and enables non-professional programmers to participate in application development.

[0025] (2)LCDP (Low - Code Development Platform) Definition: A low-code development platform is a software development tool that allows developers to create applications with minimal manual coding.

[0026] Core principle Visual development: Build various parts of the application, including user interfaces, business logics, and data models, through a visual interface, such as dragging and dropping components, setting properties, etc.

[0027] Predefined components and templates: Provide a series of predefined components (such as form components, buttons, menus, etc.) and templates (such as common business process templates, page layout templates, etc.). Developers can directly use these components and templates or modify and customize them according to their own needs.

[0028] Code generation and automation: In the background, the platform automatically generates corresponding code based on the developer's visual operations, reducing the workload of developers writing code manually. At the same time, the platform may also perform some automated optimizations and processing on the generated code to improve the performance and quality of the application.

[0029] (3)ASL (Application Specific Language) Definition: An application specific language is a programming language designed specifically for a particular application domain or development environment. In the context of low-code development, it is a language built on top of underlying technologies and is used to develop applications on low-code platforms.

[0030] Features and functions Targeted: It is designed according to the characteristics and requirements of low-code development platforms and is closely integrated with the platform's architecture and functions. For example, it may have specific syntax and semantics for describing elements such as data models, business processes, and user interfaces in low-code applications.

[0031] Unified underlying support: It provides unified underlying language support for various engines in low-code platforms. This means that different business modules (such as page design, process design, logic design, etc.) can be described using this language, avoiding the complexity and inconsistency brought about by using multiple different DSLs.

[0032] Improved development efficiency: Developers only need to master ASL proficiently to easily connect various capability components on low-code platforms and achieve the rapid development of complex applications. It reduces the learning cost of developers for multiple programming languages and makes the development process more efficient and convenient.

[0033] (4)DSL (Domain Specific Language) Definition: A domain specific language is a programming language specifically used for a particular domain or business scenario. In low-code development platforms, different business modules (such as page design, process design, logic design, etc.) usually use different DSLs to describe their models and behaviors.

[0034] Reasons for emergence and usage scenarios Business complexity and professionalism: Different business domains have different levels of complexity and professionalism, and require specialized languages to accurately describe their business logics and rules. For example, in the financial field, a DSL specifically for describing financial transaction processes may be needed, and in the medical field, a DSL for describing medical record management and medical processes may be required.

[0035] (5)LCAP (Low-Code Application) Definition: A low-code application refers to an application created using a low-code development platform. During the development of these applications, less manual coding is used, and they are mainly built through visual operations and predefined components.

[0036] Advantages and application scenarios Rapid development: Since there is no need to write a large amount of code, low-code applications can be developed in a shorter time. This is very helpful for enterprises to quickly respond to market demands and launch new products or new features.

[0037] Reduce development costs: Reducing the dependence on professional programmers allows non-professional programmers to participate in the development process, thus reducing development costs. At the same time, due to the short development cycle, the overall cost of the project can also be reduced.

[0038] Wide range of application scenarios: Suitable for different application scenarios in various enterprises and industries, such as internal office automation applications in enterprises (such as leave systems, reimbursement systems, etc.), customer relationship management applications (such as customer information management, sales opportunity tracking, etc.), production management applications (such as production plan arrangement, quality control, etc.).

[0039] The present invention mainly solves the problem that existing low-code platforms do not have unified underlying basic language support for the domain-specific languages (DSLs) of each engine, resulting in developers needing to understand different DSL definitions for each business module when developing low-code applications (LCAPs). To solve these problems, the platform abstracts a lower-level script engine to unify the DSL descriptions of each engine, providing underlying basic language support while defining the specific languages for each domain-specific language DSL in the business domain.

[0040] The low-code integrated development environment platform X-IDE constructs a unified application-specific language (ASL) by abstracting underlying capabilities. Developers only need to master the application-specific language ASL proficiently to easily connect various capability components and achieve the rapid development of complex applications. This language-based abstraction not only lowers the development threshold but also provides a solid foundation for AI-generated applications, helping enterprises achieve more efficient application development in the AIGC era.

[0041] The present invention relates to the following key technologies: (1) A set of low-code specific languages (ASL) based on TypeScript for the development of low-code APPs (2) Provide a low-code to high-code conversion device for easy user expansion (3) Visual tool integration based on ASL, supporting full-link descriptions such as data modeling, workflow, and interface design The purpose of the present invention is to provide a low-code language design based on the TypeScript (TS) language, which can utilize the general capabilities of TS, such as basic data type declarations, function definitions, loop conditions, etc., and can convert the TS language into other programming languages, such as Java, Go, Rust, etc.

[0042] To achieve the above object, the present invention adopts the following technical solutions: (1) Low-code language design: Design a low-code language based on TS that supports the basic syntax and type system of TS, including but not limited to interfaces, classes, enums, basic data types, etc.

[0043] Define a set of low-code abstract models, including data models, process control, formula expressions, event handling, etc., to facilitate user development through a graphical interface.

[0044] (2) General-purpose ability design: Utilize the type system of TS to simplify and define a new type system to provide strong type support for the low-code platform, ensuring data consistency and reducing runtime errors.

[0045] Design a unified low-code function library, including functions for common logic processing, data operations, API calls, etc., so that users can implement complex business logics through simple function calls.

[0046] Implement a graphical representation of control structures such as loop conditions, enabling users to build loop and conditional logics by dragging and dropping components.

[0047] (3) Language conversion device: Develop a conversion device based on TS that can convert the low-code language based on TS into source code in the target language (such as Java, Go, Rust).

[0048] Design a set of mapping rules for mapping the abstract models and control structures in the low-code language to the corresponding implementations in the target language.

[0049] Implement a code optimizer to optimize the converted code and ensure that the generated code complies with the best practices of the target language.

[0050] The following is illustrated through specific embodiments: The first embodiment As Figure 2 shown, this embodiment provides a method for generating an industrial low-code application based on a specific language, which is characterized by including the following steps: S1: Analyze the APP metadata of the low-code integrated development environment platform X-IDE, as well as the functions of each engine and the domain-specific language DSL used by the engine as a meta-model, and abstract a set of application-specific languages ASL suitable for the low-code integrated development environment platform X-IDE on the basis of the TypeScript language as the base of the low-code integrated development environment platform X-IDE.

[0051] Provide unified abstraction and support for the domain-specific languages (DSLs) of various upper-layer business modules. Each DSL is a specific implementation of the application-specific language (ASL), sharing the basic syntax and semantics provided by the ASL. The ASL provides a unified execution environment for the DSLs, enabling seamless integration of the code generated by different DSLs.

[0052] The position of the application-specific language (ASL) in the low-code development platform X-IDE system is as Figure 3 shown. The ASL includes the following functions: Data type definition: Define various data types including numbers, strings, and dates; Variable declaration and assignment: Declare variables and assign values to them; Expression evaluation: Support the evaluation of various types of expressions including arithmetic expressions and logical expressions; Control flow: Support control flow structures including conditional judgment and loops; Function definition and call: Define and call custom functions; Modularization: Modularize the code to improve code maintainability.

[0053] The following briefly introduces the syntax definitions of ASL data types, variables, operations, etc.: (1) ASL basic data types Basic data types: chars, double, bool, undefined Object types: Object, String, Boolean, Number, Array, Null Variable types: AST supports strong typing, i.e., assign the data type of the variable when declaring the variable; / / Strongly typed variable: var a : Date = new Date (); var order: DataObject; / / Untyped variable: var count = 0; var a = new Date(); var order = new DataObject(); / / At runtime, the ASL interpreter determines the type when the variable is first used, and the type remains unchanged until subsequent assignments implicitly change the type.

[0054] At runtime, the ASL interpreter determines the type when a variable is first used, and the type remains unchanged until a subsequent assignment implicitly changes the type.

[0055] Supports implicit variable type conversion s = "sup" + "OS" / / s = "supOS", concatenating two strings. t = "supos" + 4 / / t = "supos4", converting a number to a string u = 4 + "4" / / u = "44", converting a number to a string v = 4 + 4 / / v = 8, adding two numbers w = 23 - "17" / / w = 6, converting a string to a number Conversion of implicit variables during assignment (a = b): Note: "Y" indicates that an implicit conversion has occurred.

[0056] "w" indicates that a message may be displayed at compile time warning that the conversion may not occur. Whether the conversion occurs and whether a warning is displayed depends on the properties of the variables involved in the assignment.

[0057] "err" indicates that a compilation error has occurred.

[0058] "NA" indicates that no conversion is required. Usually, when a variable of type Object (general object) is converted to a specialized object type, no conversion is required.

[0059] "-" indicates that a and b are of the same type.

[0060] Operations in ASL: ASL supports basic arithmetic operations, as well as logical operations, conditional expressions, etc.

[0061] Basic operations include: "=", "+", "-", "*", " / ", "%".

[0062] Expressions can be grouped to affect the processing order. Unless parentheses are used to override the normal order, multiplication and division of expressions are calculated before addition and subtraction. Expressions within parentheses are processed before other calculations.

[0063] Logical operators compare two values and evaluate whether the result is true or false. The operators supported by ASL are: "!", "&&", "||", "==", "!=", "<", ">", "<=", ">=", and the operations support variables or other expressions. The expression that performs the comparison is called a conditional expression.

[0064] S2: Uniformly manage each business module through the Application Specific Language (ASL). Developers use the Domain Specific Language (DSL) definitions provided by the engine to describe business logic and store it in Json format. The business logic in Json format is converted into code in the TypeScript language that abstracts into the ASL at runtime by the ASL server.

[0065] In the entire low-code development platform, the Application Specific Language (ASL) plays a role in uniformly managing each business module. This means that regardless of the nature and function of the business module, it can be coordinated and integrated within the framework of ASL. ASL is like a general "language specification", and each business module follows it for definition and interaction, ensuring the consistency and coherence of the system.

[0066] When developers describe business logic, they do so through the Domain Specific Language (DSL) provided by the engine. Each business module may have its own corresponding DSL, which is designed specifically for the characteristics and requirements of that business module. For example, the page design module may have a DSL for describing page layout and components, and the workflow module may have a DSL for describing process steps and conditions. Developers can use these DSLs to express business logic more efficiently and accurately because the DSLs are closely related to the specific business.

[0067] The business logic described with DSL is stored in Json format. Json (JavaScript Object Notation) is a lightweight data exchange format that is concise, easy to read, and easy to parse.

[0068] At runtime, the business logic stored in Json format is converted by the ASL server. Specifically, it converts the business logic in Json format into code in the TypeScript language that abstracts into ASL. The ASL server is the core of this conversion process. It is responsible for reading the stored Json data and performing conversion operations according to pre-set rules and algorithms.

[0069] S3: According to different business requirements, convert the code in the specific language ASL into multiple target languages to generate industrial low-code applications.

[0070] Specifically, when generating industrial low-code applications, the specific language ASL is uniformly applied to both the client and server sides of the industrial low-code application; based on pre-set mapping rules, the abstract models and control structures in the specific language ASL are converted into corresponding implementations in the target language; for the server side, according to each of the target languages, auxiliary design of each parsing engine is performed to complete the conversion of the specific language ASL into the target language.

[0071] For example, when the target language is JavaScript code, TS code, as a superset of JavaScript, can be compiled by a TS language server into JavaScript code executable by a browser. For the server side, taking Java as an example, the platform uses swc4j as a parsing engine to convert TS code into JavaScript code and utilizes the V8 engine provided by Javet to execute it. This approach enables both the front-end and back-end to use a unified language specification, improving development efficiency.

[0072] By providing the code conversion service of ASL, we not only achieve the unification between different business modules but also bring more flexibility to the system. We can convert ASL code into multiple target languages, such as Java, Rust, etc., according to different requirements to meet the performance requirements in different scenarios. At the same time, this conversion mechanism also facilitates the extension of the system. We can support new languages and frameworks by customizing conversion rules to adapt to the ever-changing business needs. As Figure 4 shown, it is the architecture design block diagram of the ASL working process.

[0073] Furthermore, in step S3, it also includes: designing a code optimizer to optimize the code mapped to the target language. For example, it may include the following process: (1) Input module Responsible for receiving the original code converted from ASL and mapped to the target language (such as Java, Go, Rust, etc.). This module needs to perform preliminary parsing and formatting of the input code to ensure that the code format meets the requirements of internal processing by the optimizer.

[0074] (2) Analysis module Performs a comprehensive analysis of the input code, including syntax analysis, semantic analysis, and code structure analysis.

[0075] Syntax analysis: Checks whether the code conforms to the syntax rules of the target language and marks any syntax errors or non-standard usages.

[0076] Semantic analysis: Understand the actual meaning and function of the code, determine the scope of variable usage, the calling relationships of functions, and the data flow, etc.

[0077] Code structure analysis: Evaluate the overall structure of the code, including module division, function nesting depth, loop complexity, etc., in order to identify areas where there may be room for optimization.

[0078] (3) Optimization strategy module Based on the results of the analysis module, formulate specific optimization strategies. These strategies can include but are not limited to the following types: Code simplification strategy: If redundant expressions, unnecessary variable declarations, or duplicate code blocks are found in the code, formulate a strategy to simplify them. For example, merge multiple similar conditional judgments into a more concise expression, or delete unused variable declarations.

[0079] Performance improvement strategy: For key factors affecting performance, such as the execution efficiency of loops and the call overhead of functions, formulate corresponding strategies. For example, for frequently executed loops, consider using a more efficient loop structure (in some languages, replacing a while loop with a for loop may improve efficiency); for cases where the function call overhead is large, consider inlining the function (i.e., directly embedding the function body at the call site).

[0080] Memory management strategy: Analyze the memory usage in the code and formulate a strategy to optimize memory allocation and release. For example, in some languages, if a large number of temporary objects are found to be frequently created and destroyed, consider using an object pool technique to reduce memory fragmentation and allocation overhead.

[0081] (4) Execution module According to the strategies formulated by the optimization strategy module, perform actual optimization operations on the original code. This module needs to have the ability to modify and rewrite the target language code to ensure that the optimized code not only meets the requirements of the optimization strategy but also can still correctly implement the functions of the original code.

[0082] (5) Output module Output the optimized code for use in subsequent development processes. The output code should be high-quality code with a standardized format and in line with the best practices of the target language.

[0083] Furthermore, this embodiment also includes designing a visual development environment, specifically: In the visual development environment, each designer generates the corresponding domain-specific language (DSL) that serves as the meta-model through operations in the forward direction; when it is necessary to modify or view the existing DSL, the DSL that serves as the meta-model is generated in the reverse direction into the visual development environment, and the DSL is converted and presented in the visual development environment; the content generated during the operation of each designer in the visual development environment is processed and integrated by converting the DSL into the application-specific language (ASL).

[0084] Further, this embodiment also includes implementing the graphicalization of control structures in the visual development environment by dragging and dropping components, specifically as follows: In the visual development environment, a dedicated logic construction area is designed to provide a place for developers to build control structures. Various control structure components are stored in the component library and are selected and dragged into the logic construction area; After the developer drags the control structure component into the logic construction area, the control structure component can be freely placed; For branch structure components, they can be connected to different operation modules. For sequential structure components, multiple operation steps are sequentially connected by arrows or other connection methods. For nested structure components, relevant control structure components are included; When the user constructs a control structure through dragging and connecting operations, the platform converts these graphical operations into corresponding code or internal data structures in the background based on the application-specific language (ASL), generating control structure statements that conform to the syntax of this language.

[0085] Further, this embodiment also includes designing the script editor based on the application-specific language (ASL), specifically as follows: Previously, the editors for the client and server based on different high-level languages were all replaced by the ASL script editor. The script editor provides the basic function library necessary for developing a low-code development platform (LCDP), unifies the definition of the metadata of each layer of the LCDP, and supports the development of industrial low-code applications with a unified syntax; the script editor based on the application-specific language (ASL) supports the debugging function, and developers can step through the script and check the values of variables and expressions.

[0086] As a low-code platform, it is often impossible to meet the development of complex APPs with visual configuration. The platform also needs to provide a script editor to meet the development of personalized or complex functions by developers. Currently, the practice of many low-code platforms is to directly open the script engine to developers. For example, in Web front-end development, a JS script editor similar to ES is provided to developers. For workflow or other engines, a Groovy or Java code editor will be provided for users to develop back-end modules. Different languages have different data types, variables, expressions and other logics, which is not friendly to developers. Through the support of the underlying language provided by the ASL engine, this problem can be well solved.

[0087] The following is a section of ASL sample script under the script editor, which fully implements a business function: - Check whether the user's name has been filled in / / Check whether the user's name has been filled in function Page_PreInvokeMethod (MethodName){ / / SaveRecord is a predefined defined method, called by the savebutton if(MethodName == "SaveRecord") { var fName = this.GetDataObject().GetFieldValue("Name"); if(fName == null || fName == ""){ TheApplication().RaiseErrorText("Please enter the user name"); return CancelOperation; } } return (ContinueOperation); } ASL unifies the form data query method, and the front and back ends are uniformly described with a set of ASL syntax: - Obtain business opportunity data according to the customer name function iterateDemo () { var bc = null; try { bc = TheApplication().GetDataObject("Opportunity"); bc.ClearToQuery(); / / Clear the query conditions bc.SetViewMode(AllView); / / Query all, ignore the view bc.ActivateField("Id"); / / Query field, similar to select Id in SQL bc.ActivateField("Stage"); bc.SetSearchSpec("CusName", "*bob*"); / / Query condition bc.ExecuteQuery(ForwardOnly); } finally { bc = null; bo = null; } } Second Embodiment This embodiment provides a language parser for the application-specific language ASL, and the architecture implementation of ASL on the client and server sides. Combined with the actual cases of ASL in the platform form and workflow modules, the invention content of the first embodiment is described.

[0088] Forms and workflows are two different functional modules. The form module is responsible for the implementation of form modeling and the capabilities of adding, deleting, modifying, and querying form instance data. The workflow module is responsible for the implementation of form data calculation, data flow, manual review, etc. The engines have high similarities in some underlying calculations and data variables. The previous design was that each engine defined a set of DSLs. By introducing the application-specific language ASL, the platform unified the standards of filters and also unified the implementation of underlying capabilities by ASL. Taking the filtering function as an example: Components between form pages need to implement the data filtering function through filtering filters, such as Figure 5 shown.

[0089] Workflows also use the data filtering function in multiple places, such as form trigger condition filtering, branch filtering, etc. Figure 6 For the workflow to use the filtering function in mutually exclusive and compatible branches to determine whether to enter the branch.

[0090] Compare the filtering condition functions in two business modules. The data filtering in the form and the branching of the workflow are both based on comparisons of the type system. For example, for string types, the filtering conditions include "contains", "does not contain", etc.; for time types, there are comparisons such as "earlier than", "later than", etc. In the AST syntax, data filtering can be implemented based on data types, variables, and operations. The following is an example code: / / Define the ASL syntax: {"condition": [{"clientName", "contain", "aaa"}, {"submitTime", "<", "2014-10-01"}]} / / Example of the TS engine: var filterCondition = [{"testaaa", "contain", "aaa"}, / / ...]; var result = filter(filterCondition); console.log(result); / / Use the AST to define the filter function for operations to determine whether the conditions are met Third Embodiment As Figure 7 shown, this embodiment provides a system for generating industrial low-code applications based on a specific language for performing the method of generating industrial low-code applications based on a specific language as in the first embodiment, including: An application-specific language ASL generation module 1, which is used to analyze the APP metadata of the low-code integrated development environment platform X-IDE, as well as the functions of each engine and the domain-specific language DSL used by the engine as a meta-model, and abstract a set of application-specific language ASL suitable for the low-code integrated development environment platform X-IDE on the basis of the TypeScript language, as the base of the low-code integrated development environment platform X-IDE; An application-specific language ASL management module 2, which is used to uniformly manage each business module through the application-specific language ASL. Developers describe business logic through the definitions of the domain-specific language DSL provided by the engine and store it in Json format. The business logic in Json format is converted into code in the TypeScript language that is abstracted into the specific language ASL by the ASL server at runtime; An industrial low-code application generation module 3, which is used to convert the code of the specific language ASL into multiple target languages according to different business requirements to generate industrial low-code applications.

[0091] A computer-readable storage medium stores computer code, and when the computer code is executed, the above method is executed. Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and this program can be stored in a computer-readable storage medium. The storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disks, optical discs, etc.

[0092] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, several improvements and refinements made without departing from the principle of the present invention should also be regarded as within the protection scope of the present invention.

[0093] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as within the scope described in this specification.

[0094] It should be noted that the above embodiments can be freely combined according to needs. The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art in this technical field, several improvements and refinements can be made without departing from the principle of the present invention, and these improvements and refinements should also be regarded as within the protection scope of the present invention.

Claims

1. A method for generating industrial low-code applications based on a specific language, characterized in that: The following steps are involved: S1: Analyze the APP metadata of the low-code integrated development environment platform X-IDE, as well as the functions of each engine and the domain-specific language DSL used by the engine as a metamodel, and abstract a set of application-specific languages ​​​​(ASL) suitable for the low-code integrated development environment platform X-IDE based on the TypeScript language as the base of the low-code integrated development environment platform X-IDE; S2: All business modules are managed uniformly through the application specific language ASL. Developers describe business logic through the domain specific language DSL definition provided by the engine and store it in Json format. The business logic in Json format is converted by the ASL server into the TypeScript language code abstracted into the specific language ASL at runtime; S3: According to different business needs, the code of the specific language ASL is converted into multiple target languages ​​to generate industrial low-code applications.

2. The method for generating industrial low-code applications based on a specific language according to claim 1, characterized in that: In step S1, a set of application specific languages ​​​​ASL suitable for the low-code integrated development environment platform X-IDE is abstracted based on the TypeScript language. The application specific language ASL includes the following functions: Data type definition: define various data types including numbers, strings, and dates; Variable declaration and assignment: declare variables and assign values ​​to them; Expression calculation: supports various types of expression calculations including arithmetic expressions and logical expressions; Control flow: Supports control flow structures including conditional judgment and loop; Function definition and call: define custom functions and call them; Modularity: Modularize the code to improve the maintainability of the code.

3. The method for generating industrial low-code applications based on a specific language according to claim 1, characterized in that: In step S3, according to different business needs, the code of the specific language ASL is converted into multiple target languages ​​to generate the industrial low-code application, specifically: Apply the specific language ASL uniformly to the client and server of industrial low-code applications; Based on preset mapping rules, converting the abstract model and control structure in the specific language ASL into corresponding implementations in the target language; For the server, each parsing engine is designed according to each target language to convert the specific language ASL into the target language.

4. The method for generating industrial low-code applications based on a specific language according to claim 3 is characterized in that: In step S3, it also includes: Design a code optimizer to optimize the code mapped to the target language.

5. The method for generating industrial low-code applications based on a specific language according to claim 1, characterized in that: It also includes designing a visual development environment, specifically: Each designer in the visual development environment generates the corresponding domain specific language DSL as the metamodel through operation; When the existing domain-specific language DSL needs to be modified or viewed, the domain-specific language DSL as the metamodel is reversely generated into the visual development environment, and the domain-specific language DSL is converted and presented in the visual development environment; The contents generated by each designer in the visual development environment during operation are processed and integrated by converting the domain specific language DSL into the application specific language ASL.

6. The method for generating industrial low-code applications based on a specific language according to claim 5, characterized in that: It also includes realizing the graphical display of the control structure by dragging components in the visual development environment, specifically: In the visual development environment, a special logic construction area is designed to provide developers with control structure construction. Various control structure components are stored in the component library, and are selected from the component library and dragged to the logic construction area; After the developer drags the control structure component to the logic construction area, the developer can freely place the control structure component; For branch structure components, they can be connected to different operation modules. For sequence structure components, multiple operation steps can be connected in sequence through arrows or other connection methods. For nested structure components, related control structure components can be included. When the user builds a control structure through dragging and connecting operations, the platform converts these graphical operations into corresponding codes or internal data structures in the background based on the application specific language ASL, and generates control structure statements that conform to the grammar of the language.

7. The method for generating industrial low-code applications based on a specific language according to claim 1, characterized in that: It also includes designing the script editor based on the application specific language ASL, specifically: The script editor provides the basic function library necessary for developing a low-code development platform LCDP, unifies the definition of the metadata at each layer of the low-code development platform LCDP, and supports the development of the industrial low-code application with a unified syntax; The script editor based on the application specific language ASL supports debugging functions, and developers can execute scripts step by step and check the values ​​of variables and expressions.

8. A system for generating industrial low-code applications based on a specific language for executing the method for generating industrial low-code applications based on a specific language as described in any one of claims 1 to 7, characterized in that: include: An application specific language (ASL) generation module is used to analyze the APP metadata of the low-code integrated development environment platform X-IDE, as well as the functions of each engine and the domain specific language DSL used by the engine as a metamodel, and abstract a set of application specific languages ​​​​ASL suitable for the low-code integrated development environment platform X-IDE based on the TypeScript language as the base of the low-code integrated development environment platform X-IDE; An application specific language ASL management module is used to uniformly manage various business modules through the application specific language ASL. Developers describe business logic through the domain specific language DSL definition provided by the engine and store it in Json format. The business logic in Json format is converted by the ASL server into the TypeScript language code abstracted into the specific language ASL at runtime; The industrial low-code application generation module is used to convert the code of the specific language ASL into multiple target languages ​​according to different business needs to generate industrial low-code applications.

9. A computer device comprising a memory and one or more processors, wherein the memory stores computer codes, and when the computer codes are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 7. 10 . A computer-readable storage medium storing a computer code. When the computer code is executed, the method according to claim 1 is executed.