[go: up one dir, main page]

CN118963765A - A method, device, equipment and storage medium for automatically generating software system code - Google Patents

A method, device, equipment and storage medium for automatically generating software system code Download PDF

Info

Publication number
CN118963765A
CN118963765A CN202411037712.0A CN202411037712A CN118963765A CN 118963765 A CN118963765 A CN 118963765A CN 202411037712 A CN202411037712 A CN 202411037712A CN 118963765 A CN118963765 A CN 118963765A
Authority
CN
China
Prior art keywords
code
module
target
information
codes
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
CN202411037712.0A
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.)
Xi'an Huaxun Technology Co ltd
Original Assignee
Xi'an Huaxun Technology 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 Xi'an Huaxun Technology Co ltd filed Critical Xi'an Huaxun Technology Co ltd
Priority to CN202411037712.0A priority Critical patent/CN118963765A/en
Publication of CN118963765A publication Critical patent/CN118963765A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • 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)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供一种软件系统代码自动生成方法、装置、设备及存储介质,涉及软件代码开发技术领域。该方法包括:根据目标表单的类型,采用多模态表单分析工具,对目标表单进行分析,得到目标表单的表单信息;根据表单信息,采用预设的应用开发框架,生成应用框架模块的基础业务系统代码、数据库模块的数据处理代码、交互模块的界面图片资源、后端模块的表单操作代码、前端模块的表单显示代码以及表单模块的功能代码;根据上述各模块的代码和图片资源,生成目标表单业务系统的目标代码。如此,能够实现从多模态目标表单到对应的业务系统的自动生成,去除了人工二次开发的过程,节约了人力成本。

The present application provides a method, device, equipment and storage medium for automatically generating software system code, and relates to the technical field of software code development. The method comprises: according to the type of the target form, using a multimodal form analysis tool to analyze the target form and obtain the form information of the target form; according to the form information, using a preset application development framework to generate the basic business system code of the application framework module, the data processing code of the database module, the interface image resources of the interaction module, the form operation code of the back-end module, the form display code of the front-end module and the function code of the form module; according to the codes and image resources of the above modules, the target code of the target form business system is generated. In this way, the automatic generation from the multimodal target form to the corresponding business system can be realized, eliminating the process of manual secondary development and saving labor costs.

Description

Automatic software system code generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of software code development technologies, and in particular, to a method, an apparatus, a device, and a storage medium for automatically generating a software system code.
Background
At present, the method for generating the software system codes generally carries out front-end and back-end logic design development of the system by a low-code platform according to a preset low-code software template, and then realizes a service system by manual secondary development work.
However, according to the method for generating the software system code by the low-code platform, the system code can be generated only by a mechanical template, the changes related to the business and the analysis of the form are needed to be solved by means of manual work, and meanwhile, the work of completing the generation of the software system code by the low-code platform is assisted.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for automatically generating software system codes so as to realize the automatic generation from a multi-mode target form to a corresponding service system, eliminate the process of manual secondary development and save the labor cost.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
In a first aspect, an embodiment of the present application provides a method for automatically generating software system code, including: according to the type of the target form, a multi-mode form analysis tool is adopted to analyze the target form to obtain form information of the target form, wherein the form information comprises: business information, field attribute of form data item, form association relation; according to the service information, the field attribute of the form data item and the form association relation, a preset application development framework is adopted to generate a basic service system code of an application framework module, a data processing code of a database module, an interface picture resource of an interaction module, a form operation code of a back-end module, a form display code of a front-end module and a function code of a form module; and generating an object code of an object form service system according to the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code.
In one embodiment, the generating, according to the service information, the field attribute of the form data item, and the form association relation, a basic service system code of an application framework module, a data processing code of a database module, an interface picture resource of an interaction module, a form operation code of a back-end module, a form display code of a front-end module, and a function code of a form module by using a preset application development framework includes: determining system configuration information according to the service information; generating the basic service system code by adopting the application development framework according to the system configuration information; generating the data processing code according to the field attribute of the form data item and the form association relation; generating the interface picture resource according to the field attribute of the form data item; according to the field attribute of the form data item and the form association relation, adopting the application development framework to respectively generate the form operation code and the form display code; and generating the function code according to the form information.
In one embodiment, the generating the object code of the object form service system according to the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code includes: according to the programming language of a preset code template, carrying out language conversion on the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the functional code to obtain converted codes of all modules; and compiling the converted codes of the modules to generate the codes of the target form service system.
In one embodiment, the language conversion is performed on the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code according to a programming language of a preset code template to obtain converted codes of each module, including: according to the preset code template, rewriting the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code; and carrying out service logic recombination on the codes of all the rewritten modules to generate converted codes of all the modules.
In one embodiment, the multimodal form analysis tool has pre-integrated therein: a call interface for a plurality of form-type analysis algorithms; analyzing the target form by adopting a multi-mode form analysis tool according to the type of the target form to obtain form information of the target form, wherein the method comprises the following steps: and according to the type of the target form, calling a calling interface of a target analysis algorithm corresponding to the type by adopting the multi-mode form analysis tool, and analyzing the target form to obtain form information of the target form.
In one embodiment, the analysis algorithm for the plurality of form types includes: a photo text large model of a picture form type, a text large model of a text form type, a form large model of a form type, and a file parsing tool of a file form type.
In one embodiment, the form information further includes: the data content of the form data direction; before the generating the basic service system code of the application framework module, the data processing code of the database module, the interface picture resource of the interaction module, the form operation code of the back-end module, the form display code of the front-end module and the function code of the form module by adopting the preset application development framework according to the service information, the field attribute of the form data item and the form association relation, the method further comprises: and checking the form association relation according to the data content.
In a second aspect, an embodiment of the present application further provides an apparatus for automatically generating software system code, including: the form analysis module is configured to analyze the target form by adopting a multi-mode form analysis tool according to the type of the target form to obtain form information of the target form, wherein the form information comprises: business information, field attribute of form data item, form association relation; the code conversion module is configured to generate a basic service system code of the application framework module, a data processing code of the database module, an interface picture resource of the interaction module, a form operation code of the back-end module, a form display code of the front-end module and a function code of the form module by adopting a preset application development framework according to the service information, the field attribute of the form data item and the form association relation; the code generation module is configured to generate an object code of an object form service system according to the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code.
In one embodiment, the transcoding module is configured to: determining system configuration information according to the service information; generating the basic service system code by adopting the application development framework according to the system configuration information; generating the data processing code according to the field attribute of the form data item and the form association relation; generating the interface picture resource according to the field attribute of the form data item; according to the field attribute of the form data item and the form association relation, adopting the application development framework to respectively generate the form operation code and the form display code; and generating the function code according to the form information.
In one embodiment, the code generation module is configured to: according to the programming language of a preset code template, carrying out language conversion on the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the functional code to obtain converted codes of all modules; and compiling the converted codes of the modules to generate the codes of the target form service system.
In one embodiment, the code generation module is configured to: according to the preset code template, rewriting the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code; and carrying out service logic recombination on the codes of all the rewritten modules to generate converted codes of all the modules.
In one embodiment, the multimodal form analysis tool has pre-integrated therein: a call interface for a plurality of form-type analysis algorithms; the form analysis module is configured to: and according to the type of the target form, calling a calling interface of a target analysis algorithm corresponding to the type by adopting the multi-mode form analysis tool, and analyzing the target form to obtain form information of the target form.
In one embodiment, the analysis algorithm for the plurality of form types includes: a photo text large model of a picture form type, a text large model of a text form type, a form large model of a form type, and a file parsing tool of a file form type.
In one embodiment, the form information further includes: the data content of the form data item; the software system code automatic generation apparatus further includes a verification module configured to: and checking the form association relation according to the data content.
In a third aspect, an embodiment of the present application further provides a computer apparatus, including: the computer system comprises a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when the computer device runs, the processor and the storage medium are communicated through the bus, and the processor executes the program instructions to execute the steps of any one of the methods.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods described above.
The beneficial effects of the application are as follows: analyzing the target form to obtain form information; performing code conversion on the form information based on the application development framework to obtain codes of all modules of the target form service system; and compiling codes of each module to obtain a target form service system code so as to operate the target form service system. Therefore, the automatic generation from the multi-mode target form to the corresponding service system can be realized, the process of manual secondary development is eliminated, and the labor cost is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for automatically generating a software system code according to an embodiment of the present application;
FIG. 2 is an exemplary diagram of a target form in a method for automatically generating a software system code according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a method for automatically generating a software system code according to an embodiment of the present application;
FIG. 4 is an exemplary diagram of a target form service system in a method for automatically generating a software system code according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a method for automatically generating a software system code according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of a method for automatically generating a software system code according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an automatic software system code generating device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the present application, it should be noted that, if the terms "upper", "lower", and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or an azimuth or the positional relationship conventionally put in use of the product of the application, it is merely for convenience of describing the present application and simplifying the description, and it is not indicated or implied that the apparatus or element referred to must have a specific azimuth, be configured and operated in a specific azimuth, and thus should not be construed as limiting the present application.
Furthermore, the terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
FIG. 1 is a schematic flow chart of a method for automatically generating a software system code according to an embodiment of the present application; as shown in fig. 1, the method includes:
Step 110: and analyzing the target form by adopting a multi-mode form analysis tool according to the type of the target form to obtain the form information of the target form.
Wherein the form information includes: business information, field attributes of form data items, and form association relations.
The target form refers to a form input to the multi-modal form analysis tool for form analysis, and the number of target forms may be one or more, and is not limited herein. The target form may be a blank form (including information such as a header and no actual service data), or may be a form filled with actual service data (including information such as a header and actual service data), which is not limited herein.
The types of target forms may be varied, such as: pictures, text, tables, files, etc., are not limited herein. In actual operation, the type of content in a target form may be one or more, for example: a target form may include only pictures or text, or may include both pictures and text, and is not limited herein.
The multi-modal form analysis tool integrates analysis tools for a variety of preset form types, such as: an analysis tool for a picture form type, an analysis tool for a text form type, an analysis tool for a file form type, etc.
The service information may include: service names such as: the target form is a purchase application form, and then the business information is purchase; the target form is a leave request form, and then the service information is leave.
Form data items may be understood as the heads of rows or columns of a form in a form; such as: as shown in fig. 2, the codes, the category, the name, the number, the specification, the unit price, the description, and the like in the purchase requisition are displayed.
Field properties of form data items, such as: the field attributes of the coded data item in the form data item include: the data type, the indication information of whether the data is empty, the data length, the data precision and the data description, wherein the data type can be an integer, and the data length is as follows: maximum length, data accuracy: the data description is a code for recording purchase orders, and is used for uniquely identifying each purchase order. For another example: the field attributes of the category are: data type: string, whether null is allowed: the maximum length is: none, precision: none, description: describing the category of assets or items to be purchased, such as office supplies, electronic equipment, etc.
The form association may include: the association relationship in the form may also include association relationship between forms, which is not limited herein. The association relationship in the form is the association relationship between field attributes of different form data items in the form; the association relation between the forms comprises: association relationship between field attributes of the same/different form data items in different forms.
In actual operation, because of the reason of computer language, it is generally necessary to establish a corresponding relationship between Chinese and English in all fields in the form information. Specifically, the Chinese-English correspondence of each field can be established through a large text model and a batch field translation question-answer mode; further, the conflict situation in the translation process can be solved through a repeated question-and-answer mode of single-field accurate translation.
Step 120: according to the service information, the field attribute of the form data item and the form association relation, a preset application development framework is adopted to generate a basic service system code of an application framework module, a data processing code of a database module, an interface picture resource of an interaction module, a form operation code of a back-end module, a form display code of a front-end module and a function code of a form module.
The preset application development framework, namely the preset application development framework, is a software development framework, and provides a standardized method and tool for helping developers to construct application programs more quickly and efficiently. Some core components, libraries, and tools are typically included, which are designed to work cooperatively to reduce the repetitive labor in the development process and to increase development efficiency. The application development framework generally has the characteristics of expandability, modularization, customizability and the like, so that a developer can flexibly adjust and expand functions of the framework according to own requirements.
The application framework module is used for generating a basic service system code without any service realization based on the service information and a preset application development framework.
The database module is used for generating a data processing code based on the field attribute of the form data item and the form association relation. The data processing codes comprise codes of database aspects such as database entity tables, information tables, association relations, data constraints and the like; here, the database entity table may be understood as an auxiliary class table such as a classification table, a structure table, etc.; the information table can be understood as tables of operation data, configuration information, statistical data and the like; the association relationship is similar to the data constraint, and is a description of data with certain association from different angles, for example: one data change, another data associated with the data change, the association relationship refers to the existence of association between the two, and the data constraint refers to the association of data change between the two.
The interaction module is used for generating interface picture resources based on field attributes of form data items. The interface picture resources comprise at least one picture resource such as background pictures, icons, cut pictures, LOGO and the like.
The back-end module is used for generating a form operation code based on field attributes of form data items, form association relations and a preset application development framework. The form operation codes comprise at least one form operation code of adding, deleting, changing, checking, paging, searching, association inquiring and the like.
The front-end module is used for generating a form display code based on field attributes of form data items, form association relations and a preset application development framework. The form display codes comprise page, component, style and other display codes.
The form module is used for generating functional codes based on the service information, the field attribute of the form data item, the form association relation and the preset application development framework. The function codes comprise at least one function code of form menu routing, configuration items, service verification, association relation verification and the like.
Step 130: and generating an object code of the object form service system according to the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code.
The target form service system refers to a service system corresponding to the target form. Such as: the target form is a purchase application form, and then the corresponding service system is a purchase system, namely the target form service system is a purchase system; the target form is a leave application form, and then the corresponding service system is a attendance vacation system, i.e. the target form service system is a attendance vacation system.
The step is to perform language conversion, compiling and other operations on the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the functional code to obtain the target code of the target form service system, and to operate the target code of the target form service system to obtain the target form service system.
According to the method for automatically generating the software system codes, which is provided by the embodiment of the application, according to the type of the target form, a multi-mode form analysis tool is adopted to analyze the target form to obtain form information of the target form, wherein the form information comprises the following components: business information, field attribute of form data item, form association relation; according to the service information, the field attribute of the form data item and the form association relation, a preset application development framework is adopted to generate a basic service system code of an application framework module, a data processing code of a database module, an interface picture resource of an interaction module, a form operation code of a back-end module, a form display code of a front-end module and a function code of a form module; and generating an object code of the object form service system according to the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code. Analyzing the target form to obtain form information; performing code conversion on the form information based on the application development framework to obtain codes of all modules of the target form service system; and compiling codes of each module to obtain a target form service system code so as to operate the target form service system. Therefore, the automatic generation from the multi-mode target form to the corresponding service system can be realized, the process of manual secondary development is eliminated, and the labor cost is saved.
The following further describes, with reference to examples, an example explanation of a process of generating the basic service system code of the application framework module, the data processing code of the database module, the interface picture resource of the interaction module, the form operation code of the back-end module, the form display code of the front-end module, and the function code of the form module in the foregoing embodiments. Fig. 3 is a flowchart of a method for automatically generating a software system code according to an embodiment of the present application. As shown in fig. 3, the above step 120 may further include the following steps 310 to 360:
step 310: and determining system configuration information according to the service information.
The service information may be understood as a service name, for example: the target form is a purchase application form, and then the business information is purchase; the target form is a leave request form, and then the service information is leave.
The system configuration information includes configuration information such as a system name, a system number, a system description, and the like, such as: as shown in fig. 4, determining purchasing system configuration information according to the business information "purchasing" includes: the system name is 'purchase-sale-stock system', and the system number is: the system home page can provide a login entry for a user so that the user can log in the sales-in system based on account, password and verification code login information to perform corresponding operation.
In actual operation, the system configuration information can be determined based on the service information through a text large model. Specifically, the service information and a first preset Prompt word (Prompt) template can be combined to obtain a first problem Prompt word, the first problem Prompt word is input into a text large model, and the system configuration information is obtained in a question-answering mode. The first preset hint word (promt) template may be, for example, a pre-constructed hint word template determined for system configuration information.
Step 320: and generating basic service system codes by adopting an application development framework according to the system configuration information.
Wherein the basic service system code is a basic service system code without any service implementation. In actual operation, the system configuration information may be embedded into an application development framework to generate the basic service system code.
Step 330: and generating a data processing code according to the field attribute of the form data item and the form association relation.
In actual operation, the data processing code can be generated through a large aragonic code model based on the field attribute of the form data item and the form association relation. Specifically, the field attribute and the form association relation of the form data item can be combined with a second preset prompting word (Prompt) template to obtain a second problem prompting word, the second problem prompting word is input into a text code big model, and various information and data are analyzed to define data formats which need to be defined when the database and the front and back end codes are realized, such as: information such as field name, data type, data length, data format, whether to fill or not, prompt description and the like; then generating SQL database scripts according to the data format definition and the form association relation; and generating the data processing code based on the SQL database script. The second preset hint word (promt) template may be, for example, a pre-constructed hint word template determined for the data processing code.
Step 340: and generating interface picture resources according to the field attributes of the form data items.
In actual operation, interface picture resources can be generated through a text graph large model based on field attributes of form data items; specifically, the field attribute of the form data item and a third preset prompting word (promt) template can be combined to obtain a third problem prompting word, the third problem prompting word is input into a draft graph large model, and the interface picture resource is obtained in a question-answering mode. The third preset hint term (promt) template may be, for example, a pre-constructed hint term template determined for the picture resource.
Step 350: and according to the field attribute of the form data item and the form association relation, adopting an application development framework to respectively generate a form operation code and a form display code.
In actual operation, a form operation code can be generated through a large aragonic code model based on field attributes of form data items, form association relations and application development frameworks; specifically, the field attribute and the form association relation of the form data item can be combined with a fourth preset prompting word (Prompt) template to obtain a fourth problem prompting word, the fourth problem prompting word is input into a text code big model, and a form operation code is obtained in a question-answering mode; and embedding the form operation code into an application development framework. The fourth preset hint word (promt) template may be, for example, a pre-constructed hint word template determined for the operation code. The form operation codes comprise operation codes such as adding, deleting, changing, searching, paging, searching, association inquiring and the like.
In actual operation, the form display code can be generated through a large aragonic code model based on field attributes of form data items, form association relations and application development frameworks. Specifically, the field attribute and the form association relation of the form data item can be combined with a fifth preset prompting word (Prompt) template to obtain a fifth problem prompting word, the fifth problem prompting word is input into a text code big model, and a form display code is obtained in a question-answering mode; and embedding the form display code into an application development framework. The fifth preset hint term (promt) template may be, for example, a pre-constructed hint term template determined for the display code. The form display codes comprise page, component, style and other display codes.
Step 360: and generating the function code according to the form information.
In actual operation, the function code can be generated through a large arable code model based on field attributes of form data items, form association relations and application development frameworks. Specifically, field attributes of form data items, form association relations and a sixth preset Prompt word (Prompt) template can be combined to obtain a sixth problem Prompt word, the sixth problem Prompt word is input into a text code big model, and a function code is obtained in a question-answering mode; and embedding the functional codes into an application development framework. The sixth preset hint term (promt) template may be, for example, a pre-constructed hint term template determined for the function code.
The codes in the steps 310 to 360 may be SQL codes, JAVA codes, VUE codes, etc., which are not limited herein.
The embodiment of the application provides a method for automatically generating software system codes, which determines system configuration information according to service information; according to the system configuration information, an application development framework is adopted to generate a basic service system code; generating a data processing code according to the field attribute of the form data item and the form association relation; generating interface picture resources according to field attributes of form data items; according to field attributes of form data items and form association relations, an application development framework is adopted to respectively generate form operation codes and form display codes; and generating the function code according to the form information. Thus, the form information can be automatically converted into codes required by each module in the target form service system. And through the application of the large model technology, the automatic generation of the form service system is completed. The system can completely replace the work of the low-code platform requiring manual secondary development, can realize a zero-code platform, has no new form software system development mode participated by developers, and greatly improves the development and delivery efficiency of the form software system.
The generation process of the object code of the object form service system in the above embodiment is exemplarily explained as follows with continued examples. Fig. 5 is a flowchart of a method for automatically generating a software system code according to an embodiment of the present application. As shown in fig. 5, the above step 130 may further include the following steps 510 and 520:
Step 510: according to the programming language of the preset code template, the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code are subjected to language conversion to obtain converted codes of all the modules.
The programming language of the preset code template may be FREEMARKER language, python language, etc., which is not limited herein.
Step 520: and compiling the converted codes of the modules to generate codes of the target form service system.
Wherein compiling is a translation program that translates a source program written in a high-level programming language into an equivalent machine language format target program. This process includes six sequential logic steps of lexical analysis, grammatical analysis, semantic analysis, code optimization, memory allocation, and code generation. The compiler converts the familiar high-level language into a binary language that can be recognized by the computer so that the computer can execute the programs.
According to the automatic generation method of the software system codes, provided by the embodiment of the application, according to the programming language of the preset code template, the basic service system codes, the data processing codes, the interface picture resources, the form operation codes, the form display codes and the function codes are subjected to language conversion to obtain converted codes of all modules; and compiling the converted codes of the modules to generate codes of the target form service system. Thus, language conversion and compiling can be carried out on each module code to generate the code of the target form service system so as to operate the target form service system.
The process of language conversion in the above embodiment is exemplarily explained as follows in connection with the examples. Fig. 6 is a flowchart of a method for automatically generating a software system code according to an embodiment of the present application. As shown in fig. 6, the above step 510 may further include the following steps 610 and 620:
step 610: and according to the preset code template, rewriting the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code.
Software overwriting generally refers to comprehensively encoding an existing software system to achieve performance improvement and error repair. The purpose of software rewriting is to solve some of the problems that exist in existing software systems. Overwriting is a common technique improvement method that can improve the performance, maintainability and scalability of software.
Step 620: and carrying out service logic recombination on the codes of all the rewritten modules to generate converted codes of all the modules.
The service logic recombination refers to the recombination and optimization of the service logic in the software development, so as to improve the efficiency of a software system, reduce the cost, improve the quality and enhance the competitiveness of the system.
According to the automatic generation method of the software system codes, the basic service system codes, the data processing codes, the interface picture resources, the form operation codes, the form display codes and the function codes are rewritten according to the preset code templates; and carrying out service logic recombination on the codes of all the rewritten modules to generate converted codes of all the modules. Thus, by rewriting and service logic reorganization, the generation from the codes of the modules in the target form service system to the target codes of the target form service system can be realized.
The process of target form analysis in the above-described embodiments is exemplarily explained as follows in connection with the examples. The multi-mode form analysis tool is integrated with: a call interface for analysis algorithms for multiple form types, the step 110 may further include the steps of:
And according to the type of the target form, a multi-mode form analysis tool is adopted to call a call interface of a target analysis algorithm corresponding to the type, and the target form is analyzed to obtain form information of the target form.
Wherein the analysis algorithm for the plurality of form types includes: a photo text large model of a picture form type, a text large model of a text form type, a form large model of a form type, and a file parsing tool of a file form type.
The large graphic text model can carry out image understanding and image information extraction on the target form of the image form type; specifically, a target form of a picture form type and a seventh preset prompting word (Prompt) template are combined to obtain a seventh problem prompting word, the seventh problem prompting word is input into a large picture-text model, and picture information is obtained in a question-answering mode. The seventh preset hint word (promt) template may be, for example, a pre-constructed hint word template determined for the picture information.
The large text model can perform text understanding, text summarization and text extraction on the target form of the text form type; specifically, a target form of a text form type and an eighth preset prompting word (Prompt) template can be combined to obtain an eighth question prompting word, the eighth question is input into a text large model, and text information is obtained in a question-answering mode. The eighth preset alert term (promt) template may be, for example, a previously constructed alert term template determined for the text information.
The large form model can perform form understanding and form information extraction on the target form of the form type; specifically, a target form of a form type and a ninth preset Prompt word (Prompt) template can be combined to obtain a ninth problem Prompt word, the ninth problem Prompt word is input into a form large model, and form information is obtained in a question-answering mode. The ninth preset hint term (promt) template may be, for example, a pre-constructed hint term template determined for the form information.
The file analysis tool can analyze file contents, understand file specifications and extract file information of a target form of a file form type; specifically, a target form of a file form type can be combined with a tenth preset Prompt word (Prompt) template to obtain a tenth problem Prompt word, the tenth problem Prompt word and the target form of the file form type are input into a file analysis tool, and file information is obtained in a question-answering mode. The tenth preset hint term (promt) template may be, for example, a previously constructed hint term template determined for file information.
According to the method for automatically generating the software system codes, a multi-mode form analysis tool is adopted according to the type of the target form, a call interface of a target analysis algorithm corresponding to the type is called, and the target form is analyzed to obtain form information of the target form. Therefore, aiming at different types of target forms, the target forms are analyzed by adopting a corresponding target analysis algorithm, so that multi-mode form analysis can be realized.
In one embodiment, the form information further includes: data content of form data items; the software system code automatic generation method may further include the following steps before the step 120:
and according to the data content, checking the association relation of the form.
The data content refers to an actual data value corresponding to the form data item, for example: the form data items are the number, and the data content is 58, 79, 376 and the like; the data items of the form are names, and the data contents are desks, chairs, desktop computers and the like; the form data item is monovalent, and the data content is 369, 127, 4566, or the like.
In actual operation, specific data content can be verified on the form association relationship (the association relationship in the form and the association relationship among the forms); such as: if there is an association between the code-class-name-number-specification-unit price, the association may be checked based on the corresponding data content to determine whether the association is correct (e.g., whether the calculation of the code-class-name-number-specification-unit price is correct).
It should be noted that: when the form information includes the data content of the form data item, the function code of the form module in step 120 and step 360 also includes a data verification code.
According to the software system code automatic generation method provided by the embodiment of the application, the form association relation is verified according to the data content. Therefore, the conversion from the more accurate form information to the codes of all the modules of the target form service system and the generation from the codes of all the modules of the target form service system to the target codes of the target form service system can be realized, so that the finally generated target form service system is more accurate.
Having described the software system code automatic generation method of the exemplary embodiment of the present disclosure, next, a software system code automatic generation apparatus 700 of the exemplary embodiment of the present disclosure will be described with reference to fig. 7.
Referring to fig. 7, the software system code automatic generation apparatus 700 includes: the form analysis module 710 is configured to analyze the target form by using a multi-mode form analysis tool according to the type of the target form, so as to obtain form information of the target form, where the form information includes: business information, field attribute of form data item, form association relation; the code conversion module 720 is configured to generate a basic service system code of the application framework module, a data processing code of the database module, an interface picture resource of the interaction module, a form operation code of the back-end module, a form display code of the front-end module and a function code of the form module by adopting a preset application development framework according to the service information, the field attribute of the form data item and the form association relation; the code generation module 730 is configured to generate an object code of the object form business system according to the basic business system code, the data processing code, the interface picture resource, the form operation code, the form display code, and the function code.
In one embodiment, the transcoding module 720 is configured to: determining system configuration information according to the service information; according to the system configuration information, an application development framework is adopted to generate a basic service system code; generating a data processing code according to the field attribute of the form data item and the form association relation; generating interface picture resources according to field attributes of form data items; according to field attributes of form data items and form association relations, an application development framework is adopted to respectively generate form operation codes and form display codes; and generating the function code according to the form information.
In one embodiment, the code generation module 730 is configured to: according to the programming language of the preset code template, carrying out language conversion on the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the functional code to obtain converted codes of all the modules; and compiling the converted codes of the modules to generate codes of the target form service system.
In one embodiment, the code generation module 730 is configured to: according to a preset code template, rewriting basic service system codes, data processing codes, interface picture resources, form operation codes, form display codes and function codes; and carrying out service logic recombination on the codes of all the rewritten modules to generate converted codes of all the modules.
In one embodiment, the multimodal form analysis tool is pre-integrated with: a call interface for a plurality of form-type analysis algorithms; the form analysis module 710 is configured to: and according to the type of the target form, a multi-mode form analysis tool is adopted to call a call interface of a target analysis algorithm corresponding to the type, and the target form is analyzed to obtain form information of the target form.
In one embodiment, the analysis algorithm for the plurality of form types includes: a photo text large model of a picture form type, a text large model of a text form type, a form large model of a form type, and a file parsing tool of a file form type.
In one embodiment, the form information further includes: data content of form data items; the software system code automatic generation apparatus 700 further includes a verification module configured to: and according to the data content, checking the association relation of the form.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more Application SPECIFIC INTEGRATED Circuits (ASIC), or one or more microprocessors, or one or more field programmable gate arrays (Field Programmable GATE ARRAY FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 8 is a schematic diagram of a computer device according to an embodiment of the present application, where the device may be integrated in a terminal device or a chip of the terminal device, and the terminal may be a computing device with a data processing function.
The apparatus includes: a processor 801, a storage medium 802, and a bus 803.
The storage medium 802 stores program instructions executable by the processor 801, and when the computer device 800 is running, the processor 801 communicates with the storage medium 802 through the bus 803, and the processor 801 executes the program instructions to perform the above-described method embodiments. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, the present invention also provides a program product, such as a computer readable storage medium, comprising a program for performing the above-described method embodiments when being executed by a processor.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform part of the steps of the methods of the embodiments of the invention. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely illustrative of embodiments of the present invention, and the present invention is not limited thereto, and any changes or substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and the present invention is intended to be covered by the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A method for automatically generating software system code, comprising:
According to the type of the target form, a multi-mode form analysis tool is adopted to analyze the target form to obtain form information of the target form, wherein the form information comprises: business information, field attribute of form data item, form association relation;
according to the service information, the field attribute of the form data item and the form association relation, a preset application development framework is adopted to generate a basic service system code of an application framework module, a data processing code of a database module, an interface picture resource of an interaction module, a form operation code of a back-end module, a form display code of a front-end module and a function code of a form module;
And generating an object code of an object form service system according to the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code.
2. The method according to claim 1, wherein the generating basic service system codes of an application framework module, data processing codes of a database module, interface picture resources of an interaction module, form operation codes of a back-end module, form display codes of a front-end module and function codes of a form module according to the service information, field attributes of the form data items and the form association relation by using a preset application development framework comprises:
Determining system configuration information according to the service information;
generating the basic service system code by adopting the application development framework according to the system configuration information;
generating the data processing code according to the field attribute of the form data item and the form association relation;
Generating the interface picture resource according to the field attribute of the form data item;
According to the field attribute of the form data item and the form association relation, adopting the application development framework to respectively generate the form operation code and the form display code;
And generating the function code according to the form information.
3. The method of claim 1, wherein generating the object code of the object form business system based on the base business system code, the data processing code, the interface picture resource, the form operation code, the form display code, and the function code comprises:
According to the programming language of a preset code template, carrying out language conversion on the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the functional code to obtain converted codes of all modules;
and compiling the converted codes of the modules to generate the codes of the target form service system.
4. The method of claim 3, wherein said language converting said basic service system code, said data processing code, said interface picture resource, said form operation code, said form display code, and said function code according to a programming language of a preset code template to obtain converted codes of each module comprises:
According to the preset code template, rewriting the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code;
and carrying out service logic recombination on the codes of all the rewritten modules to generate converted codes of all the modules.
5. The method of claim 1, wherein the multimodal form analysis tool is pre-integrated with: a call interface for a plurality of form-type analysis algorithms;
analyzing the target form by adopting a multi-mode form analysis tool according to the type of the target form to obtain form information of the target form, wherein the method comprises the following steps:
And according to the type of the target form, calling a calling interface of a target analysis algorithm corresponding to the type by adopting the multi-mode form analysis tool, and analyzing the target form to obtain form information of the target form.
6. The method of claim 5, wherein the analysis algorithms for the plurality of form types comprise: a photo text large model of a picture form type, a text large model of a text form type, a form large model of a form type, and a file parsing tool of a file form type.
7. The method of claim 1, wherein the form information further comprises: the data content of the form data direction;
before the generating the basic service system code of the application framework module, the data processing code of the database module, the interface picture resource of the interaction module, the form operation code of the back-end module, the form display code of the front-end module and the function code of the form module by adopting the preset application development framework according to the service information, the field attribute of the form data item and the form association relation, the method further comprises:
And checking the form association relation according to the data content.
8. An automatic software system code generating apparatus, comprising:
the form analysis module is configured to analyze the target form by adopting a multi-mode form analysis tool according to the type of the target form to obtain form information of the target form, wherein the form information comprises: business information, field attribute of form data item, form association relation;
the code conversion module is configured to generate a basic service system code of the application framework module, a data processing code of the database module, an interface picture resource of the interaction module, a form operation code of the back-end module, a form display code of the front-end module and a function code of the form module by adopting a preset application development framework according to the service information, the field attribute of the form data item and the form association relation;
The code generation module is configured to generate an object code of an object form service system according to the basic service system code, the data processing code, the interface picture resource, the form operation code, the form display code and the function code.
9. A computer device, comprising: a processor, a storage medium, and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating over the bus when the computer device is running, the processor executing the program instructions to perform the steps of the software system code automatic generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the automatic generation method of software system code according to any of claims 1 to 7.
CN202411037712.0A 2024-07-31 2024-07-31 A method, device, equipment and storage medium for automatically generating software system code Pending CN118963765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411037712.0A CN118963765A (en) 2024-07-31 2024-07-31 A method, device, equipment and storage medium for automatically generating software system code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411037712.0A CN118963765A (en) 2024-07-31 2024-07-31 A method, device, equipment and storage medium for automatically generating software system code

Publications (1)

Publication Number Publication Date
CN118963765A true CN118963765A (en) 2024-11-15

Family

ID=93397447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411037712.0A Pending CN118963765A (en) 2024-07-31 2024-07-31 A method, device, equipment and storage medium for automatically generating software system code

Country Status (1)

Country Link
CN (1) CN118963765A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119960760A (en) * 2025-01-13 2025-05-09 龙山云仓(山东)共享科技有限公司 A method and system for automatically generating software code
JP7709715B1 (en) * 2024-10-25 2025-07-17 株式会社Mono-X Information processing method, information processing system, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7709715B1 (en) * 2024-10-25 2025-07-17 株式会社Mono-X Information processing method, information processing system, and program
CN119960760A (en) * 2025-01-13 2025-05-09 龙山云仓(山东)共享科技有限公司 A method and system for automatically generating software code

Similar Documents

Publication Publication Date Title
US20240256254A1 (en) Systems and methods for transformation of reporting schema
Afsari et al. JavaScript Object Notation (JSON) data serialization for IFC schema in web-based BIM data exchange
US8601438B2 (en) Data transformation based on a technical design document
CN110347598B (en) Test script generation method and device, server and storage medium
CN118963765A (en) A method, device, equipment and storage medium for automatically generating software system code
CN104133772A (en) Automatic test data generation method
CN108694214A (en) Generation method, generating means, readable medium and the electronic equipment of data sheet
CN109710220B (en) Relational database query method, relational database query device, relational database query equipment and storage medium
CN111666072A (en) Software code and document robot method
CN110990108A (en) Entry translation method and device applied to multi-language APP
CN115599386A (en) Code generation method, device, equipment and storage medium
EP4542380A1 (en) Method and system for processing data conflict, and electronic device and computer-readable storage medium
CN110737431A (en) Software development method, development platform, terminal device and storage medium
CN116755669A (en) Low code development method and tool based on DSL language operation model
CN115640279A (en) Method and device for constructing data blood relationship
CN113094776B (en) Method and system for constructing visual component model data and electronic equipment
CN119127285A (en) A software toolkit development method, device, computer equipment and storage medium
CN110515653B (en) Document generation method and device, electronic equipment and computer readable storage medium
CN118502735A (en) Editing assistance method, system and electronic device for code editor
CN118468816A (en) Project file generation method, device, equipment, medium and computer program product
CN111126008A (en) XSD-based code generation method and device, computer equipment and storage medium
CN112667202A (en) Software design method and device combining MDA (model-driven architecture) and BPMN (Business Process management)
García et al. Improving understanding of dynamically typed software developed by agile practitioners
CN113296670A (en) Regularization expression method of editable parameters
CN108733353B (en) Interface construction method and device

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