Software system code automatic generation method and device, equipment and storage medium
By automatically generating software system code through multimodal form analysis tools and application development frameworks, the problem of needing manual intervention after low-code platform generation has been solved, enabling the generation of business systems without manual development, reducing costs and improving efficiency.
Patent Information
- Application Number
- CN202411037712.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
AI Technical Summary
In existing technologies, after low-code platforms generate software system code, business changes and form analysis still require manual intervention, resulting in high labor costs.
The target form is analyzed using a multimodal form analysis tool to generate form information. The code for the application framework module, database module, interaction module, backend module, frontend module, and form module is automatically generated using a preset application development framework. The target form business system code is generated through language conversion and compilation.
It enables the automatic generation of multimodal target forms into business systems, eliminating the need for manual secondary development, saving labor costs, and improving development efficiency.
Smart Images

Figure CN118963765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software code development, and in particular to a method, device, equipment and storage medium for automatically generating software system code. Background Art
[0002] At present, the method of generating software system code is usually that a low-code platform performs front-end and back-end logic design and development of the system based on pre-set low-code software templates, and then manual secondary development work is performed to implement the business system.
[0003] However, the method of generating software system codes based on the low-code platform can only generate system codes based on mechanical templates. The analysis of business changes and forms needs to rely on manual work to solve, and at the same time, the low-code platform is used to assist in completing the work of generating software system codes. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device, equipment and storage medium for automatically generating software system code in response to the above-mentioned deficiencies in the prior art, so as to realize the automatic generation from a multimodal target form to a corresponding business system, eliminate the process of manual secondary development, and save labor costs.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for automatically generating software system code, comprising: according to the type of a target form, using a multimodal form analysis tool to analyze the target form to obtain form information of the target form, wherein the form information includes: business information, field attributes of form data items, and form associations; according to the business information, the field attributes of the form data items, and the form associations, using a preset application development framework to generate a basic business system code of an application framework module, a data processing code of a database module, an interface image resource of an interactive module, a form operation code of a backend module, a form display code of a frontend module, and a function code of a form module; according to the basic business system code, the data processing code, the interface image resource, the form operation code, the form display code, and the function code, generate a target code for the target form business system.
[0007] In one embodiment, based on the business information, the field attributes of the form data items, and the form association relationships, a preset application development framework is used to generate a basic business system code for an application framework module, a data processing code for a database module, an interface image resource for an interactive module, a form operation code for a back-end module, a form display code for a front-end module, and a function code for a form module, including: determining system configuration information based on the business information; generating the basic business system code based on the application development framework based on the system configuration information; generating the data processing code based on the field attributes of the form data items and the form association relationships; generating the interface image resources based on the field attributes of the form data items; generating the form operation code and the form display code respectively based on the field attributes of the form data items and the form association relationships; and generating the function code based on the form information.
[0008] In one embodiment, the target code of the target form business system is generated based on the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code, including: according to the programming language of the preset code template, the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code are converted into a language to obtain the converted code of each module; and the converted code of each module is compiled to generate the code of the target form business system.
[0009] In one embodiment, the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code are converted according to the programming language of the preset code template to obtain the converted code of each module, including: rewriting the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code according to the preset code template; reorganizing the business logic of the rewritten code of each module to generate the converted code of each module.
[0010] In one embodiment, the multimodal form analysis tool is pre-integrated with: calling interfaces of analysis algorithms of multiple form types; according to the type of the target form, using the multimodal form analysis tool to analyze the target form to obtain form information of the target form, including: according to the type of the target form, using the multimodal form analysis tool to call the calling interface of the target analysis algorithm corresponding to the type, analyzing the target form to obtain form information of the target form.
[0011] In one embodiment, the analysis algorithms of the multiple form types include: a picture-to-text model for the picture form type, a text-to-text model for the text form type, a table model for the table form type, and a file parsing tool for the file form type.
[0012] In one embodiment, the form information also includes: the data content of the form data; before generating 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 based on the business information, the field attributes of the form data items and the form association relationship, the method also includes: verifying the form association relationship according to the data content.
[0013] In a second aspect, an embodiment of the present application further provides a software system code automatic generation device, comprising: a form analysis module, configured to analyze the target form according to the type of the target form using a multimodal form analysis tool to obtain form information of the target form, wherein the form information includes: business information, field attributes of form data items, and form association relationships; a code conversion module, configured to generate a basic business system code of an application framework module, a data processing code of a database module, an interface image 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 according to the business information, the field attributes of the form data items, and the form association relationships using a preset application development framework; a code generation module, configured to generate a target code of a target form business system according to the basic business system code, the data processing code, the interface image resource, the form operation code, the form display code, and the function code.
[0014] In one embodiment, the code conversion module is configured to: determine system configuration information based on the business information; generate the basic business system code based on the system configuration information using the application development framework; generate the data processing code based on the field attributes of the form data item and the form association relationship; generate the interface image resources based on the field attributes of the form data item; generate the form operation code and the form display code respectively based on the field attributes of the form data item and the form association relationship using the application development framework; and generate the function code based on the form information.
[0015] In one embodiment, the code generation module is configured to: perform language conversion on the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code according to the programming language of the preset code template to obtain the converted code of each module; compile the converted code of each module to generate the code of the target form business system.
[0016] In one embodiment, the code generation module is configured to: rewrite the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code according to the preset code template; reorganize the business logic of the rewritten code of each module to generate the converted code of each module.
[0017] In one embodiment, the multimodal form analysis tool is pre-integrated with: a calling interface of analysis algorithms of multiple form types; the form analysis module is configured to: according to the type of the target form, use the multimodal form analysis tool to call the calling interface of the target analysis algorithm corresponding to the type, analyze the target form, and obtain the form information of the target form.
[0018] In one embodiment, the analysis algorithms of the multiple form types include: a picture-to-text model for the picture form type, a text-to-text model for the text form type, a table model for the table form type, and a file parsing tool for the file form type.
[0019] In one embodiment, the form information further includes: data content of the form data item; the software system code automatic generation device further includes a verification module, and the verification module is configured to: verify the form association relationship according to the data content.
[0020] In a third aspect, an embodiment of the present application further provides a computer device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of any one of the above methods.
[0021] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above methods are executed.
[0022] The beneficial effects of the present application are: by analyzing the target form, the form information is obtained; then the form information is converted into code based on the application development framework to obtain the code of each module of the target form business system; then the code of each module is compiled and other operations are performed to obtain the target form business system code to run the target form business system. 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flowchart of a method for automatically generating software system code provided in an embodiment of the present application;
[0025] Figure 2 An example diagram of a target form in a method for automatically generating software system code provided in an embodiment of the present application;
[0026] Figure 3 A flowchart of a method for automatically generating software system code provided in an embodiment of the present application;
[0027] Figure 4 An example diagram of a target form business system in a method for automatically generating software system code provided in an embodiment of the present application;
[0028] Figure 5 A flowchart of a method for automatically generating software system code provided in an embodiment of the present application;
[0029] Figure 6 A flowchart of a method for automatically generating software system code provided in an embodiment of the present application;
[0030] Figure 7 A schematic diagram of the structure of a software system code automatic generation device provided in an embodiment of the present application;
[0031] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0033] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0034] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application.
[0035] In addition, the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.
[0037] Figure 1 A flowchart of a method for automatically generating software system code provided in an embodiment of the present application; Figure 1 As shown, the method includes:
[0038] Step 110: According to the type of the target form, a multimodal form analysis tool is used to analyze the target form to obtain form information of the target form.
[0039] The form information includes: business information, field attributes of form data items, and form association relationships.
[0040] The target form refers to the form that is input into the multimodal form analysis tool for form analysis. The number of target forms can be one or more, and there is no limit here. The target form can be a blank form (including information such as the header but no actual business data) or a form filled with actual business data (including information such as the header and actual business data), and there is no limit here.
[0041] The target form can be of various types, such as pictures, text, tables, files, etc., which are not limited here. In actual operation, the types of content in a target form can be one or multiple, for example, a target form can include only pictures or text, or both pictures and text, which are not limited here.
[0042] The multimodal form analysis tool integrates analysis tools for multiple preset form types, such as: analysis tools for image form types, analysis tools for text form types, analysis tools for table form types, analysis tools for file form types, etc.
[0043] The business information may include: business name, for example: if the target form is a purchase application form, then the business information is purchase; if the target form is a leave application form, then the business information is leave.
[0044] Form data items can be understood as the headers of rows or columns in a table in a form; for example: Figure 2 As shown, the code, category, product name, quantity, specification, unit price, description, etc. in the purchase requisition.
[0045] Field attributes of form data items, for example: Field attributes of coded data items in form data items include: data type, indication of whether the data is empty, data length, data precision and data description, where the data type can be, for example, an integer, the data length is: maximum length, data precision: none, and the data description is the code for recording the purchase application, which is used to uniquely identify each purchase application. Another example: The field attributes of category are: data type: string, whether it is allowed to be empty: yes, maximum length: none, precision: none, description: describes the category of the asset or item to be purchased, such as office supplies, electronic equipment, etc.
[0046] The form association relationship may include: an association relationship within a form, and an association relationship between forms, which is not limited here. The association relationship within a form is the association relationship between field attributes of different form data items in a form; the association relationship between forms includes: an association relationship between field attributes of the same / different form data items in different forms.
[0047] In actual operation, due to computer language reasons, it is generally necessary to establish the correspondence between Chinese and English for all fields in the form information. Specifically, the correspondence between Chinese and English for each field can be established through the Wenshengwen model through batch field translation question and answer method; further, conflicts that arise during the translation process can be resolved through repeated question and answer methods for accurate translation of a single field.
[0048] Step 120: Based on the business information, field attributes of the form data items, and form associations, a preset application development framework is used 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.
[0049] Among them, the preset application development framework, that is, the pre-set application development framework, is a software development framework that provides a set of standardized methods and tools to help developers build applications more quickly and efficiently. It usually includes some core components, libraries and tools, which are designed to work together to reduce duplication of work in the development process and improve development efficiency. The application development framework usually has the characteristics of scalability, modularity and customizability, so that developers can flexibly adjust and expand the functions of the framework according to their own needs.
[0050] The application framework module is used to generate basic business system code without any business implementation based on business information and a preset application development framework.
[0051] The database module is used to generate data processing code based on the field attributes of form data items and form associations. The data processing code includes database codes such as database entity tables, information tables, associations, and data constraints. Here, database entity tables can be understood as auxiliary tables such as classification tables and structure tables; information tables can be understood as tables of operation data, configuration information, and statistical data; associations are similar to data constraints, which are descriptions of data with certain associations from different angles. For example, if one data changes, the other data associated with it must also change. An association refers to the association between the two, and a data constraint refers to the data change association between the two.
[0052] The interactive module is used to generate interface image resources based on the field attributes of the form data items, wherein the interface image resources include at least one type of image resources such as background images, icons, cutouts, and LOGOs.
[0053] The backend module is used to generate form operation codes based on the field attributes of the form data items, form association relationships, and the preset application development framework. The form operation codes include at least one form operation code such as add, delete, modify, check, paging, search, and associated query.
[0054] The front-end module is used to generate form display code based on the field attributes of form data items, form association relationships, and the preset application development framework. The form display code includes page, component, style and other display codes.
[0055] The form module is used to generate function codes based on business information, field attributes of form data items, form associations, and a preset application development framework. The function codes include at least one function code such as form menu routing, configuration items, business verification, and association verification.
[0056] Step 130: Generate target code of the target form business system according to the basic business system code, data processing code, interface image resources, form operation code, form display code and function code.
[0057] The target form business system refers to the business system corresponding to the target form. For example, if the target form is a purchase application form, then the corresponding business system is the purchase system, that is, the target form business system is the purchase system; if the target form is a leave application form, then the corresponding business system is the attendance and leave system, that is, the target form business system is the attendance and leave system.
[0058] In this step, the target code of the target form business system can be obtained by performing language conversion and compilation on the basic business system code, data processing code, interface image resources, form operation code, form display code and function code. The target form business system can be obtained by running the target code of the target form business system.
[0059] The software system code automatic generation method provided by the embodiment of the present application, according to the type of the target form, adopts a multimodal form analysis tool to analyze the target form, obtain the form information of the target form, and the form information includes: business information, field attributes of form data items, and form association relationships; according to the business information, field attributes of form data items, and form association relationships, adopts 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 basic business system code, data processing code, interface image resources, form operation code, form display code, and function code, the target code of the target form business system is generated. The form information is obtained by analyzing the target form; then the code of each module is converted based on the application development framework to obtain the code of each module of the target form business system; then the code of each module is compiled and other operations are performed to obtain the target form business system code to run the target form business system. In this way, the automatic generation from the multimodal target form to the corresponding business system can be realized, the process of manual secondary development is eliminated, and the labor cost is saved.
[0060] The following is a continued explanation of the generation process of 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 functional code of the form module in the above embodiment with examples. Figure 3 The following is a flow chart of the method for automatically generating software system code provided in the embodiment of the present application. Figure 3 As shown, the above step 120 may further include the following steps 310 to 360:
[0061] Step 310: Determine system configuration information according to the business information.
[0062] The business information can be understood as the business name. For example, if the target form is a purchase application form, then the business information is purchase; if the target form is a leave application form, then the business information is leave.
[0063] System configuration information includes system name, system slogan, system description and other configuration information, such as: Figure 4 As shown, according to the business information "Purchase", the configuration information of the procurement system is determined to include: the system name is "Purchase, Sales and Inventory System", the system slogan is: "Enjoy excellent inventory management and improve business efficiency", and the system homepage can provide users with a login entrance for users to log in to the purchase, sales and inventory system based on their account, password and verification code login information to perform corresponding operations.
[0064] In actual operation, the system configuration information can be determined based on the business information through the Vincent-Wen model. Specifically, the business information can be combined with the first preset prompt word (Prompt) template to obtain the first question prompt word, and the first question prompt word is input into the Vincent-Wen model to obtain the system configuration information through question-answering. The first preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for the system configuration information.
[0065] Step 320: Generate basic business system code based on the system configuration information using the application development framework.
[0066] The basic business system code is the basic business system code without any business implementation. In actual operation, the system configuration information can be embedded in the application development framework to generate the above basic business system code.
[0067] Step 330: Generate data processing code according to the field attributes of the form data items and the form association relationship.
[0068] In actual operation, the data processing code can be generated based on the field attributes and form associations of the form data items through the Wensheng code big model. Specifically, the field attributes and form associations of the form data items can be combined with the second preset prompt word (Prompt) template to obtain the second question prompt word, and the second question prompt word is input into the Wensheng code big model to analyze the data format definitions that need to be defined when various types of information and data are implemented in the database and the front-end and back-end codes, such as: field name, data type, data length, data format, whether it is required, prompt description and other information; then generate the SQL database script according to the data format definition and the form association; and then generate the above data processing code based on the SQL database script. The second preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for the data processing code.
[0069] Step 340: Generate interface image resources according to the field attributes of the form data items.
[0070] In actual operation, the interface image resource can be generated based on the field attributes of the form data item through the text graph model; specifically, the field attributes of the form data item can be combined with the third preset prompt word (Prompt) template to obtain the third question prompt word, and the third question prompt word is input into the text graph model to obtain the above interface image resource through question-answering. The third preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for the image resource.
[0071] Step 350: Based on the field attributes of the form data items and the form association relationship, the application development framework is used to generate the form operation code and the form display code respectively.
[0072] In actual operation, the form operation code can be generated through the Wensheng code big model based on the field attributes of the form data items, the form association relationship, and the application development framework; specifically, the field attributes of the form data items, the form association relationship and the fourth preset prompt word (Prompt) template can be combined to obtain the fourth question prompt word, and the fourth question prompt word can be input into the Wensheng code big model, and the form operation code can be obtained through the question-and-answer method; then the form operation code is embedded in the application development framework. The fourth preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for the operation code. Among them, the form operation code includes operation codes such as adding, deleting, modifying, checking, paging, searching, and associated query.
[0073] In actual operation, the form display code can be generated through the Vincent code big model based on the field attributes of the form data items, the form association relationship, and the application development framework. Specifically, the field attributes of the form data items, the form association relationship and the fifth preset prompt word (Prompt) template can be combined to obtain the fifth question prompt word, and the fifth question prompt word can be input into the Vincent code big model, and the form display code can be obtained through the question-and-answer method; then the form display code is embedded in the application development framework. The fifth preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for the display code. Among them, the form display code includes display codes such as pages, components, and styles.
[0074] Step 360: Generate a function code according to the form information.
[0075] In actual operation, the function code can be generated through the Vincent code big model based on the field attributes of the form data item, the form association relationship, and the application development framework. Specifically, the field attributes of the form data item, the form association relationship and the sixth preset prompt word (Prompt) template can be combined to obtain the sixth question prompt word, and the sixth question prompt word is input into the Vincent code big model, and the function code is obtained through the question-answering method; and then the function code is embedded in the application development framework. The sixth preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for the function code.
[0076] The codes in the above steps 310 to 360 may be SQL codes, JAVA codes, VUE codes, etc., which are not limited here.
[0077] The software system code automatic generation method provided in the embodiment of the present application determines the system configuration information according to the business information; according to the system configuration information, uses the application development framework to generate the basic business system code; according to the field attributes of the form data items and the form association relationship, generates the data processing code; according to the field attributes of the form data items, generates the interface image resources; according to the field attributes of the form data items and the form association relationship, uses the application development framework to generate the form operation code and the form display code respectively; according to the form information, generates the function code. In this way, the form information can be automatically converted into the code required by each module in the target form business system. By applying the large model technology, the automatic generation of the form business system is completed. It can completely replace the work of manual secondary development required by the low-code platform, and can realize the zero-code platform, a new mode of developing form-type software systems without the participation of developers, which greatly improves the development and delivery efficiency of form-type software systems.
[0078] The following is an explanation of the process of generating the target code of the target form business system in the above embodiment with reference to examples. Figure 5 The following is a flow chart of the method for automatically generating software system code provided in the embodiment of the present application. Figure 5 As shown, the above step 130 may further include the following steps 510 and 520:
[0079] Step 510: According to the programming language of the preset code template, the basic business system code, data processing code, interface image resources, form operation code, form display code and function code are converted into a language to obtain the converted code of each module.
[0080] The programming language of the preset code template may be FreeMarker language, Python language, etc., which is not limited here.
[0081] Step 520: Compile the converted codes of each module to generate the code of the target form business system.
[0082] Compilation is a translation process that translates source programs written in high-level programming languages into equivalent machine language target programs. This process includes six sequential logical steps: lexical analysis, syntax analysis, semantic analysis, code optimization, storage allocation, and code generation. The compiler converts the high-level language that people are familiar with into a binary language that computers can recognize, so that computers can execute these programs.
[0083] The software system code automatic generation method provided in the embodiment of the present application converts the basic business system code, data processing code, interface image resources, form operation code, form display code and function code into a language according to the programming language of the preset code template to obtain the converted code of each module; compiles the converted code of each module to generate the code of the target form business system. In this way, the language conversion and compilation of each module code can be performed to generate the code of the target form business system to run the target form business system.
[0084] The language conversion process in the above embodiment is explained as follows with reference to examples. Figure 6 The following is a flow chart of the method for automatically generating software system code provided in the embodiment of the present application. Figure 6 As shown, the above step 510 may further include the following steps 610 and 620:
[0085] Step 610: rewrite the basic business system code, data processing code, interface image resources, form operation code, form display code and function code according to the preset code template.
[0086] Software rewriting usually refers to the comprehensive coding of an existing software system to improve performance and fix errors. The purpose of software rewriting is to solve some problems in the existing software system. Rewriting is a common technical improvement method that can improve software performance, maintainability and scalability.
[0087] Step 620: reorganize the business logic of the rewritten codes of each module to generate converted codes of each module.
[0088] Among them, business logic reorganization in software development refers to the reorganization and optimization of business logic to improve the efficiency of the software system, reduce costs, improve quality, and enhance the competitiveness of the system.
[0089] The software system code automatic generation method provided in the embodiment of the present application rewrites the basic business system code, data processing code, interface image resources, form operation code, form display code and function code according to the preset code template; the business logic of the rewritten code of each module is reorganized to generate the converted code of each module. In this way, through rewriting and business logic reorganization, it is possible to realize the generation of the target code of the target form business system from the code of each module in the target form business system.
[0090] The following is an example of the target form analysis process in the above embodiment. The multimodal form analysis tool is pre-integrated with: a calling interface for analysis algorithms of multiple form types, and the above step 110 may further include the following steps:
[0091] According to the type of the target form, a multimodal form analysis tool is used to call the calling interface of the target analysis algorithm corresponding to the type, analyze the target form, and obtain the form information of the target form.
[0092] Among them, the analysis algorithms of multiple form types include: a picture-to-text large model for image form type, a text-to-text large model for text form type, a table large model for table form type, and a file parsing tool for file form type.
[0093] The image-generated text model can understand the image and extract the image information of the target form of the image form type; specifically, the target form of the image form type can be combined with the seventh preset prompt word (Prompt) template to obtain the seventh question prompt word, and the seventh question prompt word is input into the image-generated text model to obtain the image information through the question-answering method. The seventh preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for the image information.
[0094] The Vincent model can perform text understanding, text summarization, and text extraction on a target form of a text form type; specifically, the target form of a text form type can be combined with an eighth preset prompt word (Prompt) template to obtain an eighth question prompt word, and the eighth question is input into the Vincent model to obtain text information through a question-and-answer method. The eighth preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for text information.
[0095] The table macro model can understand the table and extract table information from the target form of the table form type; specifically, the target form of the table form type can be combined with the ninth preset prompt word (Prompt) template to obtain the ninth question prompt word, and the ninth question prompt word is input into the table macro model to obtain the table information through question-answering. The ninth preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for table information.
[0096] The file parsing tool can parse the file content, understand the file specification, and extract the file information from the target form of the file form type; specifically, the target form of the file form type can be combined with the tenth preset prompt word (Prompt) template to obtain the tenth question prompt word, and the tenth question prompt word and the target form of the file form type are input into the file parsing tool to obtain the file information through a question-and-answer method. The tenth preset prompt word (Prompt) template can be, for example, a pre-built prompt word template determined for file information.
[0097] The software system code automatic generation method provided in the embodiment of the present application adopts a multimodal form analysis tool according to the type of the target form, calls the calling interface of the target analysis algorithm corresponding to the type, analyzes the target form, and obtains the form information of the target form. In this way, for different types of target forms, the corresponding target analysis algorithm is used to analyze the target form, so that multimodal form analysis can be realized.
[0098] In one implementation, the form information further includes: data content of the form data item; before the above step 120, the above method for automatically generating software system code may further include the following steps:
[0099] Verify the form association relationship based on the data content.
[0100] The data content refers to the actual data value corresponding to the form data item. For example, if the form data item is quantity, the data content is 58, 79, 376, etc.; if the form data item is product name, the data content is desk, chair, desktop computer, etc.; if the form data item is unit price, the data content is 369, 127, 4566, etc.
[0101] In actual operation, the specific data content can be used to verify the form association relationship (the association relationship within the form and the association relationship between forms); for example: there is an association relationship between code-category-product name-quantity-specification-unit price, then the association relationship can be verified according to the corresponding data content to determine whether the association relationship is correct (for example: whether the calculation of code-category-product name-quantity-specification-unit price is correct).
[0102] 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.
[0103] The software system code automatic generation method provided in the embodiment of the present application verifies the form association relationship according to the data content. In this way, it is possible to achieve more accurate conversion of form information to the code of each module of the target form business system, and more accurate generation of the code of each module of the target form business system to the target code of the target form business system, so that the target form business system finally generated is more accurate.
[0104] After introducing the software system code automatic generation method according to the exemplary embodiment of the present disclosure, next, refer to Figure 7 The software system code automatic generation device 700 according to the exemplary embodiment of the present disclosure is described.
[0105] refer to Figure 7As shown, the software system code automatic generation device 700 includes: a form analysis module 710, which is configured to analyze the target form according to the type of the target form using a multimodal form analysis tool to obtain the form information of the target form, and the form information includes: business information, field attributes of form data items, and form association relationships; a code conversion module 720, which is configured 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 business information, the field attributes of the form data items, and the form association relationships using a preset application development framework; a code generation module 730, which is configured to generate the target code of the target form business system according to the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code, and the function code.
[0106] In one embodiment, the code conversion module 720 is configured to: determine system configuration information based on business information; generate basic business system code using an application development framework based on the system configuration information; generate data processing code based on the field attributes of the form data items and the form association relationship; generate interface image resources based on the field attributes of the form data items; generate form operation code and form display code respectively using an application development framework based on the field attributes of the form data items and the form association relationship; and generate function code based on the form information.
[0107] In one embodiment, the code generation module 730 is configured to: convert the basic business system code, data processing code, interface image resources, form operation code, form display code and function code according to the programming language of the preset code template to obtain the converted code of each module; compile the converted code of each module to generate the code of the target form business system.
[0108] In one embodiment, the code generation module 730 is configured to: rewrite the basic business system code, data processing code, interface image resources, form operation code, form display code and function code according to preset code templates; reorganize the business logic of the rewritten code of each module to generate the converted code of each module.
[0109] In one embodiment, the multimodal form analysis tool is pre-integrated with: a calling interface for analysis algorithms of multiple form types; the form analysis module 710 is configured to: according to the type of the target form, use the multimodal form analysis tool to call the calling interface of the target analysis algorithm corresponding to the type, analyze the target form, and obtain the form information of the target form.
[0110] In one embodiment, the analysis algorithms of multiple form types include: a picture-to-text model for picture form type, a text-to-text model for text form type, a table model for table form type, and a file parsing tool for file form type.
[0111] In one implementation, the form information further includes: data content of the form data item; the software system code automatic generation device 700 further includes a verification module, and the verification module is configured to: verify the form association relationship according to the data content.
[0112] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0113] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0114] Figure 8 A schematic diagram of a computer device provided in an embodiment of the present application. The device can be integrated into a terminal device or a chip of a terminal device. The terminal can be a computing device with data processing capabilities.
[0115] The device includes: a processor 801 , a storage medium 802 and a bus 803 .
[0116] The storage medium 802 stores program instructions executable by the processor 801. When the computer device 800 is running, the processor 801 communicates with the storage medium 802 via the bus 803. The processor 801 executes the program instructions to perform the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0117] Optionally, the present invention also provides a program product, such as a computer-readable storage medium, comprising a program, which is used to execute the above method embodiment when executed by a processor.
[0118] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.
[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0121] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0122] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for automatically generating software system code, characterized in that: include: According to the type of the target form, a multimodal form analysis tool is used to analyze the target form to obtain form information of the target form, wherein the form information includes: business information, field attributes of form data items, and form association relationships; According to the business information, the field attributes of the form data items, and the form association relationships, a preset application development framework is used to generate basic business system codes of the application framework module, data processing codes of the database module, interface image resources of the interaction module, form operation codes of the backend module, form display codes of the frontend module, and function codes of the form module; A target code of a target form business system is generated according to the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code.
2. The method according to claim 1, characterized in that: The method uses a preset application development framework to generate basic business system code of an application framework module, data processing code of a database module, interface image resources of an interactive module, form operation code of a backend module, form display code of a frontend module, and function code of a form module according to the business information, field attributes of the form data items, and form association relationships, including: Determine system configuration information according to the business information; According to the system configuration information, the basic business system code is generated by using the application development framework; Generate the data processing code according to the field attributes of the form data items and the form association relationship; Generate the interface image resource according to the field attributes of the form data item; According to the field attributes of the form data items and the form association relationship, the form operation code and the form display code are generated respectively using the application development framework; The function code is generated according to the form information.
3. The method according to claim 1, characterized in that The generating the target code of the target 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 comprises: According to the programming language of the preset code template, the basic business system code, the data processing code, the interface image resource, the form operation code, the form display code and the function code are converted into a language to obtain the converted code of each module; The converted codes of the modules are compiled to generate the codes of the target form business system.
4. The method according to claim 3, characterized in that The programming language of the preset code template is used to convert the basic business system code, the data processing code, the interface image resource, the form operation code, the form display code and the function code to obtain the converted code of each module, including: Rewrite the basic business system code, the data processing code, the interface image resources, the form operation code, the form display code and the function code according to the preset code template; The business logic of the rewritten codes of each module is reorganized to generate converted codes of each module.
5. The method according to claim 1, characterized in that The multimodal form analysis tool is pre-integrated with: a calling interface for analysis algorithms of multiple form types; According to the type of the target form, a multimodal form analysis tool is used to analyze the target form to obtain form information of the target form, including: According to the type of the target form, the multimodal form analysis tool is used to call the calling interface of the target analysis algorithm corresponding to the type, analyze the target form, and obtain the form information of the target form.
6. The method according to claim 5, characterized in that The analysis algorithms of the multiple form types include: a picture-to-text large model for the picture form type, a text-to-text large model for the text form type, a table large model for the table form type, and a file parsing tool for the file form type.
7. The method according to claim 1, characterized in that The form information also includes: data content of the form data; Before generating the basic business system code of the application framework module, the data processing code of the database module, the interface picture 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 by using a preset application development framework according to the business information, the field attributes of the form data items and the form association relationship, the method further includes: The form association relationship is verified according to the data content.
8. A software system code automatic generation device, characterized in that: include: The form analysis module is configured to analyze the target form using a multimodal form analysis tool according to the type of the target form to obtain form information of the target form, wherein the form information includes: business information, field attributes of form data items, and form association relationships; A code conversion module is configured to generate a basic business system code of an application framework module, a data processing code of a database module, an interface image resource of an interaction module, a form operation code of a backend module, a form display code of a frontend module, and a function code of a form module by using a preset application development framework according to the business information, the field attributes of the form data items, and the form association relationship; The code generation module is configured to generate the target code of the target form business system according to the basic business system code, the data processing code, the interface image resources, 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, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to perform the steps of the software system code automatic generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the method for automatically generating software system code according to any one of claims 1 to 7 are executed.
Citation Information
Cited By
Method and system for automatically generating software codes
CN119960760A
Material purchasing business behavior management system
CN120543088A
Information Processing Method, Information Processing System, and Program
JP7709715B1
