Application program construction method, device and electronic device
By obtaining the basic parameters and requirement labels of the application, using clustering algorithms and pre-trained language models, and obtaining recommended templates from the template library, the problem of application development requiring professionals in existing technologies is solved, and efficient and accurate application construction is achieved.
Patent Information
- Application Number
- CN202210512330.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-05-11
AI Technical Summary
In existing technologies, application development requires professional developers, and existing low-code or no-code platforms are difficult to accurately match user needs, resulting in the built applications not meeting or being similar to user needs.
By obtaining the basic parameters and requirement labels of the application, using clustering algorithms and pre-trained language models, we obtain the sub-template library and recommended templates that are most similar to the requirement labels from the template library, and then splice and set parameters based on the construction requirements to build the application.
The accuracy of obtaining recommended templates is improved, ensuring that user needs are met and avoiding the problem of applications not meeting user needs or being similar to them.
Smart Images

Figure CN114816340B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of application development, and in particular to an application construction method, device and electronic device. Background Art
[0002] Application development usually needs to be completed by developers. Although there are some no-code or low-code development platforms on the market that can reduce development difficulty and workload, most applications still require professional developers to complete. Summary of the Invention
[0003] The purpose of the present invention is to provide an application construction method, device and electronic device to realize intelligent and rapid construction of application.
[0004] In a first aspect, the present invention provides an application construction method, comprising:
[0005] Obtaining basic parameters of the application to be built, including parameters used to represent the model, industry category, database type, and operating environment of the application to be built;
[0006] Obtain multiple requirement tags of the application to be built, where each requirement tag is used to represent a functional requirement of the application to be built;
[0007] For each requirement tag, based on the basic parameters and the requirement tag, obtain the sub-template library corresponding to the requirement tag from the template library as the recommended sub-template library;
[0008] Select one of the preset templates from each recommended sub-template library as the recommended template for the requirement tag corresponding to the recommended sub-template library;
[0009] Build applications based on recommended templates.
[0010] In one embodiment, obtaining multiple requirement tags of an application to be built includes:
[0011] Based on the requirement document of the application to be built, obtain several attribute information of the application function requirements and the attribute data corresponding to each attribute information;
[0012] For each attribute information, based on the attribute data corresponding to the attribute information, according to the clustering algorithm, the cluster center corresponding to the attribute information is obtained;
[0013] For each cluster center, obtain the label category that is most similar to the cluster center from the preset label categories as the target label category corresponding to the cluster center, where each label category contains at least one label;
[0014] For each target label category, one of the labels is selected as the required label of the attribute information corresponding to the target label category.
[0015] In one embodiment, the clustering algorithm is a K-means clustering algorithm.
[0016] In one embodiment, each sub-template library has a library tag;
[0017] Based on the basic parameters and the required tags, the sub-template library corresponding to the required tags is obtained from the template library as the recommended sub-template library, including:
[0018] Based on the basic parameters, a sub-template library that meets the basic parameter settings is obtained from the template library as a candidate sub-template library;
[0019] Based on the requirement label and library label, the sub-template library with the most similar requirement label is selected from the candidate sub-template libraries as the recommended sub-template library.
[0020] In one embodiment, based on the requirement label and the library label, selecting a sub-template library that is most similar to the requirement label from the candidate sub-template libraries as a recommended sub-template library includes:
[0021] For each requirement label, concatenate the requirement label with the library label of each candidate sub-template library to obtain the concatenated label corresponding to each candidate sub-template library;
[0022] Input each concatenated label into the pre-trained language model to obtain the similarity between each library label and the required label;
[0023] The candidate sub-template library corresponding to the library label with the highest similarity is used as the recommended sub-template library.
[0024] In one embodiment, the pre-trained language model is a BERT model.
[0025] In one embodiment, one of the preset templates is selected from each recommended sub-template library as the recommended template for the requirement tag corresponding to the recommended sub-template library, specifically:
[0026] One of the preset templates is randomly selected from each recommended sub-template library as the recommended template for the requirement label corresponding to the recommended sub-template library.
[0027] In one embodiment, building an application based on a recommended template includes:
[0028] Based on the requirements of the application to be built, splice and / or set parameters for all or part of the recommended templates to build the application;
[0029] The construction requirements include at least one of layout requirements, link relationships, and hierarchical parameters between requirement tags.
[0030] Compared to existing technologies, the present invention's application construction method, which obtains a library of recommended sub-templates based on basic parameters and requirement tags, avoids the problem of relying solely on basic parameters or requirement tags to obtain recommended templates, which can lead to insufficient precision in the recommended templates and, in turn, cause the constructed applications to not meet user requirements. Furthermore, the present invention's method obtains a sub-template library based on requirement tags, ensuring that the obtained sub-template library has a high degree of consistency with the requirement tags, thereby ensuring that the user's requirements can be met. Recommended templates are then obtained from the sub-template library to avoid duplicate applications being constructed.
[0031] In a second aspect, the present invention provides an application building device, comprising:
[0032] A basic parameter acquisition module is used to obtain basic parameters of the application to be built, including parameters used to represent the model, industry category, database type and operating environment of the application to be built;
[0033] A requirement tag acquisition module is used to acquire multiple requirement tags of the application to be built, each requirement tag is used to represent a functional requirement of the application to be built;
[0034] The sub-template library matching module is used to obtain the sub-template library corresponding to each requirement tag from the template library based on the basic parameters and the requirement tag as the recommended sub-template library;
[0035] A recommended template acquisition module is used to select one of the preset templates from each recommended sub-template library as a recommended template for the requirement tag corresponding to the recommended sub-template library;
[0036] Application building modules are used to build applications based on recommended templates.
[0037] In one embodiment, the demand tag acquisition module includes:
[0038] The attribute information acquisition module is used to acquire several attribute information of the application function requirements and the attribute data corresponding to each attribute information based on the requirement document of the application to be built;
[0039] The clustering module is used to obtain the cluster center corresponding to each attribute information based on the attribute data corresponding to the attribute information and according to the clustering algorithm;
[0040] The label category matching module is used to obtain the label category most similar to the cluster center from the preset label categories for each cluster center as the target label category corresponding to the cluster center, wherein each label category contains at least one label;
[0041] The demand label output module is used to select one of the labels for each target label category as the demand label of the attribute information corresponding to the target label category.
[0042] In one embodiment, each sub-template library has a library tag;
[0043] Sub-template library matching module, including:
[0044] The sub-template library preliminary selection module obtains the sub-template library that meets the basic parameter settings from the template library as the sub-template library to be selected based on the basic parameters;
[0045] The recommended sub-template library output module selects the sub-template library with the most similar label to the requirement from the candidate sub-template libraries as the recommended sub-template library based on the requirement label and library label.
[0046] In one embodiment, the recommended sub-template library output module includes:
[0047] The label splicing module is used to splice the demand label with the library label of each sub-template library to be selected for each demand label, and obtain the splicing label corresponding to each sub-template library to be selected;
[0048] The label similarity judgment module inputs each spliced label into the pre-trained language model to obtain the similarity between each library label and the required label;
[0049] The recommended sub-template library selection module takes the candidate sub-template library corresponding to the library label with the highest similarity as the recommended sub-template library.
[0050] In one embodiment, the program construction module is specifically used to construct an application by splicing and / or setting parameters of all or part of the recommended templates based on the construction requirements of the application to be constructed;
[0051] The construction requirements include at least one of layout requirements, link relationships, and hierarchical parameters between requirement tags.
[0052] Compared with the prior art, the beneficial effects of the device provided in the second aspect are the same as the beneficial effects of the method provided in the first aspect, and will not be elaborated here.
[0053] In a third aspect, the present invention provides an electronic device comprising: a processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method of any one of the above-mentioned embodiments.
[0054] Compared with the prior art, the beneficial effects of the electronic device provided in the second aspect are the same as the beneficial effects of the method provided in the first aspect, and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings illustrate exemplary embodiments of the present invention and together with the description serve to explain the principles of the present invention. These drawings are included to provide a further understanding of the present invention and are incorporated in and constitute a part of this specification.
[0056] Figure 1 A schematic diagram showing a flow chart of a method for constructing an application program according to an embodiment of the present invention is shown;
[0057] Figure 2 A topological diagram showing the logical principle of the application building method according to an embodiment of the present invention is shown;
[0058] Figure 3 A schematic diagram of a process for obtaining multiple requirement tags of an application to be built according to an embodiment of the present invention is shown;
[0059] Figure 4 A schematic diagram of a process for obtaining a sub-template library corresponding to a requirement tag from a template library as a recommended sub-template library in an embodiment of the present invention is shown;
[0060] Figure 5 A schematic diagram of a process for selecting a sub-template library that is most similar to a requirement tag from among candidate sub-template libraries as a recommended sub-template library is shown in an embodiment of the present invention;
[0061] Figure 6 A schematic diagram showing the logical structure of an application program construction device according to an embodiment of the present invention is shown;
[0062] Figure 7 A schematic diagram showing the logical structure of a demand tag acquisition module in an embodiment of the present invention is shown;
[0063] Figure 8 A schematic diagram showing the logical structure of a sub-template library matching module in an embodiment of the present invention is shown;
[0064] Figure 9 A schematic diagram showing the logical structure of the recommended sub-template library output module in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0065] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It will be understood that the specific embodiments described herein are intended only to explain the relevant content and are not intended to limit the present invention. It should also be noted that, for ease of description, only portions relevant to the present invention are shown in the accompanying drawings.
[0066] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other.
[0067] In this disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0068] In the present invention, “step numbers” are only used to facilitate the explanation of specific embodiments and are not used to limit the order in which the steps are executed.
[0069] The method provided by the present invention can be executed by a relevant server, and the following description will be given by taking a server or a computer or other electronic device as an example of the execution subject.
[0070] An embodiment of the present invention provides a method for constructing an application program, wherein the application program includes but is not limited to: a downloadable executable application program, a mini-program, a WEB application program (World Wide Web, WEB, Weiwang), an HTML application program (HyperText Mark-up Language, HTML, Hypertext Markup Language), and an embedded program.
[0071] The method provided in the embodiment of the present invention can be executed on a local computer device or on a remote server.
[0072] See also Figure 1 and Figure 2 , the application construction method provided by the embodiment of the present invention includes:
[0073] Step S100: Obtain basic parameters of the application to be built.
[0074] Basic parameters include parameters used to represent the model, industry category, database type, and operating environment of the application to be built.
[0075] For example, a user in industry A plans to build an application for a customer management system. The model of the application is a customer management system, the industry category is industry A, the database is an SQL database, and the operating environment is a remote server loaded with a Windows system. The model parameters, industry category, database, and operating environment can be referred to by pre-setting corresponding identification parameters for easy identification.
[0076] Step S200: Acquire multiple requirement tags of the application to be built.
[0077] Each requirement tag is used to represent a functional requirement of the application to be built. For example, if user B has functional requirements such as customer management, order management, warehouse management, logistics management, internal communication, and office collaboration, he or she can obtain the requirement tags of the above-mentioned related functions.
[0078] Step S300: For each requirement tag, based on the basic parameters and the requirement tag, a sub-template library corresponding to the requirement tag is obtained from the template library as a recommended sub-template library.
[0079] In the above steps, obtaining the recommended sub-template library based on basic parameters and requirement tags can avoid relying solely on basic parameters or requirement tags to obtain recommended templates, which leads to insufficient accuracy of recommended templates, and further leads to problems such as the constructed application not meeting user needs. Taking the user in Industry A in the above example as an example, the user intends to build a customer management system, and the user also has an e-commerce system, so the requirement tags may also include labels such as order management and warehouse management. The above steps obtain the recommended sub-template library by combining basic parameters and requirement tags, and then obtain the recommended templates, which can improve the efficiency of obtaining recommended templates and at the same time improve the accuracy of obtaining recommended templates.
[0080] Step S400: selecting one of the preset templates from each recommended sub-template library as a recommended template for the requirement tag corresponding to the recommended sub-template library.
[0081] In the embodiment of the present invention, the higher the degree of conformity between the preset template obtained from the template library and the requirement tag, the more likely the user's requirement can be met. However, this may also result in the application programs constructed based on the above method being similar.
[0082] To solve the above problems, the present invention obtains a sub-template library through demand tags, so that the obtained sub-template library has a high degree of consistency with the demand tags, thereby ensuring that the user's needs can be met, and then obtains recommended templates from the sub-template library to avoid the appearance of similarity in the constructed applications.
[0083] Optionally, in step S400, one of the preset templates is selected from each recommended sub-template library as the recommended template for the demand tag corresponding to the recommended sub-template library, and the recommended template may be obtained by random selection.
[0084] The above-mentioned preset templates are program modules that are pre-developed according to preset development specifications for relevant functional requirements of various industries. The preset modules may have preset contents such as front-end pages, back-end pages, software codes, databases, and corresponding interfaces, preset adjustable parameters, etc. according to features such as functional requirements. The preset templates in the template library can be developed by developers according to preset development specifications, or the program modules developed by users can be tagged and classified, and added to the template library so that the preset templates continue to increase. It should be noted that those skilled in the art should easily realize that the form and content of the development specifications and preset templates can be set according to the actual development needs, and professional and technical personnel can implement the functions described in this article according to application scenarios, etc. Such implementation should not be considered to exceed the scope of the present invention.
[0085] Step S500: Build an application based on the recommended template. Exemplarily, in step S500, the application is built by splicing and / or setting parameters for all or part of the recommended templates; the construction requirements include at least one of the layout requirements, link relationships, and hierarchical parameters between the requirement tags.
[0086] In specific application scenarios, since the recommended templates are pre-developed, pre-set modules, building the desired application requires only parameter settings, adjustments, module integration, and database configuration. In the above example, the pre-set templates can be redeveloped to meet individual user needs and diverse customization requirements.
[0087] Reference Figure 2 and Figure 3 In one example, step S200 includes:
[0088] Step S201: Based on the requirement document of the application to be built, obtain several attribute information of the application function requirements and the attribute data corresponding to each attribute information; for example, the attribute information includes: navigation bar, title bar, process steps, etc.; the attribute data includes: size, position, style, etc.
[0089] Step S202: for each piece of attribute information, based on the attribute data corresponding to the attribute information, obtain the cluster center corresponding to the attribute information according to the clustering algorithm;
[0090] Step S203: For each cluster center, obtain the label category that is most similar to the cluster center from the preset label categories as the target label category corresponding to the cluster center, wherein each label category includes at least one label;
[0091] Step S204: For each target tag category, select one tag as the required tag for the attribute information corresponding to the target tag category. In this step, a tag of the target tag category can be randomly obtained as the final required tag to avoid the constructed application being identical to previously constructed applications.
[0092] Since there are certain differences between the description of the user requirement document and the preset templates in the template library, this difference may be a difference in the functional requirements themselves, or it may be a difference caused by the text description. In order to minimize the difference and the resulting discrepancy between the final screened preset template and the user's actual needs, it is necessary to perform certain processing on the functional requirements of the requirement document.
[0093] In the above example, a clustering algorithm is used to obtain the cluster center corresponding to the attribute information of each functional requirement, and then the label category most similar to the cluster center is matched to obtain the corresponding requirement label. This can make the functional requirements and the requirement labels match as much as possible, so that the recommended templates can be accurately obtained from the template library using the requirement labels.
[0094] The above clustering algorithm may adopt a K-means clustering algorithm (k-means clustering algorithm).
[0095] In one example, each sub-template library has a library tag; refer to Figure 2 and Figure 4 Step S300 includes:
[0096] Step S301: Based on the basic parameters, a sub-template library that meets the basic parameter settings is obtained from the template library as a sub-template library to be selected;
[0097] Step S302 : Based on the requirement label and the library label, a sub-template library with the most similarity to the requirement label is selected from the candidate sub-template libraries as a recommended sub-template library.
[0098] In the above example, the sub-template library has a library label. By comparing the requirement label with the library label, the sub-template library most similar to the requirement label can be quickly found as the recommended sub-template library.
[0099] In one example, referring to Figure 2 and Figure 5 , step S302 includes:
[0100] Step S3021: For each requirement tag, concatenate the requirement tag with the library tag of each sub-template library to be selected, and obtain the concatenated tag corresponding to each sub-template library to be selected;
[0101] Step S3022: Input each concatenated label into the pre-trained language model to obtain the similarity between each library label and the required label;
[0102] Step S3023: The candidate sub-template library corresponding to the library label with the highest similarity is used as the recommended sub-template library.
[0103] The above pre-trained language model is the BERT model (Bidirectional Encoder Representations from Transformers, BERT).
[0104] In summary, the application construction method of the embodiment of the present invention obtains a recommended sub-template library based on basic parameters and requirement tags, and then recommends templates. This can avoid problems such as relying solely on basic parameters or requirement tags to obtain recommended templates, which leads to insufficient precision of recommended templates and, in turn, causes the constructed application to not meet user requirements. In addition, the method of the present invention obtains a sub-template library through requirement tags, so that the obtained sub-template library has a high degree of consistency with the requirement tags, thereby ensuring that the user's needs can be met. Recommended templates are then obtained from the sub-template library to avoid duplicate applications being constructed.
[0105] Reference Figure 2 and Figure 6 , an embodiment of the present invention further provides an application construction device, comprising:
[0106] A basic parameter acquisition module 100 is used to acquire basic parameters of the application to be built, including parameters used to represent the model, industry category, database type, and operating environment of the application to be built;
[0107] A requirement tag acquisition module 200 is used to acquire multiple requirement tags of the application to be built, each requirement tag is used to represent a functional requirement of the application to be built;
[0108] The sub-template library matching module 300 is used to obtain, for each requirement tag, a sub-template library corresponding to the requirement tag from the template library based on the basic parameters and the requirement tag as a recommended sub-template library;
[0109] The recommended template acquisition module 400 is used to select one of the preset templates from each recommended sub-template library as the recommended template for the requirement tag corresponding to the recommended sub-template library;
[0110] The program construction module 500 is used to construct an application based on the recommended template.
[0111] In one example, referring to Figure 2 and Figure 7 , the demand tag acquisition module 200 includes:
[0112] The attribute information acquisition module 201 is used to acquire a plurality of attribute information of the application function requirements and the attribute data corresponding to each attribute information based on the requirement document of the application to be built;
[0113] The clustering module 202 is configured to obtain, for each piece of attribute information, a cluster center corresponding to the attribute information based on the attribute data corresponding to the attribute information and using a clustering algorithm;
[0114] The label category matching module 203 is used to obtain, for each cluster center, the label category that is most similar to the cluster center from the preset label categories as the target label category corresponding to the cluster center, wherein each label category includes at least one label;
[0115] The required label output module 204 is configured to select one label for each target label category as the required label for the attribute information corresponding to the target label category.
[0116] In one example, each sub-template library has a library tag; refer to Figure 2 and Figure 8 , the sub-template library matching module 300 includes:
[0117] The sub-template library preliminary selection module 301 obtains a sub-template library that meets the basic parameter settings from the template library as a sub-template library to be selected based on the basic parameters;
[0118] The recommended sub-template library output module 302 selects a sub-template library with the most similarity to the requirement label from the candidate sub-template libraries as a recommended sub-template library based on the requirement label and the library label.
[0119] In one example, referring to Figure 2 and Figure 9 , the recommended sub-template library output module 302 includes:
[0120] The label splicing module 3021 is used to splice each demand label with the library label of each sub-template library to be selected, to obtain the splicing label corresponding to each sub-template library to be selected;
[0121] The label similarity determination module 3022 inputs each concatenated label into the pre-trained language model to obtain the similarity between each library label and the required label;
[0122] The recommended sub-template library selection module 3023 selects the candidate sub-template library corresponding to the library label with the highest similarity as the recommended sub-template library.
[0123] In one example, the program construction module is specifically used to splice and / or set parameters of all or part of the recommended templates based on the construction requirements of the application to be built, so as to build the application;
[0124] The construction requirements include at least one of layout requirements, link relationships, and hierarchical parameters between requirement tags.
[0125] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0126] An embodiment of the present invention further provides an electronic device, comprising: a processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method in any one of the above-mentioned embodiments.
[0127] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the advanced reduced instruction set machine (ARM) architecture.
[0128] The above-mentioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus random access memory (DRRAM).
[0129] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by a program to instruct the relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0130] Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing module, each unit may exist physically separately, or two or more units may be integrated into a single module. Such integrated modules may be implemented in either hardware or software functional modules. If such integrated modules are implemented as software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. Such storage medium may be a read-only memory, a magnetic disk, or an optical disk, for example.
[0131] Any process or method description in the flowchart of the present invention or described in other ways herein can be understood to represent a module, segment or portion of code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiments of the present invention includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in the reverse order depending on the functions involved.
[0132] The logic and / or steps of the present invention represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or used in combination with these instruction execution systems, devices or apparatuses.
[0133] It should be understood by those skilled in the art that the above embodiments are merely for the purpose of illustrating the present invention clearly, and are not intended to limit the scope of the present invention. For those skilled in the art, other changes or modifications may be made based on the above invention, and these changes or modifications are still within the scope of the present invention.
Claims
1. A method for constructing an application, characterized in that: include: Obtaining basic parameters of the application to be built, the basic parameters including parameters for representing the model, industry category, database type, and operating environment of the application to be built; Acquire multiple requirement tags of the application to be built, each of the requirement tags being used to represent a functional requirement of the application to be built; For each of the requirement tags, based on the basic parameters, a sub-template library that meets the basic parameter settings is obtained from the template library as a sub-template library to be selected, each of the sub-template libraries having a library tag; Based on the requirement label and the library label, selecting a sub-template library that is most similar to the requirement label from the candidate sub-template libraries as a recommended sub-template library; Selecting one of the preset templates from each of the recommended sub-template libraries as a recommended template for the requirement tag corresponding to the recommended sub-template library; Building the application based on the recommended template; Based on the requirement document of the application to be built, obtaining multiple attribute information of the application function requirements and attribute data corresponding to each attribute information; including: For each piece of attribute information, based on the attribute data corresponding to the attribute information, obtaining the cluster center corresponding to the attribute information according to a clustering algorithm; For each cluster center, obtain the label category most similar to the cluster center from the preset label categories as the target label category corresponding to the cluster center, wherein each label category includes at least one label; For each target tag category, one of the tags is selected as the required tag of the attribute information corresponding to the target tag category.
2. The method according to claim 1, wherein The clustering algorithm is the K-means clustering algorithm.
3. The method according to claim 1, wherein Based on the requirement label and the library label, selecting a sub-template library that is most similar to the requirement label from the candidate sub-template libraries as the recommended sub-template library includes: For each of the requirement labels, the requirement label is concatenated with the library label of each of the to-be-selected sub-template libraries to obtain a concatenated label corresponding to each of the to-be-selected sub-template libraries; Input each of the spliced labels into a pre-trained language model to obtain the similarity between each library label and the required label; The candidate sub-template library corresponding to the library label with the highest similarity is used as the recommended sub-template library.
4. The method according to claim 3, wherein The pre-trained language model is a BERT model.
5. The method according to any one of claims 1 to 4, characterized in that Building the application based on the recommended template includes: Based on the construction requirements of the application to be built, splicing and / or setting parameters of all or part of the recommended templates to build the application; The construction requirements include at least one of layout requirements, link relationships, and hierarchical parameters among the requirement tags.
6. An application building device, characterized in that: include: A basic parameter acquisition module is used to acquire basic parameters of the application to be built, wherein the basic parameters include parameters for representing the model, industry category, database type and operating environment of the application to be built; A requirement tag acquisition module is used to acquire multiple requirement tags of the application to be built, each of the requirement tags is used to represent a functional requirement of the application to be built; a sub-template library matching module configured to, for each of the requirement tags, obtain, based on the basic parameters, from the template library a sub-template library that satisfies the basic parameter settings as a candidate sub-template library, wherein each sub-template library has a library tag; and, based on the requirement tag and the library tag, select from the candidate sub-template libraries a sub-template library that is most similar to the requirement tag as a recommended sub-template library; A recommended template acquisition module is used to select one of the preset templates from each of the recommended sub-template libraries as a recommended template for the requirement tag corresponding to the recommended sub-template library; A program construction module, configured to construct the application based on the recommended template; The demand tag acquisition module includes: An attribute information acquisition module is used to acquire a plurality of attribute information of the application function requirements and attribute data corresponding to each attribute information based on the requirement document of the application to be built; A clustering module, configured to obtain, for each piece of attribute information, a cluster center corresponding to the attribute information based on the attribute data corresponding to the attribute information and according to a clustering algorithm; A label category matching module is used to obtain, for each cluster center, a label category that is most similar to the cluster center from preset label categories as the target label category corresponding to the cluster center, wherein each label category includes at least one label; The required label output module is used to select one label for each target label category as the required label of the attribute information corresponding to the target label category.
7. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Code automatic generation method, code automatic generation device and electronic equipment
CN107729003A
Method for quickly classifying massive database tables
CN111104466A
Applet generation method and device, electronic equipment and storage medium
CN113778541A