CN117055859A - Low-code development system based on data flow analysis - Google Patents

Low-code development system based on data flow analysis Download PDF

Info

Publication number
CN117055859A
CN117055859A CN202311155157.7A CN202311155157A CN117055859A CN 117055859 A CN117055859 A CN 117055859A CN 202311155157 A CN202311155157 A CN 202311155157A CN 117055859 A CN117055859 A CN 117055859A
Authority
CN
China
Prior art keywords
code
data
analysis
flow
data flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311155157.7A
Other languages
Chinese (zh)
Inventor
纪峰
李永超
雷一帆
刘晗
马一飞
王清艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi Environmental Protection Industry Research Institute Co ltd
Original Assignee
Shaanxi Environmental Protection Industry Research Institute Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shaanxi Environmental Protection Industry Research Institute Co ltd filed Critical Shaanxi Environmental Protection Industry Research Institute Co ltd
Priority to CN202311155157.7A priority Critical patent/CN117055859A/en
Publication of CN117055859A publication Critical patent/CN117055859A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a low-code development system based on data flow analysis, which comprises the following steps: data flow analysis: analyzing a source code, constructing an abstract syntax tree, and analyzing the data flow of related business of the existing middle-small micro business enterprise; and (3) generating a data model: determining entities and attributes in a data stream analysis result, creating an entity relationship diagram, and automatically generating a data model; the flow chart generation: identifying a flow control statement, constructing a flow chart, and automatically generating the flow chart; code generation: according to the low code development requirement, defining a template, matching the code template and automatically generating the code. The invention realizes the automatic analysis of the data flow and the generation of the data model and the flow chart required by the low-code development, thereby reducing the risk of manual work and manual error of the developer. Compared with the traditional low-code development mode, the method is more efficient and accurate, and can greatly improve the development efficiency.

Description

Low-code development system based on data flow analysis
Technical Field
The invention relates to the technical field of low code development in flow analysis, in particular to a low code development system based on data flow analysis.
Background
In the prior art, low code development is a method for application development through a graphical interface and visualization tools. The method can reduce the coding work of developers and improve the development efficiency. However, in the low code development process, the data model and the flow chart still need to be manually created, which requires a developer to have a certain field knowledge and technical capability and is easy to generate errors. Existing data models and flow chart generation methods rely primarily on manual creation by developers, which not only requires a great deal of time and effort, but also is prone to errors. Particularly when handling large-scale code, the manual creation of data models and flowcharts is more labor intensive and is prone to omission and errors. Aiming at the fields of small and medium-sized enterprises, especially service-type enterprises and less personnel, the problems of complicated development flow, large workload of manual carding flow of the developer, easy error and the like exist.
Therefore, an automated method is needed to generate the data model and flow diagrams required for low code development to reduce the workload of developers and improve development efficiency and accuracy.
Disclosure of Invention
The invention aims to solve the problems of large manual workload and easy error in the generation process of a data model and a flow chart required by low code development in the prior art. By automatically generating the data model and the flow chart, the workload of a developer can be reduced, and the development efficiency and accuracy are improved. Meanwhile, the technology has expansibility, can further realize the function of automatically generating codes, and meets wider development requirements.
The invention is realized by the following technical scheme.
A low code development system based on data flow analysis, comprising the steps of:
data flow analysis: analyzing a source code, constructing an abstract syntax tree, and analyzing the data flow of related business of the existing middle-small micro business enterprise;
and (3) generating a data model: determining entities and attributes in a data stream analysis result, creating an entity relationship diagram, and automatically generating a data model;
the flow chart generation: identifying a flow control statement, constructing a flow chart, and automatically generating the flow chart;
code generation: according to the low code development requirement, defining a template, matching the code template and automatically generating the code.
As a further improvement of the present invention, the step of data flow analysis is preceded by collecting data, specifically: and acquiring source code data consisting of source codes, data tables and APIs through a data interface and an acquisition tool.
As a further improvement of the present invention, in the step of data flow analysis, the data flow analysis specifically includes the steps of:
s11) extracting structural information of codes through lexical analysis, grammatical analysis and static analysis of semantic analysis to form an input end of data stream analysis;
s12) obtaining data flow information of codes in the running process through dynamic analysis of instrumentation and monitoring in the running process;
s13) verifying the accuracy of the static analysis by comparing the data flow information with the structure information.
As a further improvement of the present invention, the step data model generation specifically includes:
s21) determining entities and attributes involved in the flow of related services in the code, including but not limited to tables and fields;
s22) based on the entity and the attribute determined by the semantic and the context information, filtering and optimizing the entity and the attribute, and creating an entity relation graph to obtain the association relation and the constraint condition between the entity and the attribute;
s23) automatically generating a data model comprising database table structures and class definitions according to the association and constraint adjustments.
As a further improvement of the present invention, the step S23) is specifically:
and according to the association relation and constraint adjustment, automatically generating a data model containing database table structure and class definition by combining with a code template, and optimizing and simplifying the data model.
As a further improvement of the invention, the step flow chart generation specifically comprises the following steps:
s31) identifying a flow control statement in the source code according to the data flow analysis result;
s32) constructing a flow chart according to the identified flow control statement, and adding variables and data flow into the flow chart according to the data flow analysis result;
s33) automatically completing a flow chart including nodes, points and start-stop conditions based on the constructed flow chart structure.
As a further improvement of the invention, the step flow chart generation further comprises the steps of selecting a distributed computing and parallel algorithm to process the code fragments, and a plurality of codes are computed in parallel by a plurality of computers.
As a further improvement of the present invention, the step code generation specifically includes the steps of:
s41) defining a code template according to the flow of different service plates in the middle-small micro service enterprises;
s42) matching the data model and the flow chart which are analyzed and generated by the data flow with the code templates to find out the corresponding code templates;
s43) according to the matched code template, automatically generating corresponding codes, filling various variables and logics, and carrying out code optimization according to the data stream analysis result.
As a further development of the invention, in said step S41) there is also included an extension of the automation generated code, in particular supporting at least 2 programming languages and development frameworks during the code generation phase.
As a further improvement of the present invention, the step S41) further includes a scale processing of the code, specifically selecting a plurality of terminal devices, and calculating the code after the slicing processing in parallel.
The beneficial effects of the invention are as follows:
according to the invention, the data model and the flow chart are automatically generated, so that the workload of a developer can be reduced, and the development efficiency and accuracy are improved. Meanwhile, through improvement and expansion, the function of automatically generating codes can be further realized, and the wider development requirements are met. The method has wide applicability and can be applied to low-code development scenes in various fields.
Drawings
FIG. 1 is a flow chart of a low code development system based on data flow analysis provided by the invention;
FIG. 2 is a flow chart of a data stream analysis step provided by the present invention;
FIG. 3 is a flowchart of a data model generation step provided by the present invention;
FIG. 4 is a flowchart of the flowchart generation steps provided by the present invention;
fig. 5 is a flowchart of the code generation step provided by the present invention.
Detailed Description
The present invention will be described in detail below with reference to the embodiments shown in the drawings, but it should be understood that the embodiments are not limited to the present invention, and functional, method, or structural equivalents and alternatives according to the embodiments are within the scope of protection of the present invention by those skilled in the art.
Referring to fig. 1-5, the present invention provides a method and system for automatically generating a data model and flow chart required for low code development through data flow analysis based on data. Specifically, the method comprises the following steps:
step one, data flow analysis
Dataflow analysis is the core step of the present invention for collecting input data, parsing source code, building Abstract Syntax Trees (AST), and analyzing the data stream. In this embodiment, the collection of the input data includes collecting the data in real time through one of a data collection tool, an interface or manual collection, and updating the data flow analysis result in real time when the flow requirement or the cooperation relation is adjusted. The input data are required to be collected in real time or periodically, so that the process adjustment is avoided not being updated in time, at the moment, the system also comprises a sponsor, an implementation person, a supervisor and a responsible person for real-time recording of the process requirement or the adjustment of the cooperation relation, and the departments corresponding to the personnel are marked so as to ensure that the whole process is tracked, including the later responsibility, and the corresponding responsible person can be found.
For example, in the existing service type enterprise, the whole core includes a background service part, a finance part and a business part, while in a plurality of business processes, the main collaboration relationship includes a collaboration relationship between the background and business, between the background and finance and between the finance and business, and for each business process, the business process specifically includes process requirements of the background and the finance in different business blocks.
The specific steps of the data flow analysis are as follows:
1.1 collecting input data
Corresponding input data, including source code, data tables, APIs, etc., are obtained from the user or system. At this time, the history data of the user is formed into the input data, especially for various existing data tables and the like, the data tables record the cooperative relationship and the business flow and the like in the existing business flow, for example, for a certain consultation business, the business initiating end is generally a business part, then the business synchronously sends related business sheets to a background part and a financial part, then real-time follow-up is performed in time according to the consultation data, the financial situation and the like, and the progress feedback of the business flow is performed according to the related follow-up progress, so that the business part, the financial part and the background part can know the situation in real time.
In this embodiment, the collection of these data may also refer to the flow services on the internet or in the same party, especially for small and medium-sized enterprises, and the general flow is similar, and may be adjusted for specific detail differences.
1.2 parsing Source code
And analyzing the input source code, and identifying variables, functions and flow control sentences in the source code.
For example, for the following source code:
after analysis the following results were obtained:
the variables: a, b
Function: calcualate_sum
Flow control statement: if-else
In the parsing process, variables, functions and flow control sentences are identified, and the purpose of the parsing process is to provide original data for subsequent relation acquisition, grammar tree construction and the like. For example, in this embodiment, the function may be a fixed step or cost in the corresponding flow, and the variable is an adjustment of the number of services or the service range.
1.3 construction of Abstract Syntax Tree (AST)
And constructing an abstract syntax tree according to the source code obtained by analysis, and representing the structure and semantic information of the code.
For example, for the source code described above, the abstract syntax tree is constructed as follows:
1.4 analysis of data streams
Based on the abstract syntax tree, data flow analysis is performed, the definition and use of variables are tracked, and the flow path of data in codes is determined.
For example, for the abstract syntax tree described above, the following data stream analysis results may be obtained:
definition and usage path of variable a: calcualate_sum- > a
Definition and usage path of variable b: calcualate_sum- > b
In this embodiment, by acquiring data, analyzing the data, and re-integrating the abstract syntax tree, the previous data stream is thoroughly analyzed, so as to provide accurate data for the construction of the subsequent data model and the like.
In this embodiment, when data stream analysis is performed, a method of combining static analysis and dynamic analysis is introduced, code structure information is extracted by using static analysis, and data stream information in operation is obtained by using dynamic analysis.
Static analysis
Static analysis refers to extracting structural information of a code by analyzing syntax and structure of the code without executing the code. In data flow analysis, static analysis can help us identify important information such as variables, functions, and flow control statements.
In the static analysis process, the following method is used to extract the structural information of the code:
lexical analysis: the code is broken down into individual lexical units by identifying keywords, identifiers, operators, etc. in the code.
Syntax analysis: and constructing a grammar tree according to the combination rule of the lexical units, and representing the structure and semantic information of the codes.
Semantic analysis: and analyzing the grammar tree, checking the semantic correctness of codes, and identifying important information such as variables, functions, flow control sentences and the like.
Through static analysis, the structural information of codes, such as variables, functions, flow control sentences and the like, is obtained. This information can be used as input to the data stream analysis to facilitate a better understanding of the logic and data flow of the code.
Dynamic analysis
Dynamic analysis refers to acquiring data flow information during running by monitoring the execution state and data flow of the code in the process of executing the code. In data flow analysis, dynamic analysis can help to understand the behavior of code at runtime and the data flow path.
In the dynamic analysis process, the following method is used to obtain the runtime data stream information:
pile insertion: and inserting monitoring codes into the codes for recording the definition and the use condition of the variables.
Runtime monitoring: during code execution, the values of variables and data flow paths are monitored.
Data flow information of the code in running time, such as definition of variables and a use path, is obtained through dynamic analysis. The information can be compared with the results obtained by static analysis, so that the accuracy of the static analysis is verified, and the results of data flow analysis are further optimized.
Description of the preferred embodiments
To verify the effectiveness of the combined static and dynamic analysis method, the following cases were used:
assume the following source code:
static analysis is used to extract structural information of codes such as variables, functions, flow control statements, etc.:
the variables: a, b
Function: calcualate_sum
Flow control statement: if-else
Dynamic analysis is then used to obtain runtime data flow information, such as definitions of variables and usage paths:
definition and usage path of variable a: calcualate_sum- > a
Definition and usage path of variable b: calcualate_sum- > b
By comparing the results of the static analysis with the results of the dynamic analysis, the accuracy of the static analysis can be verified and the results of the data stream analysis can be further optimized. By introducing a method combining static analysis and dynamic analysis, the analysis speed and accuracy of complex codes are improved, and the result of data flow analysis is further optimized, so that the efficiency and accuracy of automatically generating a data model and a flow chart required by low code development are improved.
In this embodiment, static analysis may extract structural information of the code, such as variables, functions, and flow control statements; dynamic analysis may obtain runtime data flow information such as definitions of variables and usage paths. By comparing the results of the static analysis with the results of the dynamic analysis, the accuracy of the static analysis can be verified and the results of the data stream analysis can be further optimized. Through the optimization schemes, the efficiency and accuracy of automatically generating the data model and the flow chart required by low code development can be further improved.
Step two, generating a data model
Data model generation is an important step of the present invention for determining entities and attributes, creating entity relationship graphs, and automatically generating data models. The method comprises the following specific steps:
2.1 determining entities and attributes
Based on the results of the data flow analysis, the entities and attributes involved in the code, such as tables, fields, etc., are determined.
For example, for the data stream analysis results described above, the following entities and attributes may be determined:
entity: calcualate_sum
Attributes: a, b
In this embodiment, in the step of determining the entity and the attribute, the following improvement scheme may be further selected:
1) Combining domain knowledge and code analysis: in addition to relying on the results of the data flow analysis, the entities and attributes may be determined in conjunction with domain knowledge and the results of the code analysis. By analyzing the semantics and context information of the code, entities and attributes can be more accurately determined.
2) Filtering and optimizing the entity and the attribute: after determining the entities and attributes, filtering and optimization may be performed to remove unnecessary entities and attributes, and to merge similar entities and attributes, thereby generating a more compact and efficient data model.
2.2 creation of entity relationship graphs
Based on the determined entity and attribute, an entity relation graph is created, and the association relation and constraint conditions between the entity relation graph and the attribute are expressed.
For example, for the entities and attributes described above, the created entity relationship graph is as follows:
calculate sum
the following modes can be selected:
let E denote a set of entities and a denote a set of attributes.
The set E of entities can be expressed as:
e= { E1, E2,..en }, where ei represents the i-th entity.
The set of attributes a can be expressed as:
a= { a1, a2, am }; where aj represents the j-th attribute.
When the entity relation graph is created, the association relation and the constraint condition between the entities are created based on the determined entities and the determined attributes, and the entities are mainly departments.
Let R denote a set of associations between entities and C denote a set of constraints between entities.
The set R of associations between entities can be expressed as:
R={r 1 ,r 2 ,...,r k -where r i Indicating the ith association.
The set of constraints between entities C can be expressed as:
C={c 1 ,c 2 ,...,c 1 -a }; wherein C is j Representing the j-th constraint.
2.3 automatic data model Generation
According to the entity relation diagram, a data model is automatically generated, wherein the data model comprises a database table structure, class definitions and the like.
For example, from the entity-relationship graph described above, the following data model may be automatically generated:
specifically, let T denote a set of database table structures and D denote a set of class definitions.
The set T of database table structures can be expressed as:
T={t 1 ,t 2 ,...,t p -a }; wherein t is i Representing the i-th database table structure.
The set D of class definitions may be expressed as:
D={d 1 ,d 2 ,...,d q -a }; wherein d is j Representing the j-th class definition.
In this embodiment, in order to better create the entity relationship graph, the data model may be automatically generated in combination with the code template in addition to the dependent entity relationship graph. By matching the entity relationship graph with the code template, a data model is generated more accurately, and various variables and logics are filled.
After the data model is automatically generated, optimization and simplification can be performed, unnecessary data model definitions are removed, and therefore a more concise and efficient data model is generated.
Step three, generating a flow chart
Flow chart generation is a key step of the present invention for identifying flow control statements, constructing a flow chart, and automating the generation of a flow chart. The method comprises the following specific steps:
3.1 identifying Process control statements
Based on the result of the data flow analysis, flow control statements in the source code, such as conditional statements, loop statements, etc., are identified.
For example, for the following source code:
the identified flow control statement is: if-else
In this embodiment, for the identification of the flow control statement, a combination scheme of dynamic analysis and static analysis may be selected, and specifically, the static analysis may extract structural information of the code, including a syntax tree, a control flow graph, and the like, so as to identify the flow control statement more accurately. Dynamic analysis can acquire data flow information during operation, and further helps identify flow control sentences. By comprehensively utilizing the results of static analysis and dynamic analysis, the accuracy of identifying the flow control statement can be improved.
3.2 construction of the flow chart
And constructing a flow chart according to the identified flow control statement, and adding variables and data flow into the flow chart according to the data flow analysis result.
For example, for the above-described flow control statement and data flow analysis results, the constructed flow chart is as follows:
start->if(a>b)->return(a+b)->end
->el se->return(a-b)->end
in this embodiment, in order to make the generated flowchart have a visual effect, graphic elements and styles may be introduced to improve the intuitiveness and easy comprehensiveness of the subsequent presentation. For example, in this embodiment, attributes such as the shape, color, and size of the nodes may be added to the flowchart to distinguish between different types of nodes. Attributes such as arrows, colors, and lines may be added to the edges to indicate the direction and relationship of the flow. Special identification can be added to the start and end conditions to facilitate a user's quick understanding of the start and end of the flow. By improving these visualization effects, the readability and usability of the flow chart can be improved.
3.3 automated Generation flow sheet
Based on the constructed flow diagram structure, a complete flow diagram is automatically generated, which may include nodes, edges, start termination conditions, and the like.
In this embodiment, the automation flowchart lacks flexibility, so that ports can be added at this time, and user interfaces and interaction modes are introduced, so that a user can more conveniently specify requirements and configuration of the flowchart. For example, the user may specify nodes, edges, start termination conditions, etc. of the flow chart by way of dragging and configuration. The user can select different node shapes, colors and styles according to own requirements, adjust the arrow, colors and line types of the edges, set the marks of the starting and ending conditions, and the like. Through the flexible configuration mode, a user can generate a flow chart meeting the requirements of the user according to the requirements of the user.
In the current scheme, handling large-scale code may present efficiency and time issues. To improve processing efficiency and reduce run time, we can introduce distributed computing and parallel algorithms.
Distributed computing may process code in pieces and utilize multiple computers for parallel computing. By processing the code fragments, the load of a single computer can be reduced, and the processing efficiency can be improved. By performing parallel computation using a plurality of computers, the running time can be further reduced, and the processing speed can be increased.
Step four, code generation
Code generation is an improvement of the present invention for automatically generating code from data models and flowcharts of data flow analysis and generation. The method comprises the following specific steps:
4.1 code template definition
Corresponding code templates, including templates of different business logic, are defined according to the requirements of low code development.
For example, the following code templates are defined:
4.2 code template matching
And matching the data model and the flow chart which are analyzed and generated by the data flow with the code templates to find out the corresponding code templates.
For example, based on the results of the data flow analysis and the generated data model and flow chart, matching to the following code templates:
4.3 automatic code Generation
And automatically generating corresponding codes according to the matched code templates, filling various variables and logics, and optimizing the codes according to the data flow analysis result.
For example, according to the matched code templates, the following codes are automatically generated:
in the invention, the analysis speed and accuracy of complex codes can be improved by improving the data flow analysis algorithm. For example, a method of combining static analysis and dynamic analysis is introduced, code structure information is extracted by using the static analysis, and runtime data stream information is acquired by using the dynamic analysis. Static analysis may obtain structural information of code by parsing source code, building an Abstract Syntax Tree (AST). Dynamic analysis may collect data flow information at runtime by running code. By combining static analysis and dynamic analysis, the data flow of the codes can be more comprehensively analyzed, and the analysis accuracy is improved. For example, in the static analysis phase, variables, functions, and flow control statements may be identified by parsing the source code. During the dynamic analysis phase, the code may be run, the definition and use of variables tracked, and the flow path of the data in the code determined. Through the combination of static analysis and dynamic analysis, the data flow can be analyzed more accurately, and the analysis effect is improved. In the static analysis phase, variables, functions, and flow control statements may be identified. During the dynamic analysis phase, the code may be run, the definition and use of variables tracked, and the flow path of the data in the code determined. And by combining static analysis and dynamic analysis, the data stream can be accurately analyzed, and the analysis speed and accuracy of complex codes are improved.
Furthermore, the invention also increases the function of expanding automatic code generation, and particularly expands the code generation stage further, thereby realizing the support of multiple programming languages and development frameworks and improving the range and effect of automatic code generation. Such as Python and low code development frameworks. To meet the wider development needs, more programming languages and development frameworks can be extended to support.
For example, programming languages such as Java and C# can be supported, and development frameworks such as Spring and NET can be supported. By expanding the supported programming language and development framework, the low-code development requirements under different development scenes can be better met.
Assuming that Java code needs to be generated, the Java code can be automatically generated according to the data model and the flow chart of the data flow analysis and the generation.
User interfaces and interactions may also be improved in the present invention
For example, a friendly user interface is designed to provide a convenient interaction mode, so that a user can more conveniently specify the requirements and configuration of code generation.
In order to process large-scale code, distributed computing and parallel algorithms can be introduced, improving processing efficiency and reducing run time.
Currently, this technique may suffer from a low processing efficiency and a long run time when processing large-scale code. To address this problem, distributed computing and parallel algorithms may be introduced.
Distributed computing may process code in pieces and utilize multiple computers for parallel computing. By processing the code fragments, the processing efficiency can be improved. By using multiple computers for parallel computation, the runtime can be reduced.
Implementation case: given a large-scale code library, data flow analysis is required and the data models, flowcharts, and code required for low code development are generated. In order to improve processing efficiency and reduce running time, code may be fragmented and calculated in parallel using multiple computers.
For example, the code base is divided into a plurality of subsets, each of which is processed by a computer. Each computer performs data flow analysis and generates data models, flowcharts, and codes, respectively. And finally, merging the results of each subset to obtain a final data model, a flow chart and codes.
By introducing distributed computation and parallel algorithms, the efficiency of processing large-scale codes can be improved, and the running time can be reduced.
For example, a visual interface is provided that specifies the requirements for code generation by drag and configuration.
Through the implementation steps and the improvement scheme, the invention can realize automatic analysis of the data flow and generate a data model, a flow chart and codes required by low code development, thereby improving development efficiency and accuracy. Meanwhile, the method can be applied to various fields, and the low code development requirements under different scenes are met.
The method is particularly applied to the small and medium service type enterprises, and mainly generates different business processes, and the technical implementation steps are as follows:
and (3) data flow analysis:
1.1 collecting input data: corresponding input data, including source code, data tables, APIs, etc., are obtained from the user or system. The input data at this time is an existing flow chart or the like.
1.2 parsing source code: and analyzing the input source code, and identifying variables, functions and flow control sentences in the source code. At this time, related variables, control sentences, etc. between the departments or in a certain flow chart can be identified.
1.3 building Abstract Syntax Tree (AST): and constructing an abstract syntax tree according to the source code obtained by analysis, and representing the structure and semantic information of the code.
1.4 analysis of data streams: based on the abstract syntax tree, data flow analysis is performed, the definition and use of variables are tracked, and the flow path of data in codes is determined.
And (3) generating a data model:
2.1 determining entities and attributes: based on the results of the data flow analysis, the entities and attributes involved in the code, such as tables, fields, etc., are determined.
2.2 creating an entity relationship graph: based on the determined entity and attribute, an entity relation graph is created, and the association relation and constraint conditions between the entity relation graph and the attribute are expressed.
2.3 automatically generating a data model: according to the entity relation diagram, a data model is automatically generated, wherein the data model comprises a database table structure, class definitions and the like.
The flow chart generation:
3.1 identifying a flow control statement: based on the result of the data flow analysis, flow control statements in the source code, such as conditional statements, loop statements, etc., are identified.
3.2 building a flow chart: and constructing a flow chart according to the identified flow control statement, and adding variables and data flow into the flow chart according to the data flow analysis result. 3.3 automated generation flow chart: based on the constructed flow diagram structure, a complete flow diagram is automatically generated, which may include nodes, edges, start termination conditions, and the like.
Code generation:
4.1 code template definition: corresponding code templates, including templates of different business logic, are defined according to the requirements of low code development.
4.2 code template matching: and matching the data model and the flow chart which are analyzed and generated by the data flow with the code templates to find out the corresponding code templates.
4.3 automatic code generation: and automatically generating corresponding codes according to the matched code templates, filling various variables and logics, and optimizing the codes according to the data flow analysis result.
The invention improves the analysis speed and accuracy of complex codes by improving the data flow analysis algorithm.
The invention further expands in the code generation stage, realizes the support of multiple programming languages and development frameworks, and improves the range and effect of automatic code generation.
For large-scale code processing: for large-scale code processing, distributed computation and parallel algorithms can be introduced, so that the processing efficiency is improved and the running time is reduced.
Improving user interface and interaction modes: and a friendly user interface is designed, so that a convenient interaction mode is provided, and a user can more conveniently specify the requirements and configuration of code generation.
Through the implementation steps and the improvement scheme, the invention can realize automatic analysis of the data flow and generate a data model, a flow chart and codes required by low code development, thereby improving development efficiency and accuracy. Meanwhile, the method can be applied to various fields, and the low code development requirements under different scenes are met.
The above list of detailed descriptions is only specific to practical embodiments of the present invention, and they are not intended to limit the scope of the present invention, and all equivalent embodiments or modifications that do not depart from the spirit of the present invention should be included in the scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.

Claims (10)

1. A low code development system based on data flow analysis, comprising the steps of:
data flow analysis: analyzing a source code, constructing an abstract syntax tree, and analyzing the data flow of related business of the existing middle-small micro business enterprise;
and (3) generating a data model: determining entities and attributes in a data stream analysis result, creating an entity relationship diagram, and automatically generating a data model;
the flow chart generation: identifying a flow control statement, constructing a flow chart, and automatically generating the flow chart;
code generation: according to the low code development requirement, defining a template, matching the code template and automatically generating the code.
2. The low-code development system based on data flow analysis according to claim 1, further comprising the step of collecting data prior to the step of data flow analysis, in particular: and acquiring source code data consisting of source codes, data tables and APIs through a data interface and an acquisition tool.
3. The low code development system based on data flow analysis according to claim 1, wherein in the step of data flow analysis, the data flow analysis specifically comprises the following steps:
s11) extracting structural information of codes through lexical analysis, grammatical analysis and static analysis of semantic analysis to form an input end of data stream analysis;
s12) obtaining data flow information of codes in the running process through dynamic analysis of instrumentation and monitoring in the running process;
s13) verifying the accuracy of the static analysis by comparing the data flow information with the structure information.
4. The low-code development system based on data flow analysis of claim 1, wherein the step data model generation is specifically:
s21) determining entities and attributes involved in the flow of related services in the code, including but not limited to tables and fields;
s22) based on the entity and the attribute determined by the semantic and the context information, filtering and optimizing the entity and the attribute, and creating an entity relation graph to obtain the association relation and the constraint condition between the entity and the attribute;
s23) automatically generating a data model comprising database table structures and class definitions according to the association and constraint adjustments.
5. The low-code development system based on data flow analysis according to claim 4, wherein the step S23) is specifically:
and according to the association relation and constraint adjustment, automatically generating a data model containing database table structure and class definition by combining with a code template, and optimizing and simplifying the data model.
6. The low-code development system based on data flow analysis according to claim 1, wherein the step flow chart generation comprises the following steps:
s31) identifying a flow control statement in the source code according to the data flow analysis result;
s32) constructing a flow chart according to the identified flow control statement, and adding variables and data flow into the flow chart according to the data flow analysis result;
s33) automatically completing a flow chart including nodes, points and start-stop conditions based on the constructed flow chart structure.
7. The system of claim 6, wherein the step of generating the flow chart further comprises selecting a distributed computing and parallel algorithm to process the code fragments, and the plurality of codes are computed in parallel by the plurality of computers.
8. The low code development system based on data flow analysis of claim 1, wherein the step code generation specifically comprises the steps of:
s41) defining a code template according to the flow of different service plates in the middle-small micro service enterprises;
s42) matching the data model and the flow chart which are analyzed and generated by the data flow with the code templates to find out the corresponding code templates;
s43) according to the matched code template, automatically generating corresponding codes, filling various variables and logics, and carrying out code optimization according to the data stream analysis result.
9. The low code development system based on data flow analysis according to claim 8, characterized in that in step S41) further comprises expanding the automation generated code, in particular in the code generation phase, supporting at least 2 programming languages and development frameworks.
10. The system for developing low-level codes based on data flow analysis according to claim 8, wherein in step S41), the system further comprises a scale process of the code, specifically selecting a plurality of terminal devices, and calculating the code after the slicing process in parallel.
CN202311155157.7A 2023-09-07 2023-09-07 Low-code development system based on data flow analysis Pending CN117055859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311155157.7A CN117055859A (en) 2023-09-07 2023-09-07 Low-code development system based on data flow analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311155157.7A CN117055859A (en) 2023-09-07 2023-09-07 Low-code development system based on data flow analysis

Publications (1)

Publication Number Publication Date
CN117055859A true CN117055859A (en) 2023-11-14

Family

ID=88666318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311155157.7A Pending CN117055859A (en) 2023-09-07 2023-09-07 Low-code development system based on data flow analysis

Country Status (1)

Country Link
CN (1) CN117055859A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724683A (en) * 2024-02-07 2024-03-19 深圳海云安网络安全技术有限公司 Business logic coding frame generation method and system based on large language model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724683A (en) * 2024-02-07 2024-03-19 深圳海云安网络安全技术有限公司 Business logic coding frame generation method and system based on large language model
CN117724683B (en) * 2024-02-07 2024-04-26 深圳海云安网络安全技术有限公司 Business logic coding frame generation method and system based on large language model

Similar Documents

Publication Publication Date Title
CN109117131B (en) Code generation method and device, storage medium and electronic terminal
EP2228726B1 (en) A method and system for task modeling of mobile phone applications
US20160062753A1 (en) Method for transforming first code instructions in a first programming language into second code instructions in a second programming language
US8898635B2 (en) System and method for automatic impact variable analysis and field expansion in mainframe systems
CA2548334A1 (en) An apparatus for migration and conversion of software code from any source platform to any target platform
CN111708801A (en) Report generation method and device and electronic equipment
CN104731588B (en) Page layout document generating method and page layout file creating apparatus
CN117055859A (en) Low-code development system based on data flow analysis
KR102172255B1 (en) Method and apparatus for executing distributed computing tasks
CN111858608A (en) Data management method, device, server and storage medium
CN113849162A (en) Code generation method combining model drive and deep neural network
CN114443854A (en) Processing method and device of multi-source heterogeneous data, computer equipment and storage medium
CN114036183A (en) Data ETL processing method, device, equipment and medium
US20030200534A1 (en) Mechanism for reformatting a simple source code statement into a compound source code statement
CN113377372A (en) Business rule analysis method and device, computer equipment and storage medium
JPH10254689A (en) Application constitution design supporting system for client/server system
CN117632710A (en) Method, device, equipment and storage medium for generating test code
CN110989991B (en) Method and system for detecting source code clone open source software in application program
CN115469849B (en) Service processing system, method, electronic equipment and storage medium
CN108132802B (en) Application method of configuration model in system development
JP4948126B2 (en) Program for analyzing large-scale business system using Java (registered trademark) language program and processing method thereof
CN115469860A (en) Method and system for automatically generating demand-to-software field model based on instruction set
CN115145584A (en) Parser generation method, data processing method, medium, and device
CN111126012B (en) Custom generation expression method and device
Fernández-Ropero et al. Repairing business process models as retrieved from source code

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination