CN116185372A - Back-end source code generation method, device, equipment and storage medium - Google Patents

Back-end source code generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN116185372A
CN116185372A CN202310458549.4A CN202310458549A CN116185372A CN 116185372 A CN116185372 A CN 116185372A CN 202310458549 A CN202310458549 A CN 202310458549A CN 116185372 A CN116185372 A CN 116185372A
Authority
CN
China
Prior art keywords
data table
data tables
end source
form data
secondary development
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.)
Granted
Application number
CN202310458549.4A
Other languages
Chinese (zh)
Other versions
CN116185372B (en
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.)
Shandong Inspur Science Research Institute Co Ltd
Original Assignee
Shandong Inspur Science 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 Shandong Inspur Science Research Institute Co Ltd filed Critical Shandong Inspur Science Research Institute Co Ltd
Priority to CN202310458549.4A priority Critical patent/CN116185372B/en
Publication of CN116185372A publication Critical patent/CN116185372A/en
Application granted granted Critical
Publication of CN116185372B publication Critical patent/CN116185372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for generating back-end source codes, which are applied to a low-code development platform and relate to the field of software development, and the method comprises the following steps: designing an initial form based on user requirements, and configuring corresponding authority and a flow engine of the initial form to generate a corresponding target data table in a background database; the target data table comprises an initial form data table, a permission information table and a flow data table; selecting an application to be subjected to secondary development and a plurality of form data tables positioned in a target data table, and determining association relations among the plurality of form data tables based on machine learning; constructing a corresponding template file based on a plurality of form data tables and association relations by using a preset template technology; and generating back-end source codes required by secondary development according to the form data tables and the template files. Therefore, the method and the device can realize the back-end code output of the system, can be used for rapidly developing and expanding functions for the second time, and reduce development cost and development period.

Description

Back-end source code generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of software development, and in particular, to a method, an apparatus, a device, and a storage medium for generating a back-end source code.
Background
Low-code development platforms are popular, and users can quickly customize their own low-code development environment and generate application programs according to their own business without encoding or through a small amount of code. In some cases, the customers need to customize individually, the original platform cannot meet the requirements, and meanwhile, the quick development is desired, so that the low-code development platform needs to have the capability of supporting secondary development of the customers, and the low-code platform needs to have the capability of outputting codes from front ends and back ends. The clients can perform preliminary visual rendering of the assembly and have CRUD (adding, deleting and modifying) capability of the form only by copying the files coded by the low-code platform into the project built by themselves. Most of low-code platforms on the market at present are front-end and back-end separated frame structures, front-end development technologies include VUE, react and the like, and code output technologies are also rich, wherein a representative Lowcode-Engine is compared. The development of the back end mostly adopts Java technology for development, but a complete technical system is not available in the aspect of the code output of the background service.
Disclosure of Invention
In view of the above, the present invention aims to provide a method, an apparatus, a device and a storage medium for generating back-end source codes, which can realize fast and effective code output. The specific scheme is as follows:
in a first aspect, the application discloses a method for generating back-end source codes, which is applied to a low-code development platform and includes:
designing an initial form based on user requirements, and configuring corresponding authority and a flow engine of the initial form to generate a corresponding target data table in a background database; the target data table comprises an initial form data table, a permission information table and a flow data table;
selecting an application to be subjected to secondary development and a plurality of form data tables positioned in the target data table, and determining association relations among the plurality of form data tables based on machine learning;
constructing corresponding template files based on the form data tables and the association relations by using a preset template technology;
and generating back-end source codes required by secondary development according to the form data tables and the template files.
Optionally, the step of designing an initial form based on the user requirement and configuring the corresponding authority and the flow engine of the initial form to generate a corresponding target data table in the background database includes:
and designing the initial form in a low-code platform design state based on the user requirements, configuring corresponding authority and a flow engine of the initial form, and publishing the designed initial form to an operation state to generate a corresponding target data table in the background database of the operation state.
Optionally, the selecting the application to be secondarily developed and the plurality of form data tables located in the target data table includes:
and selecting the application to be subjected to secondary development and the plurality of form data tables in the target data table through a Web interface or directly from the background database.
Optionally, the determining the association relationship between the plurality of form data tables based on machine learning includes:
acquiring the relation of item sets in the database by an iterative method of layer-by-layer searching based on the association rule algorithm of machine learning, so as to determine the association relation among the plurality of form data tables according to the relation of the item sets; wherein each item set contains a plurality of items, and one field in the data table is one item.
Optionally, the generating the back-end source code required by secondary development according to the form data tables and the template file includes:
generating the back-end source codes required by secondary development according to the form data tables and the template files by using a code generator; the back-end source code comprises Java files responsible for data processing, structured query language files used for physical and chemical processing, data table Mapper files and configuration files.
Optionally, after generating the back-end source code required for secondary development according to the form data tables and the template file, the method further includes:
based on the structured query language file, carrying out physical and chemical treatment on the database table required by the secondary development at a client so as to store data required by the secondary development operation; the database table comprises a plurality of forms, rights, an engine and system configuration.
Optionally, after generating the back-end source code required for secondary development according to the form data tables and the template file, the method further includes:
and building a SpringBoot project at the client, and importing the configuration file and the back-end source code into the SpringBoot project to realize compiling operation.
In a second aspect, the application discloses a backend source code generating device, applied to a low-code development platform, including:
the data table generation module is used for designing an initial form based on the requirement of a user and configuring corresponding authority and a flow engine of the initial form so as to generate a corresponding target data table in a background database; the target data table comprises an initial form data table, a permission information table and a flow data table;
the relation determining module is used for selecting an application to be subjected to secondary development and a plurality of form data tables positioned in the target data table, and determining the association relation among the plurality of form data tables based on machine learning; the data table comprises a plurality of form data tables;
the template file construction module is used for constructing corresponding template files based on the plurality of form data tables and the association relation by utilizing a preset template technology;
and the source code generation module is used for generating back-end source codes required by secondary development according to the form data tables and the template file.
In a third aspect, the present application discloses an electronic device comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the back-end source code generation method.
In a fourth aspect, the present application discloses a computer readable storage medium storing a computer program, which when executed by a processor implements the aforementioned back-end source code generation method.
As can be seen from the above, when the present application generates the back-end source code, firstly, an initial form is designed based on the user requirement and corresponding authority and flow engine of the initial form are configured, so as to generate a corresponding target data table in the background database; the target data table comprises an initial form data table, a permission information table and a flow data table; selecting an application to be subjected to secondary development and a plurality of form data tables positioned in the target data table, and determining association relations among the plurality of form data tables based on machine learning; constructing corresponding template files based on the form data tables and the association relations by using a preset template technology; and generating back-end source codes required by secondary development according to the form data tables and the template files. Therefore, the method and the device adopt low-code platform development to realize the back-end code output of the system, can be used for rapidly secondarily developing and expanding functions, and reduce development cost and development period. Meanwhile, the system adopts a rule algorithm based on machine learning, so that the relation of the input data table is rapidly and effectively analyzed, and the accuracy of template generation is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for generating back-end source codes disclosed in the present application;
FIG. 2 is a schematic diagram of a dataset disclosed herein;
FIG. 3 is a diagram of a low code development platform association representing intent;
FIG. 4 is a schematic diagram of a low code development platform output frequent item disclosed herein;
FIG. 5 is a flowchart of a method for generating back-end source codes disclosed in the present application;
FIG. 6 is a schematic diagram of a back end source code generating device disclosed in the present application;
fig. 7 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Most of low-code platforms on the market at present are front-end and back-end separated frame structures, front-end development technologies include VUE, react and the like, and code output technologies are also rich, wherein a representative Lowcode-Engine is compared. The development of the back end mostly adopts Java technology for development, but a complete technical system is not available in the aspect of the code output of the background service. In order to solve the technical problems, the application provides a back-end source code generation method which can effectively generate back-end source codes for secondary development and directly use the back-end source codes for development.
Referring to fig. 1, the embodiment of the invention discloses a back-end source code generation method, which is applied to a low-code development platform and comprises the following steps:
step S11, designing an initial form based on user requirements and configuring corresponding authorities and a flow engine of the initial form so as to generate a corresponding target data table in a background database; the target data table comprises an initial form data table, a permission information table and a flow data table.
In this embodiment, the initial form is designed in a low code platform design state based on the user requirement, and the corresponding authority and flow engine of the initial form are configured, and the designed initial form is issued to an operation state, so that a corresponding target data table is generated in the background database in the operation state. I.e., the design of forms is done in a low code platform design state and the entitlement control and flow engine can be further configured as needed to address customer needs. After the design state finishes the design and is released to the running state, a corresponding data table is generated in a background database of the running state, wherein the corresponding data table comprises a form data table and a corresponding authority information table, and a flow data table.
And step S12, selecting an application to be subjected to secondary development and a plurality of form data tables in the target data table, and determining association relations among the plurality of form data tables based on machine learning.
In this embodiment, the application to be secondarily developed and the plurality of form data tables located in the target data table are selected through a Web interface or directly from the background database. Acquiring the relation of item sets in the database by an iterative method of layer-by-layer searching based on the association rule algorithm of machine learning, so as to determine the association relation among the plurality of form data tables according to the relation of the item sets; wherein each item set contains a plurality of items, and one field in the data table is one item. The method comprises the steps of selecting an application required to be secondarily developed by a customer and a plurality of forms a, b, c and d through a Web interface or directly from a database. Taking a plurality of data tables a, b, c and d as input, finding out the relation of item sets in a database by an iterative method of layer-by-layer searching according to a machine-learning association rule algorithm to form rules, so as to find out the association relation among the plurality of data tables, wherein the association relation comprises but is not limited to the following relation: parent-child dependencies and commonly used sub-components.
The most commonly used association rule algorithms for machine learning are Apriori (Frequent item set algorithm for mining association rules) algorithm and FP-growth (Frequent Pattern growth) algorithm. The former scans the database for a plurality of times, and each time the candidate frequent set is utilized to generate a frequent set; the latter uses tree structure to directly obtain frequent set, to reduce the times of scanning database, to improve the algorithm efficiency. Using Apriori algorithm in this low code development, it is first necessary to construct a dataset as shown in fig. 2. Where each corresponding data table is defined as a transaction, each field in the data table is referred to as an item, a set containing zero or more items is referred to as an item set, e.g., { id1, input1, address1, radio1, par-tid 1}, an item set containing k items is referred to as a k-item set, e.g., { id1, input1, address1, radio1, par-tid 1} is referred to as a 1-item set, { id3, par-tid 1, checkbox3} is referred to as a 3-item set. For regular front and back pieces, { parentid } is called front piece, { input } and so on are called back piece. And further, index analysis is carried out through the support degree, the confidence degree and the lifting degree. Here, the id3 value of the c transaction is equal to the pantids of the a transaction and the b transaction. The support is the proportion of records containing the item set in the data set, and represents the proportion of transactions containing a and b simultaneously to all transactions; the credibility is defined for an association rule, and represents the proportion of transactions containing b in the transactions containing a, namely the proportion of transactions containing a and b in the transactions containing a. The low code development platform association table design is shown in fig. 3, in which IMPLIES represents that there is a correlation from left to right. The degree of promotion represents the ratio of the "proportion of transactions containing a and b" to the "proportion of transactions containing b". In the case of multiple tables of large data volume, related library files are directly called through python script, and frequent parent classes and common components are output through confidence call as shown in fig. 4. As can be seen, the method and the device adopt a rule algorithm based on machine learning, so that the relation of the input data table is rapidly and effectively analyzed, and the accuracy of template generation is improved. This advantage is especially evident in cases where the amount of input form data required for secondary development is enormous.
And S13, constructing a corresponding template file based on the plurality of form data tables and the association relation by using a preset template technology.
In this embodiment, a plurality of data tables and association relations between the data tables are used as input, and corresponding template files are constructed according to a relationship template technology. The form adopts a unified CURD template file. Separate templates are created for the parent class and the common component class.
And S14, generating back-end source codes required by secondary development according to the form data tables and the template files.
In this embodiment, the code generator is utilized to generate the back end source code required for secondary development according to the form data tables and the template file; the back-end source code comprises Java files responsible for data processing, structured query language files used for physical and chemical processing, data table Mapper files and configuration files. Namely, a code generator is used for generating source codes required for secondary development, wherein the source codes comprise Java files in charge of CRUD, SQL (Structured Query Language ) files in need of materialization, data table Mapper files, configuration files pos.xml, boottrap.yml and the like. SpringBoot and SpringCloud related dependencies are added in the configuration file pon.xml to support micro services, so that source files required for secondary development are ready. After generating the back-end source code required by secondary development according to the form data tables and the template file, the method further comprises the following steps: based on the structured query language file, carrying out physical and chemical treatment on the database table required by the secondary development at a client so as to store data required by the secondary development operation; the database table comprises a plurality of forms, rights, an engine and system configuration. That is, a secondary development project needs to be built next, and different servers are selected according to different scale requirements of customer deployment. In a specific embodiment, if only thousands of users are supported for concurrent access, a 16c32G memory 500G hard disk may be deployed, and an operating system is installed on the server, and centos7.6 or more is selected. Then, after the environment is initialized and the network such as a firewall is configured, JDK and basic components such as database mariadib, micro-service configuration center nacos, redis database cache and front-end nginx web server are installed. After the construction of the server side of the secondary development is finished, the SQL file generated by the code generator is imported into a database of the server side, and a database table (comprising a form, authority, an engine, system configuration and the like) required by the secondary development is materialized in the database and used for storing data required by the secondary operation.
After generating the back-end source code required by secondary development according to the form data tables and the template file, the method further comprises the following steps: and building a SpringBoot project at the client, and importing the configuration file and the back-end source code into the SpringBoot project to realize compiling operation. And finally, newly creating a SpringBoot project at the secondary developed client, copying configuration files pom.xml and boottrap.yml, and generating all source code files by a code generator according to the requirements of the configuration files. After copying into the secondary development project, the client project is directly compiled and operated to realize the open-box and instant use, and further the quick secondary development is carried out.
As can be seen from the above, when the present application generates the back-end source code, firstly, an initial form is designed based on the user requirement and corresponding authority and flow engine of the initial form are configured, so as to generate a corresponding target data table in the background database; the target data table comprises an initial form data table, a permission information table and a flow data table; selecting an application to be subjected to secondary development and a plurality of form data tables positioned in the target data table, and determining association relations among the plurality of form data tables based on machine learning; constructing corresponding template files based on the form data tables and the association relations by using a preset template technology; and generating back-end source codes required by secondary development according to the form data tables and the template files. Therefore, the method and the device adopt low-code platform development to realize the back-end code output of the system, can be used for rapidly secondarily developing and expanding functions, and reduce development cost and development period. Meanwhile, the system adopts a rule algorithm based on machine learning, so that the relation of the input data table is rapidly and effectively analyzed, and the accuracy of template generation is improved.
Referring to fig. 5, the application discloses a method for generating back-end source codes, which is applied to a low-code development platform and comprises the following steps:
in this embodiment, to the low code platform rear end play code problem that exists at present, this application provides an effectual play code ability, through this application developer can effectively go out the code fast. The main steps of the method are as follows: first, the form is designed in a low code platform design state according to customer requirements. Rights and flow engines may be further configured, if desired. After the design state finishes the design and is released to the running state, a corresponding data table is generated in a background database of the running state, wherein the corresponding data table comprises a form data table and a corresponding authority information table, and a flow data table. And then selecting an application and a plurality of forms which are required to be secondarily developed by the clients. The method comprises the steps of taking a plurality of data tables generated in an operation state as input, finding out the relation of item sets in a database through an iteration method of layer-by-layer searching according to a machine learning association rule algorithm to form rules, and combing out association relations among the plurality of data tables, wherein the association relations comprise but are not limited to the following relations: including parent-child dependencies; a commonly used subassembly. And then, taking a plurality of data tables and the association relation between the data tables as input, and constructing a corresponding template file according to a density/freeMaker template technology. And then using a code generator to generate source codes required by secondary development, wherein the source codes comprise Java files in charge of CURD, SQL files required to be materialized, data table Mapper files, configuration files and the like. And according to the generated SQL file, materializing a database table (comprising forms, rights, engines, system configuration and the like) required by secondary development at the client. Finally, constructing a customer engineering, importing a source code file generated by a code generator, compiling and running to realize the out-of-box use, and further carrying out faster secondary development.
That is, the application designs an initial form according to the user requirement and configures the corresponding authority and flow engine of the form, extracts the corresponding running form database table as data input, uses the algorithm based on the machine learning rule to identify the relation between the input data tables, then generates the corresponding template file according to the relation more quickly in the template module, generates the back end source code required by secondary development according to the database form data and the template file in the code output module, materializes the database table required by secondary development, and finally combines the file generated by the front end code output to be imported into the customer engineering for effective personalized and customized secondary development.
Therefore, the method and the device adopt low-code platform development to realize the rear-end code output of the system, can be used for rapidly secondarily developing and expanding functions, and reduce development cost and development period. Meanwhile, the system adopts a rule algorithm based on machine learning, so that the relation of the input data table is rapidly and effectively analyzed, and the accuracy of template generation is improved. This advantage is especially evident in cases where the amount of input form data required for secondary development is enormous.
Referring to fig. 6, an embodiment of the present invention discloses a back-end source code generating device, which is applied to a low-code development platform, and includes:
the data table generating module 11 is used for designing an initial table based on user requirements and configuring corresponding authority and a flow engine of the initial table so as to generate a corresponding target data table in a background database; the target data table comprises an initial form data table, a permission information table and a flow data table;
a relationship determining module 12, configured to select an application to be secondarily developed and a plurality of form data tables located in the target data table, and determine association relationships between the plurality of form data tables based on machine learning; the data table comprises a plurality of form data tables;
the template file construction module 13 is used for constructing corresponding template files based on the plurality of form data tables and the association relation by using a preset template technology;
and the source code generation module 14 is used for generating back-end source codes required by secondary development according to the form data tables and the template file.
As can be seen from the above, when the present application generates the back-end source code, firstly, an initial form is designed based on the user requirement and corresponding authority and flow engine of the initial form are configured, so as to generate a corresponding target data table in the background database; the target data table comprises an initial form data table, a permission information table and a flow data table; selecting an application to be subjected to secondary development and a plurality of form data tables positioned in the target data table, and determining association relations among the plurality of form data tables based on machine learning; constructing corresponding template files based on the form data tables and the association relations by using a preset template technology; and generating back-end source codes required by secondary development according to the form data tables and the template files. Therefore, the method and the device adopt low-code platform development to realize the back-end code output of the system, can be used for rapidly secondarily developing and expanding functions, and reduce development cost and development period. Meanwhile, the system adopts a rule algorithm based on machine learning, so that the relation of the input data table is rapidly and effectively analyzed, and the accuracy of template generation is improved.
In some specific embodiments, the data table generating module 11 may specifically include:
and the target data table generation unit is used for designing the initial form in a low code platform design state based on the user requirement, configuring corresponding authority and a flow engine of the initial form, and releasing the designed initial form to an operation state so as to generate a corresponding target data table in the background database in the operation state.
In some specific embodiments, the relationship determination module 12 may specifically include:
the data table selection unit is used for selecting the application to be subjected to secondary development and the plurality of table data tables in the target data table through a Web interface or directly from the background database.
In some specific embodiments, the relationship determination module 12 may specifically include:
the relation determining unit is used for acquiring the relation of the item sets in the database through an iterative method of layer-by-layer searching based on the association rule algorithm of the machine learning so as to determine the association relation among the plurality of form data tables according to the relation of the item sets; wherein each item set contains a plurality of items, and one field in the data table is one item.
In some specific embodiments, the source code generation module 14 may specifically include:
the source code generating unit is used for generating the back-end source codes required by secondary development according to the form data tables and the template files by utilizing a code generator; the back-end source code comprises Java files responsible for data processing, structured query language files used for physical and chemical processing, data table Mapper files and configuration files.
In some specific embodiments, the source code generation module 14 may further include:
the materialization processing unit is used for materializing the database table required by the secondary development on the basis of the structured query language file at the client side so as to store data required by the secondary development operation; the database table comprises a plurality of forms, rights, an engine and system configuration.
In some specific embodiments, the source code generation module 14 may further include:
the project building unit is used for building a SpringBoot project at the client, and importing the configuration file and the back-end source code into the SpringBoot project to realize compiling operation.
Further, the embodiment of the present application further discloses an electronic device, and fig. 7 is a block diagram of the electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 7 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, where the computer program is loaded and executed by the processor 21 to implement relevant steps in the back-end source code generating method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol in which the communication interface is in compliance is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the back-end source code generation method performed by the electronic device 20 as disclosed in any of the previous embodiments.
Further, the application also discloses a computer readable storage medium for storing a computer program; the method for generating the back-end source codes comprises the steps of executing a computer program by a processor, wherein the computer program realizes the back-end source code generation method disclosed in the prior art. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined the detailed description of the preferred embodiment of the present application, and the detailed description of the principles and embodiments of the present application has been provided herein by way of example only to facilitate the understanding of the method and core concepts of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. The back-end source code generation method is characterized by being applied to a low-code development platform and comprising the following steps of:
designing an initial form based on user requirements, and configuring corresponding authority and a flow engine of the initial form to generate a corresponding target data table in a background database; the target data table comprises an initial form data table, a permission information table and a flow data table;
selecting an application to be subjected to secondary development and a plurality of form data tables positioned in the target data table, and determining association relations among the plurality of form data tables based on machine learning;
constructing corresponding template files based on the form data tables and the association relations by using a preset template technology;
and generating back-end source codes required by secondary development according to the form data tables and the template files.
2. The method for generating back-end source codes according to claim 1, wherein said designing an initial form based on user requirements and configuring corresponding rights and flow engines of said initial form to generate corresponding target data tables in a background database comprises:
and designing the initial form in a low-code platform design state based on the user requirements, configuring corresponding authority and a flow engine of the initial form, and publishing the designed initial form to an operation state to generate a corresponding target data table in the background database of the operation state.
3. The method for generating back-end source codes according to claim 1, wherein said selecting an application to be secondarily developed and a plurality of form data tables located in said target data table comprises:
and selecting the application to be subjected to secondary development and the plurality of form data tables in the target data table through a Web interface or directly from the background database.
4. The method of generating back-end source codes according to claim 1, wherein said determining an association relationship between the plurality of form data tables based on machine learning comprises:
acquiring the relation of item sets in the database by an iterative method of layer-by-layer searching based on the association rule algorithm of machine learning, so as to determine the association relation among the plurality of form data tables according to the relation of the item sets; wherein each item set contains a plurality of items, and one field in the data table is one item.
5. The method for generating back-end source codes according to any one of claims 1 to 4, wherein generating back-end source codes required for secondary development according to the form data tables and the template file comprises:
generating the back-end source codes required by secondary development according to the form data tables and the template files by using a code generator; the back-end source code comprises Java files responsible for data processing, structured query language files used for physical and chemical processing, data table Mapper files and configuration files.
6. The method for generating back-end source codes according to claim 5, further comprising, after generating back-end source codes required for secondary development according to the plurality of form data tables and the template file:
based on the structured query language file, carrying out physical and chemical treatment on the database table required by the secondary development at a client so as to store data required by the secondary development operation; the database table comprises a plurality of forms, rights, an engine and system configuration.
7. The method for generating back-end source codes according to claim 5, further comprising, after generating back-end source codes required for secondary development according to the plurality of form data tables and the template file:
and building a SpringBoot project at the client, and importing the configuration file and the back-end source code into the SpringBoot project to realize compiling operation.
8. The back-end source code generation device is characterized by being applied to a low-code development platform and comprising:
the data table generation module is used for designing an initial form based on the requirement of a user and configuring corresponding authority and a flow engine of the initial form so as to generate a corresponding target data table in a background database; the target data table comprises an initial form data table, a permission information table and a flow data table;
the relation determining module is used for selecting an application to be subjected to secondary development and a plurality of form data tables positioned in the target data table, and determining the association relation among the plurality of form data tables based on machine learning; the data table comprises a plurality of form data tables;
the template file construction module is used for constructing corresponding template files based on the plurality of form data tables and the association relation by utilizing a preset template technology;
and the source code generation module is used for generating back-end source codes required by secondary development according to the form data tables and the template file.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the back-end source code generation method of any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program which when executed by a processor implements the back-end source code generation method of any one of claims 1 to 7.
CN202310458549.4A 2023-04-26 2023-04-26 Back-end source code generation method, device, equipment and storage medium Active CN116185372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310458549.4A CN116185372B (en) 2023-04-26 2023-04-26 Back-end source code generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310458549.4A CN116185372B (en) 2023-04-26 2023-04-26 Back-end source code generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116185372A true CN116185372A (en) 2023-05-30
CN116185372B CN116185372B (en) 2023-07-21

Family

ID=86450838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310458549.4A Active CN116185372B (en) 2023-04-26 2023-04-26 Back-end source code generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116185372B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558573A (en) * 2017-12-21 2019-04-02 上海土木信息科技有限公司 A kind of list flow engine based on user-defined m odel language
CN110018822A (en) * 2019-04-16 2019-07-16 山东浪潮通软信息科技有限公司 A kind of method and system automatically generating micro services function
CN111241497A (en) * 2020-02-13 2020-06-05 北京高质系统科技有限公司 Open source code tracing detection method based on software multiplexing feature learning
CN114036443A (en) * 2021-11-29 2022-02-11 北京百度网讯科技有限公司 Page generation method and device
CN114282752A (en) * 2021-11-15 2022-04-05 煤炭科学研究总院 Method and device for generating flow task, electronic equipment and storage medium
CN114895880A (en) * 2022-04-02 2022-08-12 山东浪潮通软信息科技有限公司 Code generation method and device and computer readable medium
CN115268916A (en) * 2022-09-29 2022-11-01 泰豪软件股份有限公司 Dynamic form implementation method and system based on low-code development platform
CN115357252A (en) * 2022-10-08 2022-11-18 成都数联云算科技有限公司 Source code file generation method and device, electronic equipment and storage medium
CN115617327A (en) * 2022-11-08 2023-01-17 浙江极氪智能科技有限公司 Low code page building system, method and computer readable storage medium
WO2023000726A1 (en) * 2021-07-21 2023-01-26 广州地铁集团有限公司 Device reverse integration access method, device reverse integration management method and system, and computer device
CN115712413A (en) * 2022-11-15 2023-02-24 广东中设智控科技股份有限公司 Low code development method, device, equipment and storage medium
CN115756436A (en) * 2022-11-30 2023-03-07 山东浪潮科学研究院有限公司 Device and method for constructing visual large screen through template configuration
CN115857914A (en) * 2022-12-21 2023-03-28 企知道网络技术有限公司 Method, equipment and storage medium for automatically generating codes
CN115878092A (en) * 2022-12-09 2023-03-31 山东浪潮质量链科技有限公司 Code generation method, device and medium based on micro-service architecture
CN115993966A (en) * 2023-03-24 2023-04-21 美云智数科技有限公司 Application development system and method

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558573A (en) * 2017-12-21 2019-04-02 上海土木信息科技有限公司 A kind of list flow engine based on user-defined m odel language
CN110018822A (en) * 2019-04-16 2019-07-16 山东浪潮通软信息科技有限公司 A kind of method and system automatically generating micro services function
CN111241497A (en) * 2020-02-13 2020-06-05 北京高质系统科技有限公司 Open source code tracing detection method based on software multiplexing feature learning
WO2023000726A1 (en) * 2021-07-21 2023-01-26 广州地铁集团有限公司 Device reverse integration access method, device reverse integration management method and system, and computer device
CN114282752A (en) * 2021-11-15 2022-04-05 煤炭科学研究总院 Method and device for generating flow task, electronic equipment and storage medium
CN114036443A (en) * 2021-11-29 2022-02-11 北京百度网讯科技有限公司 Page generation method and device
CN114895880A (en) * 2022-04-02 2022-08-12 山东浪潮通软信息科技有限公司 Code generation method and device and computer readable medium
CN115268916A (en) * 2022-09-29 2022-11-01 泰豪软件股份有限公司 Dynamic form implementation method and system based on low-code development platform
CN115357252A (en) * 2022-10-08 2022-11-18 成都数联云算科技有限公司 Source code file generation method and device, electronic equipment and storage medium
CN115617327A (en) * 2022-11-08 2023-01-17 浙江极氪智能科技有限公司 Low code page building system, method and computer readable storage medium
CN115712413A (en) * 2022-11-15 2023-02-24 广东中设智控科技股份有限公司 Low code development method, device, equipment and storage medium
CN115756436A (en) * 2022-11-30 2023-03-07 山东浪潮科学研究院有限公司 Device and method for constructing visual large screen through template configuration
CN115878092A (en) * 2022-12-09 2023-03-31 山东浪潮质量链科技有限公司 Code generation method, device and medium based on micro-service architecture
CN115857914A (en) * 2022-12-21 2023-03-28 企知道网络技术有限公司 Method, equipment and storage medium for automatically generating codes
CN115993966A (en) * 2023-03-24 2023-04-21 美云智数科技有限公司 Application development system and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DAVIDE DI RUSCIO: "Low-code development and model-driven engineering:Two sides of the same coin?", SOFTWARE AND SYSTEMS MODELING, pages 437 - 446 *
刘金花: "代码生成器--实现生成pojo,sql,mapper接口", pages 1 - 10, Retrieved from the Internet <URL:https://www.cnblogs.com/liujinhua1221/p/9975570.html> *
毛弟弟: "关系数据库中多表间关联规则算法研究", 中国优秀硕士学位论文全文数据库, pages 138 - 647 *

Also Published As

Publication number Publication date
CN116185372B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
Andreas et al. Task-oriented dialogue as dataflow synthesis
US8037409B2 (en) Method for learning portal content model enhancements
CN111563141B (en) Method and system for processing input questions to query a database
US20050210000A1 (en) Semantic web portal graphic interface
RU2340937C2 (en) Declarative sequential report parametrisation
CN101971176A (en) Type system for building extensible business applications
CN112463149B (en) Software-defined satellite-oriented reusable code library construction method and device
Cesario et al. Distributed data mining patterns and services: an architecture and experiments
CN118228698A (en) Dynamic form generation method, device, equipment and storage medium
CN116185372B (en) Back-end source code generation method, device, equipment and storage medium
Romero et al. Equivalent rewritings on path views with binding patterns
US20070153706A1 (en) Design time support for service adaptation
US20240126761A1 (en) System and methods for processing data queries in hybrid data mesh architectures
US12019627B2 (en) Automatically and incrementally specifying queries through dialog understanding in real time
US20230222358A1 (en) Artificial intelligence operations adaptive multi-granularity event grouping
Kim et al. Runtime service discovery and reconfiguration using OWL-S based semantic web service
Hakong et al. Expert systems techniques: an application in statistics
CN112905153B (en) Software parallel construction method and device for software defined satellite
Mukhitova et al. Aapplication of XML-technologies in the Construction of Input and Editing Data Model in the Adaptive Administrative Graphical Web Interfaces for Heterogeneous Information Systems
Radwan et al. Model-Based Approach for Supporting Quick Caching at iOS Platform
Perugini et al. Program transformations for information personalization
CN114968622A (en) Processor interface management method, device, equipment and storage medium
Pop et al. WORKFLOW BASED SERVICE COMPOSITION USING GENETIC ALGORITHMS
Tuovinen OPC UA Address Space Transformations
Chen et al. A Knowledge Service Framework based on Ontology

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
GR01 Patent grant
GR01 Patent grant