Front-end modeling method and device, computer equipment and readable storage medium
By obtaining back-end entity information, extracting features and generating front-end interface information, the inefficiency problem caused by fixing modeling templates of traditional API design tools is solved, and front-end automated modeling is realized, and efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411209540.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-13
AI Technical Summary
The modeling templates of traditional API design tools are relatively fixed and cannot directly match the actual modeling needs, resulting in inefficient front-end modeling.
By obtaining back-end entity information, extracting back-end entity features, filtering interactive entity features from it, generating front-end interface information, and performing front-end modeling based on modeling requirements and interface information to realize front-end automated modeling.
Improves the efficiency and accuracy of front-end modeling, ensures that modeling matches back-end entity and front-end modeling instructions, and improves development efficiency and code readability.
Smart Images

Figure CN119127190A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a front-end modeling method, apparatus, computer device, and computer-readable storage medium. Background Art
[0002] With the development of technology, software and applications have become an indispensable part of our daily life and work, and users' demand for software development is constantly updated, so there is an urgent need for a front-end modeling method.
[0003] In traditional technology, automatic front-end modeling is usually achieved through API design tools, but the modeling templates of API design tools are relatively fixed. When the actual modeling requirements do not match the modeling templates, front-end modeling cannot be directly achieved through API design tools, resulting in low front-end modeling efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a front-end modeling method, device, computer equipment and computer-readable storage medium that can improve the efficiency of front-end modeling in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a front-end modeling method, comprising:
[0006] In response to the front-end modeling instruction, acquiring back-end entity information, and extracting back-end entity features from the back-end entity information;
[0007] Filtering interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend;
[0008] Generate front-end interface information according to the interactive entity characteristics;
[0009] According to the modeling requirement information in the front-end modeling instruction and the front-end interface information, front-end modeling is performed to obtain front-end modeling information.
[0010] In one of the embodiments, extracting backend entity features from the backend entity information includes: identifying entity attributes of multiple entity models from the backend entity information; generating corresponding relationships between the entity attributes of the multiple entity models based on the entity attributes of the multiple entity models; and extracting backend entity features from the corresponding relationships between the entity attributes of the multiple entity models and the entity attributes of the multiple entity models.
[0011] In one of the embodiments, the entity attributes include field description attributes, field query attributes and field path attributes; the extracting backend entity features from the entity attributes of the multiple entity models and the correspondence between the entity attributes of the multiple entity models includes: extracting field description features from the field description attributes of the multiple entity models, extracting field query features from the field query attributes of the multiple entity models, and extracting field path features from the field path attributes of the multiple entity models; according to the labels of the correspondence between the entity attributes of the multiple entity models, the field description features, the field query features and the field path features are spliced to obtain the backend entity features.
[0012] In one of the embodiments, generating the front-end interface information according to the interactive entity characteristics includes: performing interaction type identification on the interactive entity characteristics to obtain interaction type information; and generating the front-end interface information according to the interaction type information and the interactive entity characteristics.
[0013] In one of the embodiments, performing front-end modeling according to the modeling requirement information in the front-end modeling instruction and the front-end interface information to obtain front-end modeling information includes: obtaining a modeling template that matches the modeling requirement information in the front-end modeling instruction, and generating front-end modeling data according to the modeling template; performing front-end modeling according to the modeling template according to the front-end modeling data and the front-end interface information to obtain front-end modeling information.
[0014] In one of the embodiments, the obtaining of a modeling template that matches the modeling requirement information in the front-end modeling instruction includes: obtaining the matching degrees between the modeling requirement information in the front-end modeling instruction and a plurality of preset modeling templates respectively; if there is a first modeling template whose corresponding matching degree is greater than a preset matching degree threshold among the plurality of preset modeling templates, the first modeling template is determined as the modeling template that matches the modeling requirement information in the front-end modeling instruction; if there is no target modeling template whose corresponding matching degree is greater than a preset matching degree threshold among the plurality of preset modeling templates, a second modeling template whose corresponding matching degree is the largest is selected from the plurality of preset modeling templates, and the second modeling template is adjusted according to the modeling requirement information to obtain a modeling template that matches the modeling requirement information in the front-end modeling instruction.
[0015] In one of the embodiments, before performing front-end modeling according to the modeling template based on the front-end modeling data and the front-end interface information and obtaining the front-end modeling information, the method further includes: performing anomaly detection on the front-end modeling data to obtain anomaly detection results; and optimizing the front-end modeling data based on the anomaly detection results, wherein the optimization process includes at least one of sensitive information optimization and code optimization.
[0016] In a second aspect, the present application also provides a front-end modeling device, including:
[0017] An acquisition module, used for acquiring backend entity information in response to a frontend modeling instruction, and extracting backend entity features from the backend entity information;
[0018] A screening module, used to screen interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend;
[0019] A generating module, used for generating front-end interface information according to the interactive entity characteristics;
[0020] The modeling module is used to perform front-end modeling according to the modeling requirement information in the front-end modeling instruction and the front-end interface information to obtain front-end modeling information.
[0021] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0022] In response to the front-end modeling instruction, acquiring back-end entity information, and extracting back-end entity features from the back-end entity information;
[0023] Filtering interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend;
[0024] Generate front-end interface information according to the interactive entity characteristics;
[0025] According to the modeling requirement information in the front-end modeling instruction and the front-end interface information, front-end modeling is performed to obtain front-end modeling information.
[0026] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0027] In response to the front-end modeling instruction, acquiring back-end entity information, and extracting back-end entity features from the back-end entity information;
[0028] Filtering interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend;
[0029] Generate front-end interface information according to the interactive entity characteristics;
[0030] According to the modeling requirement information in the front-end modeling instruction and the front-end interface information, front-end modeling is performed to obtain front-end modeling information.
[0031] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0032] In response to the front-end modeling instruction, acquiring back-end entity information, and extracting back-end entity features from the back-end entity information;
[0033] Filtering interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend;
[0034] Generate front-end interface information according to the interactive entity characteristics;
[0035] According to the modeling requirement information in the front-end modeling instruction and the front-end interface information, front-end modeling is performed to obtain front-end modeling information.
[0036] The above-mentioned front-end modeling method, apparatus, computer equipment and computer-readable storage medium obtain back-end entity information in response to front-end modeling instructions, and extract back-end entity features from the back-end entity information; screen interactive entity features from the back-end entity features, wherein the interactive entity features are used to characterize the interactive relationship between the front-end and the back-end; generate front-end interface information according to the interactive entity features; perform front-end modeling according to the modeling requirement information in the front-end modeling instructions and the front-end interface information to obtain front-end modeling information, thereby realizing front-end automated modeling, and the modeling matches the back-end entity and the front-end modeling instructions, thereby improving the efficiency of front-end modeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 An application environment diagram of a front-end modeling method in an embodiment;
[0039] Figure 2 A schematic diagram of a flow chart of a front-end modeling method in one embodiment;
[0040] Figure 3 A schematic diagram of a flow chart of a step of extracting backend entity features from backend entity information in one embodiment;
[0041] Figure 4 A flowchart of steps for performing front-end modeling and obtaining front-end modeling information according to modeling requirement information and front-end interface information in a front-end modeling instruction in an embodiment;
[0042] Figure 5 A structural block diagram of a front-end modeling device in one embodiment;
[0043] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] It should be noted that the information (including but not limited to front-end modeling instructions, back-end entity information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the acquisition, transmission, storage, use and processing of relevant data are in compliance with the relevant provisions of national laws and regulations. For content pushed to users (for example, target sentences, etc.), users can refuse or conveniently refuse content push, etc. In the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0046] The front-end modeling method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 responds to the front-end modeling instruction, obtains the back-end entity information, extracts the back-end entity features from the back-end entity information, and screens the interactive entity features from the back-end entity features, wherein the interactive entity features are used to characterize the interactive relationship between the front-end and the back-end; generates the front-end interface information according to the interactive entity features; performs front-end modeling according to the modeling requirement information and the front-end interface information in the front-end modeling instruction, and obtains the front-end modeling information. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0047] In an exemplary embodiment, Figure 2 As shown, a front-end modeling method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 202 to 208. Among them:
[0048] Step 202 , in response to the front-end modeling instruction, obtain back-end entity information, and extract back-end entity features from the back-end entity information.
[0049] Among them, the front-end modeling instruction in step 202 can be initiated by the user on demand, or it can be automatically generated when a preset condition is met. The preset condition is that when a back-end system update is detected, a front-end modeling instruction is generated so that the front-end page can match the back-end system. The back-end entity information includes entity information of multiple entity models, and the entity information includes at least one of the field name, field type, field description, field path and field index. The specific content of the entity information corresponds to the front-end application scenario. For example, when the front-end application scenario belongs to an order purchase page, the specific content of the entity information is mostly information such as the number, name, price, etc. of the product.
[0050] Exemplarily, acquiring the backend entity information includes: querying entity information of a plurality of entity models from a preset database, and determining the entity information of the plurality of entity models as the backend entity information.
[0051] Furthermore, querying entity information of multiple entity models from a preset database includes: querying multiple entity models from the preset database, performing entity mapping on the multiple entity models respectively, and obtaining entity information of the multiple entity models.
[0052] Among them, the way to perform entity mapping can be MyBatis Plus ecological integration.
[0053] Optionally, before obtaining the backend entity information, it also includes: obtaining database information of a preset database, wherein the database information includes a database URL (uniform resource locator), a database login name, and a database login password; calling the preset database according to the database URL, the database login name, and the database login password, and performing information query on the preset database.
[0054] Exemplarily, extracting backend entity features from backend entity information includes: extracting backend entity features from the backend entity information by a feature extractor.
[0055] Step 204: Filter interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend.
[0056] Exemplarily, step 204 includes: obtaining entity feature functions of backend entity features; and screening interactive entity features whose corresponding entity feature functions are interactive functions from the backend entity features.
[0057] Step 206: Generate front-end interface information according to the interactive entity characteristics.
[0058] Exemplarily, step 206 includes: generating front-end interface information matching the interaction type of the interactive entity feature.
[0059] As an embodiment, step 206 includes: performing interaction type identification on the interaction entity characteristics to obtain interaction type information; and generating front-end interface information according to the interaction type information and the interaction entity characteristics.
[0060] The interaction type information includes but is not limited to query type information, modification type information, addition type information and deletion type information.
[0061] As an embodiment, front-end interface information is generated according to interaction type information and interaction entity characteristics, including: if there is an interaction entity characteristic whose interaction type information is query type information, front-end query interface information is generated according to the query type information and the interaction entity characteristic, and the front-end query interface information is determined as the front-end interface information corresponding to the interaction entity characteristic; if there is an interaction entity characteristic whose interaction type information is modification type information, front-end modification interface information is generated according to the modification type information and the interaction entity characteristic, and the front-end modification interface information is determined as the front-end interface information corresponding to the interaction entity characteristic; if there is an interaction entity characteristic whose interaction type information is new addition type information, front-end new addition interface information is generated according to the new addition type information and the interaction entity characteristic, and the front-end new addition interface information is determined as the front-end interface information corresponding to the interaction entity characteristic; if there is an interaction entity characteristic whose interaction type information is deletion type information, front-end deletion interface information is generated according to the deletion type information and the interaction entity characteristic, and the front-end deletion interface information is determined as the front-end interface information corresponding to the interaction entity characteristic.
[0062] Among them, the generation process of the front-end interface information can be implemented by the velocity template file. Specifically, the velocity template file contains a specific syntax to reference the object defined by the Java code, uses .vm (merge file) as the file extension, and is written in VTL (Velocity Template Language). Therefore, the front-end interface information is defined through the velocity template file according to the interaction type information and the interaction entity characteristics.
[0063] In this way, the page design can be separated from the background logic, the code and content can be decoupled, the development efficiency can be improved, and the readability and maintainability of the code can be enhanced.
[0064] Step 208, performing front-end modeling according to the modeling requirement information and the front-end interface information in the front-end modeling instruction to obtain front-end modeling information.
[0065] Exemplarily, step 208 includes: obtaining a modeling template that matches the modeling requirement information in the front-end modeling instruction; performing front-end modeling according to the modeling template and the front-end interface information to obtain front-end modeling information.
[0066] In the above-mentioned front-end modeling method, by responding to the front-end modeling instructions, the back-end entity information is obtained, and the back-end entity features are extracted from the back-end entity information; the interactive entity features are screened from the back-end entity features, wherein the interactive entity features are used to characterize the interactive relationship between the front-end and the back-end; the front-end interface information is generated according to the interactive entity features; the front-end modeling is performed according to the modeling requirement information and the front-end interface information in the front-end modeling instructions to obtain the front-end modeling information, thereby realizing front-end automated modeling, and the modeling matches the back-end entities and the front-end modeling instructions, thereby improving the efficiency of the front-end modeling.
[0067] In an exemplary embodiment, Figure 3 As shown, extracting backend entity features from backend entity information includes steps 302 to 306. Among them:
[0068] Step 302: identifying entity attributes of multiple entity models from backend entity information.
[0069] Among them, entity attributes include field description attributes, field query attributes and field path attributes.
[0070] Exemplarily, step 302 includes: for each entity model, determining the field name, field type and field description of the entity model as the field description attributes of the entity model, determining the field index of the entity model as the field query attribute of the entity model, and determining the field path of the entity model as the field path attribute of the entity model.
[0071] Step 304: Generate corresponding relationships between entity attributes of the multiple entity models according to the entity attributes of the multiple entity models.
[0072] Exemplarily, step 304 includes: matching entity models with entity attributes of the entity models to obtain a corresponding relationship between entity attributes of multiple entity models.
[0073] Step 306: extracting backend entity features from entity attributes of the plurality of entity models and corresponding relationships between entity attributes of the plurality of entity models.
[0074] As an embodiment, step 306 includes: extracting field description features from field description attributes of multiple entity models, extracting field query features from field query attributes of multiple entity models, and extracting field path features from field path attributes of multiple entity models; according to the labels of the corresponding relationships between entity attributes of multiple entity models, splicing the field description features, field query features and field path features to obtain backend entity features.
[0075] According to the labels of the correspondence between the entity attributes of multiple entity models, the field description features, field query features and field path features are spliced to obtain the backend entity features, including: according to the labels of the correspondence between the entity attributes of the entity models, the field description features, field query features and field path features that have a correspondence with the same entity model are spliced to obtain the entity features of multiple entity models; the entity features of multiple entity models are spliced to obtain the backend entity features.
[0076] In this embodiment, entity attributes of multiple entity models are identified from backend entity information; corresponding relationships between entity attributes of multiple entity models are generated according to the entity attributes of multiple entity models; backend entity features are extracted from the entity attributes of multiple entity models and the corresponding relationships between entity attributes of multiple entity models, and the entity attributes of multiple entity models and the corresponding relationships between entity attributes of multiple entity models are used as the basis for extracting backend entity features, thereby ensuring that the backend entity features can accurately characterize the entity attributes and corresponding relationships of the backend entity models, thereby improving the accuracy of extracting backend entity features.
[0077] In an exemplary embodiment, Figure 4 As shown, according to the modeling requirement information and the front-end interface information in the front-end modeling instruction, front-end modeling is performed to obtain the front-end modeling information, including steps 402 to 404. Among them:
[0078] Step 402: Acquire a modeling template that matches the modeling requirement information in the front-end modeling instruction, and generate front-end modeling data according to the modeling template.
[0079] As one embodiment, obtaining a modeling template that matches the modeling requirement information in the front-end modeling instruction includes: obtaining the matching degree between the modeling requirement information in the front-end modeling instruction and multiple preset modeling templates respectively; selecting the template with the highest corresponding matching degree from the multiple preset modeling templates, and determining the template as the modeling template that matches the modeling requirement information in the front-end modeling instruction.
[0080] As one embodiment, a modeling template that matches the modeling requirement information in the front-end modeling instruction is obtained, including: obtaining the matching degrees between the modeling requirement information in the front-end modeling instruction and multiple preset modeling templates respectively; if there is a first modeling template with a corresponding matching degree greater than a preset matching degree threshold among the multiple preset modeling templates, the first modeling template is determined as the modeling template that matches the modeling requirement information in the front-end modeling instruction; if there is a target modeling template with a corresponding matching degree greater than the preset matching degree threshold among the multiple preset modeling templates, a second modeling template with the largest corresponding matching degree is selected from the multiple preset modeling templates, and the second modeling template is adjusted according to the modeling requirement information to obtain a modeling template that matches the modeling requirement information in the front-end modeling instruction.
[0081] Furthermore, the degree of matching between the modeling requirement information in the front-end modeling instruction and the multiple preset modeling templates is obtained, including: obtaining the modeling information of the multiple preset modeling templates, and determining the similarity between the modeling requirement information in the front-end modeling instruction and the modeling information of the multiple preset modeling templates as the degree of matching between the modeling requirement information in the front-end modeling instruction and the multiple preset modeling templates.
[0082] It is understandable that the generated front-end modeling data may have the risk of sensitive information leakage, and there may be abnormal situations where the code is automatically written incorrectly, resulting in inaccurate front-end pages obtained by modeling.
[0083] Optionally, in order to overcome the technical defect of inaccurate front-end page obtained by modeling due to the above-mentioned abnormal situation, before step 404, the method also includes: performing anomaly detection on the front-end modeling data to obtain anomaly detection results; optimizing the front-end modeling data according to the anomaly detection results, wherein the optimization process includes at least one of sensitive information optimization and code optimization.
[0084] As an embodiment, anomaly detection is performed on the front-end modeling data to obtain anomaly detection results, including: performing sensitive information detection and code review detection on the front-end modeling data, if the front-end modeling data contains sensitive information and the code review is correct, the modeling sensitivity detection result is determined as the anomaly detection result of the front-end modeling data; if the front-end modeling data contains sensitive information and the code review is incorrect, the modeling code anomaly result and the modeling sensitivity detection result are jointly determined as the anomaly detection result of the front-end modeling data; if the front-end modeling data does not contain sensitive information and the code review is incorrect, the modeling code anomaly result is determined as the anomaly detection result of the front-end modeling data; if the front-end modeling data does not contain sensitive information and the code review is incorrect, the modeling code anomaly result is determined as the anomaly detection result of the front-end modeling data; if the front-end modeling data does not contain sensitive information and the code review is correct, the normal modeling detection result is determined as the anomaly detection result of the front-end modeling data.
[0085] As an embodiment, the front-end modeling data is optimized according to the anomaly detection result, including: if the anomaly detection result is a modeling sensitive detection result, the front-end modeling data is optimized for sensitive information; if the anomaly detection result is a modeling code anomaly result and a modeling sensitive detection result, the front-end modeling data is optimized for sensitive information and code; if the anomaly detection result is a modeling code anomaly result, the front-end modeling data is optimized for code; if the anomaly detection result is a modeling code anomaly result, the front-end modeling data is optimized for code; if the anomaly detection result is a normal modeling detection result, the front-end modeling data is kept unchanged.
[0086] Step 404, performing front-end modeling according to the front-end modeling data and the front-end interface information and the modeling template to obtain front-end modeling information.
[0087] Exemplarily, step 404 includes: by traversing the modeling template, merging and rendering the front-end modeling data, the front-end interface information and the modeling template to obtain the front-end modeling information.
[0088] Among them, front-end modeling can be implemented through Velocity, specifically: initialize the VelocityEngine instance, load the modeling template through the getTemplate method of VelocityEngine, and treat it as a Template object; create a VelocityContext instance, and add front-end modeling data and front-end interface information to it; call the merge method of the Template object to merge the front-end modeling data, front-end interface information and the modeling template; after rendering is completed, use tools such as StringWriter to collect the front-end modeling information.
[0089] Optionally, after performing front-end modeling according to the modeling requirement information and the front-end interface information in the front-end modeling instruction and obtaining the front-end modeling information, the method further includes: binding the front-end modeling information with the front-end application.
[0090] Among them, front-end data binding can be achieved through Vue.js.
[0091] In this way, changes in the application state will be immediately reflected in the DOM, and vice versa. This design allows developers to focus more on data changes without having to worry about how to manually update the UI (User Interface) of the page, so that the front-end can be remodeled in a timely manner to ensure that the front-end application meets user expectations.
[0092] In this embodiment, a modeling template that matches the modeling requirement information in the front-end modeling instruction is obtained, and front-end modeling data is generated based on the modeling template; front-end modeling is performed according to the modeling template based on the front-end modeling data and the front-end interface information to obtain front-end modeling information, thereby ensuring that the template used in the front-end modeling matches the modeling requirement information, thereby ensuring the accuracy of the front-end modeling.
[0093] As a detailed embodiment, in response to a front-end modeling instruction, back-end entity information is obtained, and entity attributes of multiple entity models are identified from the back-end entity information; based on the entity attributes of the multiple entity models, a corresponding relationship between the entity attributes of the multiple entity models is generated; field description features are extracted from the field description attributes of the multiple entity models, field query features are extracted from the field query attributes of the multiple entity models, and field path features are extracted from the field path attributes of the multiple entity models; based on the labels of the corresponding relationship between the entity attributes of the multiple entity models, the field description features, field query features and field path features are spliced to obtain back-end entity features; interactive entity features are screened from the back-end entity features, wherein the interactive entity features are used to characterize the interactive relationship between the front-end and the back-end; interactive type identification is performed on the interactive entity features to obtain interactive type information; and front-end interface information is generated based on the interactive type information and the interactive entity features.
[0094] Furthermore, the matching degrees between the modeling requirement information in the front-end modeling instruction and the multiple preset modeling templates are obtained; if there is a first modeling template with a corresponding matching degree greater than a preset matching degree threshold among the multiple preset modeling templates, the first modeling template is determined as the modeling template that matches the modeling requirement information in the front-end modeling instruction; if there is a target modeling template with a corresponding matching degree greater than the preset matching degree threshold among the multiple preset modeling templates, a second modeling template with the largest corresponding matching degree is selected from the multiple preset modeling templates, and the second modeling template is adjusted according to the modeling requirement information to obtain a modeling template that matches the modeling requirement information in the front-end modeling instruction; front-end modeling data is generated according to the modeling template; anomaly detection is performed on the front-end modeling data to obtain anomaly detection results; according to the anomaly detection results, the front-end modeling data is optimized, wherein the optimization process includes at least one of sensitive information optimization and code optimization; front-end modeling is performed according to the modeling template according to the front-end modeling data and the front-end interface information to obtain front-end modeling information.
[0095] In this way, by responding to the front-end modeling instructions, the back-end entity information is obtained, and the back-end entity features are extracted from the back-end entity information; the interactive entity features are screened from the back-end entity features, wherein the interactive entity features are used to characterize the interactive relationship between the front-end and the back-end; the front-end interface information is generated according to the interactive entity features; the front-end modeling is performed according to the modeling requirement information and the front-end interface information in the front-end modeling instructions, and the front-end modeling information is obtained, thereby realizing front-end automated modeling, and the modeling matches the back-end entities and the front-end modeling instructions, thereby improving the front-end modeling efficiency.
[0096] Furthermore, entity attributes of multiple entity models are identified from the backend entity information; corresponding relationships between the entity attributes of the multiple entity models are generated based on the entity attributes of the multiple entity models; backend entity features are extracted from the entity attributes of the multiple entity models and the corresponding relationships between the entity attributes of the multiple entity models, and the entity attributes of the multiple entity models and the corresponding relationships between the entity attributes of the multiple entity models are used as the basis for extracting backend entity features, thereby ensuring that the backend entity features can accurately characterize the entity attributes and corresponding relationships of the backend entity models, thereby improving the accuracy of extracting backend entity features.
[0097] Furthermore, by obtaining a modeling template that matches the modeling requirement information in the front-end modeling instruction, and generating front-end modeling data based on the modeling template; performing front-end modeling according to the modeling template based on the front-end modeling data and the front-end interface information to obtain front-end modeling information, it is ensured that the template used in the front-end modeling matches the modeling requirement information, thereby ensuring the accuracy of the front-end modeling.
[0098] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0099] Based on the same inventive concept, the embodiment of the present application also provides a front-end modeling device for implementing the front-end modeling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more front-end modeling device embodiments provided below can refer to the limitations on the front-end modeling method above, and will not be repeated here.
[0100] In an exemplary embodiment, Figure 5 As shown, a front-end modeling device 500 is provided, comprising: an acquisition module 502, a screening module 504, a generation module 506 and a modeling module 508, wherein:
[0101] An acquisition module 502, for acquiring backend entity information in response to a frontend modeling instruction, and extracting backend entity features from the backend entity information;
[0102] A screening module 504 is used to screen interactive entity features from backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend;
[0103] A generating module 506, used to generate front-end interface information according to the interactive entity characteristics;
[0104] The modeling module 508 is used to perform front-end modeling according to the modeling requirement information and the front-end interface information in the front-end modeling instruction to obtain the front-end modeling information.
[0105] In one embodiment, the acquisition module 502 is also used to identify entity attributes of multiple entity models from the backend entity information; generate corresponding relationships between the entity attributes of the multiple entity models based on the entity attributes of the multiple entity models; and extract backend entity features from the entity attributes of the multiple entity models and the corresponding relationships between the entity attributes of the multiple entity models.
[0106] In one embodiment, entity attributes include field description attributes, field query attributes, and field path attributes; the acquisition module 502 is also used to extract field description features from the field description attributes of multiple entity models, extract field query features from the field query attributes of multiple entity models, and extract field path features from the field path attributes of multiple entity models; according to the labels of the corresponding relationships between the entity attributes of multiple entity models, the field description features, field query features, and field path features are spliced to obtain the backend entity features.
[0107] In one of the embodiments, the generating module 506 is further used to identify the interaction type of the interaction entity characteristics to obtain the interaction type information; and generate the front-end interface information according to the interaction type information and the interaction entity characteristics.
[0108] In one of the embodiments, the modeling module 508 is also used to obtain a modeling template that matches the modeling requirement information in the front-end modeling instruction, and generate front-end modeling data based on the modeling template; perform front-end modeling according to the modeling template based on the front-end modeling data and the front-end interface information to obtain front-end modeling information.
[0109] In one of the embodiments, the modeling module 508 is also used to obtain the matching degree between the modeling requirement information in the front-end modeling instruction and multiple preset modeling templates; if there is a first modeling template with a corresponding matching degree greater than a preset matching degree threshold among the multiple preset modeling templates, the first modeling template is determined as the modeling template that matches the modeling requirement information in the front-end modeling instruction; if there is a target modeling template with a corresponding matching degree greater than the preset matching degree threshold among the multiple preset modeling templates, a second modeling template with the largest corresponding matching degree is selected from the multiple preset modeling templates, and the second modeling template is adjusted according to the modeling requirement information to obtain a modeling template that matches the modeling requirement information in the front-end modeling instruction.
[0110] In one of the embodiments, front-end modeling is performed according to a modeling template based on front-end modeling data and front-end interface information, and before the front-end modeling information is obtained, the device also includes: an optimization module, which is used to perform anomaly detection on the front-end modeling data to obtain anomaly detection results; based on the anomaly detection results, the front-end modeling data is optimized, wherein the optimization process includes at least one of sensitive information optimization and code optimization.
[0111] Each module in the above-mentioned front-end modeling device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0112] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a front-end modeling method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0113] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0115] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0116] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0119] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A front-end modeling method, It is characterized in that The method comprises: In response to the front-end modeling instruction, acquiring back-end entity information, and extracting back-end entity features from the back-end entity information; Filtering interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend; Generate front-end interface information according to the interactive entity characteristics; According to the modeling requirement information in the front-end modeling instruction and the front-end interface information, front-end modeling is performed to obtain front-end modeling information.
2. The method according to claim 1, It is characterized in that The extracting backend entity features from the backend entity information includes: identifying entity attributes of a plurality of entity models from the backend entity information; Generating corresponding relationships between the entity attributes of the multiple entity models according to the entity attributes of the multiple entity models; Backend entity features are extracted from entity attributes of the plurality of entity models and corresponding relationships between the entity attributes of the plurality of entity models.
3. The method according to claim 2, It is characterized in that The entity attributes include a field description attribute, a field query attribute, and a field path attribute; extracting backend entity features from the entity attributes of the multiple entity models and the corresponding relationships between the entity attributes of the multiple entity models includes: Extracting field description features from field description attributes of the plurality of entity models, extracting field query features from field query attributes of the plurality of entity models, and extracting field path features from field path attributes of the plurality of entity models; According to the labels of the corresponding relationships between the entity attributes of the multiple entity models, the field description feature, the field query feature and the field path feature are spliced to obtain the backend entity feature.
4. The method according to claim 1, It is characterized in that The generating of the front-end interface information according to the interactive entity characteristics includes: Performing interaction type identification on the interaction entity features to obtain interaction type information; Generate front-end interface information according to the interaction type information and the interaction entity characteristics.
5. The method according to claim 1, It is characterized in that The performing front-end modeling according to the modeling requirement information in the front-end modeling instruction and the front-end interface information to obtain the front-end modeling information includes: Acquire a modeling template that matches the modeling requirement information in the front-end modeling instruction, and generate front-end modeling data according to the modeling template; According to the front-end modeling data and the front-end interface information, front-end modeling is performed according to the modeling template to obtain front-end modeling information.
6. The method according to claim 5, It is characterized in that The acquiring of a modeling template that matches the modeling requirement information in the front-end modeling instruction includes: Obtaining the matching degree between the modeling requirement information in the front-end modeling instruction and a plurality of preset modeling templates; If there is a first modeling template whose corresponding matching degree is greater than a preset matching degree threshold among the plurality of preset modeling templates, determining the first modeling template as a modeling template that matches the modeling requirement information in the front-end modeling instruction; If there is no target modeling template with a corresponding matching degree greater than a preset matching degree threshold among the multiple preset modeling templates, a second modeling template with the largest corresponding matching degree is selected from the multiple preset modeling templates, and the second modeling template is adjusted according to the modeling requirement information to obtain a modeling template that matches the modeling requirement information in the front-end modeling instruction.
7. The method according to claim 5, It is characterized in that Before performing front-end modeling according to the modeling template based on the front-end modeling data and the front-end interface information to obtain the front-end modeling information, the method further includes: Performing anomaly detection on the front-end modeling data to obtain anomaly detection results; The front-end modeling data is optimized according to the anomaly detection result, wherein the optimization process includes at least one of sensitive information optimization and code optimization.
8. A front-end modeling device, It is characterized in that The device comprises: An acquisition module, used for acquiring backend entity information in response to a frontend modeling instruction, and extracting backend entity features from the backend entity information; A screening module, used to screen interactive entity features from the backend entity features, wherein the interactive entity features are used to characterize the interactive relationship between the frontend and the backend; A generating module, used for generating front-end interface information according to the interactive entity characteristics; The modeling module is used to perform front-end modeling according to the modeling requirement information in the front-end modeling instruction and the front-end interface information to obtain front-end modeling information.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
