Intelligent form page reconstruction method and device, electronic equipment and storage medium
Through the reconstruction method of intelligent form pages, the page is rendered dynamically using low-code design and meta-model rules, the efficiency and maintainability problems of enterprise business systems when expanding functions are solved, and rapid reconstruction and efficient development are achieved.
Patent Information
- Application Number
- CN202510549656.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-01
AI Technical Summary
When expanding functions, existing enterprise business systems have problems such as bloated system, low development efficiency, cumbersome operation and maintenance, and error-prone. When rebuilding the business platform, the development efficiency and poor timeliness are insufficient, and the user needs cannot be met in a timely manner.
By obtaining the form code data of the target smart form page, performing text analysis to build a front-end rendering metamodel, using low-code design and metamodel rules to dynamically render the page, realizing the rapid reconstruction of business forms, including building metamodel rule templates, rule parameter library and custom rule expansion, and combining HashMap objects and Redis database for data caching.
It realizes efficient reconstruction of the original form page, quickly responds to form access requests, improves development efficiency and system flexibility, reduces learning costs, and enhances the scalability and security of the system.
Smart Images

Figure CN120406929A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technologies, and more particularly, to a method and apparatus for reconstructing an intelligent form page, an electronic device, and a computer-readable storage medium. Background Art
[0002] In the development process of enterprise business systems, with the expansion of enterprise scale and the continuous change of business requirements, the original business systems often face problems such as function expansion, outdated frameworks, inconvenient user operations, and insufficient security performance.
[0003] In the related art, it is necessary to continuously patch on the basis of the original system for function expansion. However, this method will cause the system to become more and more bloated, with low development efficiency, cumbersome operation and maintenance, and easy to make mistakes. Another method is to rebuild a completely new business platform and gradually migrate and adapt the old business functions. However, this method has low development efficiency and poor timeliness, and cannot meet user needs in a timely manner.
[0004] Therefore, how to realize the rapid reconstruction of business forms on the basis of the original business system and improve the development efficiency of business systems is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of the present application is to provide a method and apparatus for reconstructing an intelligent form page, an electronic device, and a computer-readable storage medium, which realize the rapid reconstruction of business forms on the basis of the original business system and improve the development efficiency of business systems.
[0006] To achieve the above purpose, the present application provides a method for reconstructing an intelligent form page, including:
[0007] Obtain form code data of a target intelligent form page;
[0008] Perform text analysis on the form code data, obtain meta-model rules of the target intelligent form page, and construct a front-end rendering meta-model of the target intelligent form page;
[0009] In response to a form access request of the target intelligent form page, obtain rule key-value pair data corresponding to the front-end rendering meta-model;
[0010] Render a front-end display page corresponding to the target intelligent form page based on the rule key-value pair data.
[0011] Wherein, the performing text analysis on the form code data, obtaining meta-model rules of the target intelligent form page, and constructing a front-end rendering meta-model of the target intelligent form page includes:
[0012] Construct a meta-model rule template for the target intelligent form page; wherein, the meta-model rule template includes one or more of list rules, data rules, logic control rules, permission button rules, style rules, and general rules;
[0013] In the target code area, perform keyword indexing on the form code data to obtain rule parameter information related to the target intelligent form page, and construct a rule parameter library; wherein, the target code area includes one or more of a front-end coding area, a script coding area, a style sheet coding area, and a back-end coding area;
[0014] Based on the rule parameter library, match and fill in the relevant parameters of the meta-model rules in the meta-model rule template to construct the front-end rendering meta-model.
[0015] Wherein, after constructing the front-end rendering meta-model of the target intelligent form page based on the rule parameter library, the method further includes:
[0016] According to the custom functions of the target intelligent form page, obtain the custom rules of the custom functions;
[0017] Expand the front-end rendering meta-model according to the custom rules.
[0018] Wherein, after constructing the front-end rendering meta-model of the target intelligent form page, the method further includes:
[0019] Construct a meta-model local database in JSON data format according to the front-end rendering meta-model;
[0020] Convert the meta-model local database into a HashMap object to construct a meta-model Redis database.
[0021] Wherein, the obtaining of the rule key-value pair data corresponding to the front-end rendering meta-model in response to the form access request of the target intelligent form page includes:
[0022] According to the form access request, determine whether the HashMap object of the front-end rendering meta-model is included in the meta-model Redis database;
[0023] If so, use the HashMap object of the front-end rendering meta-model as the rule key-value pair data.
[0024] Wherein, after determining whether the HashMap object of the front-end rendering meta-model is included in the meta-model Redis database, the method further includes:
[0025] If not, based on the form access request, match and obtain the front-end rendering meta-model in JSON data format from the meta-model local database;
[0026] Convert the front-end rendering meta-model in JSON data format into a HashMap object to obtain the rule key-value pair data.
[0027] Among them, the rendering to obtain the front-end display page corresponding to the target intelligent form page based on the rule key-value pair data includes:
[0028] Parse the rule key-value pair data into a JavaScript object to obtain the rule mapping object of the front-end display page;
[0029] Render the front-end display page according to the rule mapping object.
[0030] To achieve the above object, the present application provides a reconstruction device for an intelligent form page, including:
[0031] A first acquisition module, configured to acquire form code data of a target intelligent form page;
[0032] A first construction module, configured to perform text analysis on the form code data to obtain the meta-model rules of the target intelligent form page, and construct the front-end rendering meta-model of the target intelligent form page;
[0033] A second acquisition module, configured to acquire the rule key-value pair data corresponding to the front-end rendering meta-model in response to a form access request of the target intelligent form page;
[0034] A rendering module, configured to render the front-end display page corresponding to the target intelligent form page based on the rule key-value pair data.
[0035] To achieve the above object, the present application provides an electronic device, including:
[0036] A memory, configured to store a computer program;
[0037] A processor, configured to implement the steps of the reconstruction method of the intelligent form page as described above when executing the computer program.
[0038] To achieve the above object, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the reconstruction method of the intelligent form page as described above are implemented.
[0039] The method for reconstructing an intelligent form page provided by this application realizes the efficient reconstruction of the original form page by obtaining the form code data of the target intelligent form page and performing text analysis on it to construct a front-end rendering meta-model. This method can quickly respond to form access requests, dynamically render the front-end display page through rule key-value pair data, without recompiling and publishing, significantly improving the development efficiency and system flexibility. At the same time, this method is compatible with the previous development mode, and developers do not need to learn a new development framework additionally, reducing the learning cost. In addition, through low-code design and dynamic expansion of the meta-model, it can flexibly respond to changes in business requirements, enhancing the scalability and security of the system. It can be seen that based on the original business system, this application realizes the rapid reconstruction of business forms and improves the development efficiency of the business system. This application also discloses a device for reconstructing an intelligent form page, an electronic device, and a computer-readable storage medium, which can also achieve the above technical effects.
[0040] It should be understood that the above general description and the following detailed description are only exemplary and do not limit this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. The drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification, and are used together with the following specific implementation manners to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:
[0042] Figure 1 FIG. 12 is an architecture diagram of a system for reconstructing an intelligent form page shown according to an exemplary embodiment;
[0043] Figure 2 FIG. 16 is a flowchart of a method for reconstructing an intelligent form page shown according to an exemplary embodiment;
[0044] Figure 3 FIG. 20 is a flowchart of another method for reconstructing an intelligent form page shown according to an exemplary embodiment;
[0045] Figure 4 FIG. 24 is a complete timing flowchart of a form page request shown according to an exemplary embodiment;
[0046] Figure 5 FIG. 28 is a structural diagram of a device for reconstructing an intelligent form page shown according to an exemplary embodiment;
[0047] Figure 6 The structure diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners
[0048] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part rather than all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without making creative efforts shall fall within the protection scope of the present application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.
[0049] To understand the method for reconstructing the intelligent form page provided in the present application, the system to which it is applied will be introduced first. As Figure 1 shown, the system for reconstructing the intelligent form page includes a rendering engine, a low-code running engine, a meta-model design unit, a meta-model storage unit, and a meta-model cache unit.
[0050] The rendering engine is used to convert the data model into a user interface. The rendering engine can be a rendering engine adopting EasyUI front-end technology. EasyUI front-end technology refers to a set of UI (User Interface) plug-in aggregates based on jQuery (a fast and concise JavaScript framework). The purpose of EasyUI is to help developers design a rich and beautiful UI interface more easily. Developers do not need to write complex JavaScript (a lightweight, interpreted or just-in-time compiled programming language), nor do they need to have in-depth understanding of CSS (Cascading Style Sheets). They only need to understand some simple syntax identifiers to implement the form page. When the client requests the form screen, the rendering engine will parse the configuration attributes, rule definitions, binding relationships, interaction behaviors and other parameters according to the cached form model of the request. These parameters guide the rendering engine to convert the JSON (JavaScript Object Notation) lightweight data exchange format into a runnable syntax environment of the original form page front-end code, and finally render the required form screen in the user's browser.
[0051] The low-code running engine is responsible for processing the behavior requests of the form page, including but not limited to adding, deleting, modifying, and querying data, batch data operations, historical modification record queries, form approvals, data transmission, and determination of business logics, etc. The low-code running engine enables developers to quickly implement business logics by reducing the need for handwritten code, while improving development efficiency and reducing error rates.
[0052] The meta-model design unit is used to define form rendering rules, which determine the interactive experiences such as the layout, style, input / output, formatting, buttons, pop-ups, and reminders of the form page. The rule definition can include list rule definition, data rule definition, logic control rule definition, permission button rule definition, style rule definition, general rule definition, customization rule definition, etc.
[0053] The meta-model storage unit is used to persistently store the form definition models designed by the meta-model design unit in the local database. These models can be retrieved and applied from the database whenever needed, ensuring data persistence and accessibility.
[0054] The meta-model cache unit is used to manage form definition models using Redis (Remote Dictionary Server) cache technology. By caching model data in Redis, the data access speed can be increased, and the direct access to the local database can be reduced, thereby improving the overall performance of the system.
[0055] Through the collaborative work of the above components, a method for reconstructing intelligent form pages is realized, which improves the internal structure of the business system without changing the business functions, and enhances the clarity, scalability, and reusability of the business system. By improving the code design, it becomes easier to maintain, extend, and reuse, while keeping the external behavior of the business system unchanged.
[0056] The embodiment of this application discloses a method for reconstructing intelligent form pages, which realizes the rapid reconstruction of business forms on the basis of the original business system and improves the development efficiency of the business system.
[0057] See Figure 2 , according to the flowchart of a method for reconstructing an intelligent form page shown in an exemplary embodiment, the method for reconstructing an intelligent form page includes:
[0058] S101: Obtain the form code data of the target intelligent form page;
[0059] Among them, the target intelligent form page refers to the original form page that needs to be reconstructed, and this form page can be a form page implemented using EasyUI front-end technology. The form code data refers to the source code of the form page, which can include front-end codes such as HTML (HyperText Markup Language), CSS, JavaScript, and back-end logic codes.
[0060] In this step, the meta-model design unit obtains the form code data of the target intelligent form page through an automated tool or script, and this code data will serve as the basis for subsequent analysis and reconstruction. In specific implementation, specify the path of the specific form code file, read the code file line by line, extract key information and save it to a temporary file for subsequent processing.
[0061] S102: Perform text analysis on the form code data, obtain the meta-model rules of the target intelligent form page, and construct the front-end rendering meta-model of the target intelligent form page;
[0062] Among them, the meta-model rules refer to the rule definitions that describe the form page structure, style, interaction logic, etc. The front-end rendering meta-model refers to the data model constructed based on the meta-model rules and used to guide front-end rendering.
[0063] In this step, the meta-model design unit performs text analysis on the obtained form code data, extracts key information such as the attributes of HTML elements, CSS style rules, JavaScript function calls, etc. Based on this information, the system generates meta-model rules that define the layout, style, interaction logic, etc. of the form page. Then, the meta-model design unit constructs the front-end rendering meta-model according to these rules, and this model will be used for subsequent page rendering.
[0064] As a feasible implementation method, performing text analysis on the form code data, obtaining the meta-model rules of the target intelligent form page, and constructing the front-end rendering meta-model of the target intelligent form page includes: constructing a meta-model rule template for the target intelligent form page; among them, the meta-model rule template includes one or more of list class rules, data class rules, logic control class rules, permission button class rules, style class rules, and general class rules; in the target code area, perform keyword indexing on the form code data to obtain rule parameter information related to the target intelligent form page, and construct a rule parameter library; among them, the target code area includes one or more of the front-end coding area, script coding area, style sheet coding area, and back-end coding area; based on the rule parameter library, match and fill in the relevant parameters of the meta-model rules in the meta-model rule template to construct the front-end rendering meta-model.
[0065] In specific implementation, firstly, a meta-model rule template containing multiple rule types is constructed. These rule types can include list rules, data rules, logic control rules, permission button rules, style rules, and general rules, etc. The definition of list rules is mainly responsible for restricting the data range and column elements during the form list query. It can automatically bind filtering conditions and permission rules according to the passed query parameters, thereby restricting the output of business data. When presenting the list on the client side, these rules will also bind attributes such as the name description, index sorting, formatting, style, identification, cell merging, hiding, and freezing of column elements according to the rendering rules of the front-end rendering engine. Each field defines basic attributes such as identification, name, read-only status, editability, mandatory nature, and formatting in detail. The definition of logic control rules involves the control logic of field events, such as the cascading interaction between multiple fields, the legality verification after data filling or selection, and the change of interaction behavior of related fields. These rules ensure the accuracy of data and the logic of form operations. The definition of permission button rules is used to control the permissions of operable buttons, including pre-event, post-event, and backend response mapping. Different user roles may have different permissions, so the buttons they can see or click will also be different. The definition of style rules focuses on the UI presentation methods such as the layout, font, icon, color, and background of form lists, form fields, and buttons, ensuring the consistency and professionalism of the user interface. The definition of general rules is used to unify some common settings, such as date display format, form unique key, list row number, deletion method, and refresh method, etc. Through the above rule definitions, the original form page is reconstructed into a brand-new meta-model, and this process does not require back-end code writing and recompilation and release, thus greatly improving the development efficiency and flexibility.
[0066] Next, within the target code area, namely the front-end coding area, script coding area, style sheet coding area, and back-end coding area, keyword indexing is performed on the form code data to obtain rule parameter information related to the target intelligent form page, and a rule parameter library is constructed. This rule parameter library contains all the necessary parameters for defining the behavior and appearance of the form. For example, for the front-end coding file, the file content is read line by line, and keywords such as "form", "datagrid", "easyui-textbox", "easyui-combobox", and "a" links are used to index component elements and their related code blocks. This process not only identifies the syntax structures such as index sorting, formatting, styling, identification, cell merging, hiding, and freezing of the form list defined in the "datagrid" component, but also extracts the configuration attributes such as the presentation style, read-only property, editability, and required field property of the form fields from components such as "form", "easyui-textbox", and "easyui-combobox". In addition, the number of buttons and the related function call guidelines are identified from the "a" links, and the intercepted code blocks and marking results are output to a temporary document. For JavaScript files, the same line-by-line reading method is adopted, with special attention paid to the code blocks starting with the "function" keyword, and the start and end parts defined by the adjacent "{}" symbols are extracted to quickly obtain the execution method body. During this process, the code lines containing the "$.ajax" keyword are also located to determine the URL link address and the parameters passed, and this information is synchronously saved to the temporary document. The processing of the CSS style sheet coding file focuses on indexing the selectors starting with "#" and ".", and the code blocks defined by the subsequent "{}". This allows the system to extract the UI styles such as the layout, font, icon, color, background, etc. of the form list, form fields, and buttons one by one, and save this information to the temporary document. The reading of the Java back-end coding file covers the source code files of the Controller layer, Service layer, and Dao layer, indexes the start and end parts of the code blocks defined by "{}", marks and extracts the relationship mapping of relevant function calls, and the SQL statements for performing data operations, and synchronously saves this information to the temporary document. It can be seen that through the automated parsing and extraction process, the key information in the original code can be efficiently integrated into the temporary document, providing basic data for subsequent form page reconstruction and meta-model construction.
[0067] Finally, based on the rule parameter library, relevant parameters of the meta-model rules in the meta-model rule template are matched and filled to construct a complete front-end rendering meta-model. This meta-model will be used to guide the reconstruction and rendering of the intelligent form page, making the entire reconstruction process faster and more accurate, while improving the maintainability and scalability of the code. In this way, information can be automatically extracted from the original code and applied to the new meta-model, thereby achieving efficient reconstruction of the form page.
[0068] As a preferred implementation, after constructing the front-end rendering meta-model, it further includes: obtaining the custom rules of the custom function according to the custom function of the target intelligent form page; expanding the front-end rendering meta-model according to the custom rules.
[0069] In specific implementation, after completing the construction of the basic meta-model rule template and the matching and filling of the rule parameter library, the meta-model design unit further identifies and integrates those custom functions designed to meet specific business requirements. Custom functions usually refer to those special requirements that go beyond the standard form functions, such as specific data verification logic, complex user interaction processes, or integration with third-party services. To implement these custom functions, developers may add specific rules or scripts to the original form code. Obtaining the corresponding custom rules of the custom function can be achieved by analyzing the specific comments, tags, or specific code structures added by the developers in the code. Furthermore, the front-end rendering meta-model is expanded according to the custom rules to ensure that the meta-model can comprehensively cover the requirements of all standard functions and custom functions.
[0070] In this way, the front-end rendering meta-model not only includes general form rules but also custom rules for specific business scenarios, so that the reconstructed form page can fully meet the business requirements of users. It can be seen that this implementation improves the flexibility and adaptability of the form page, enabling the form page to better serve various different business scenarios, while also maintaining the cleanliness and maintainability of the code.
[0071] S103: In response to the form access request of the target intelligent form page, obtain the rule key-value pair data corresponding to the front-end rendering meta-model;
[0072] Among them, the rule key-value pair data refers to the rules defined in the front-end rendering meta-model, stored in the form of key-value pairs, and used to guide page rendering.
[0073] In this step, when the user accesses the target intelligent form page through the browser, the rendering engine captures the access request. The low-code running engine obtains the rule key-value pair data related to the form page according to the front-end rendering meta-model, and this data will be used to dynamically generate the form page requested by the user. In a specific implementation, the low-code running engine retrieves the corresponding rule key-value pair data from the cache or database according to the identifier of the access request (such as URL parameters or form ID).
[0074] S104: Based on the rule key-value pair data, render and obtain the front-end display page corresponding to the target intelligent form page.
[0075] In this step, the rendering engine dynamically generates HTML, CSS, and JavaScript code according to the obtained rule key-value pair data, and renders the front-end display page of the target intelligent form page to ensure that the page seen by the user is consistent with the meta-model rule definition. In a specific implementation, the rendering engine parses the rule key-value pair data, generates the corresponding HTML structure and styles, and dynamically loads data and binds events through JavaScript, and finally presents them to the user.
[0076] The intelligent form page reconstruction method provided by the embodiments of the present application realizes the efficient reconstruction of the original form page by obtaining the form code data of the target intelligent form page and performing text analysis on it to construct a front-end rendering meta-model. This method can quickly respond to form access requests, dynamically render the front-end display page through rule key-value pair data, without recompiling and releasing, significantly improving the development efficiency and system flexibility. At the same time, this method can be compatible with the previous development mode, and developers do not need to learn new development frameworks additionally, reducing the learning cost. In addition, through low-code design and dynamic extension of the meta-model, it can flexibly respond to changes in business requirements, enhancing the scalability and security of the system. It can be seen that the embodiments of the present application realize the rapid reconstruction of business forms on the basis of the original business system, improving the development efficiency of the business system.
[0077] The embodiments of the present application disclose an intelligent form page reconstruction method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:
[0078] See Figure 3 , according to the flowchart of another intelligent form page reconstruction method shown in an exemplary embodiment, as Figure 3 shown, including:
[0079] S201: Obtain the form code data of the target intelligent form page;
[0080] S202: Perform text analysis on the form code data to obtain the meta-model rules of the target intelligent form page, and construct the front-end rendering meta-model of the target intelligent form page;
[0081] S203: Construct a local meta-model database in JSON data format based on the front-end rendering meta-model;
[0082] Among them, the JSON data format is a lightweight data exchange format, which is easy for humans to read and write, and is also easy for machines to parse and generate. The local meta-model database refers to the meta-model data stored locally, which is used to persistently save the meta-model rules.
[0083] In this step, the front-end rendering meta-model is converted into JSON format data and stored in the local database. This step realizes the persistent storage of the meta-model data, ensuring the long-term storage and accessibility of the data at any time. As the business requirements change, the meta-model may need to be continuously adjusted, and this dynamic storage process allows real-time reading and updating of these changes to adapt to the evolution of the form business function.
[0084] S204: Convert the local meta-model database into a HashMap object to construct a meta-model Redis database;
[0085] Among them, the HashMap object is a data structure based on a hash table, which is used to quickly access key-value pair data. The Redis database is a high-performance key-value storage database, which is often used for caching and fast data access.
[0086] In this step, the saved meta-model data is regularly read from the local database and converted into HashMap objects. After the conversion, these HashMap objects are cached in the Redis database. By using the Redis cache, the direct access to the local database can be significantly reduced, thereby reducing the database load and improving the data retrieval speed, ensuring that the system can respond quickly and provide stable performance even under high-concurrency client requests. In addition, since the data in the cache is pre-processed and ready, the meta-model data in Redis will not be frequently changed once it is loaded, which further ensures the speed and efficiency of data access.
[0087] S205: In response to the form access request of the target intelligent form page, according to the form access request, determine whether the HashMap object of the front-end rendering meta-model is included in the meta-model Redis database; if so, enter S206; if not, enter S207;
[0088] In this step, when the user initiates a form access request, the low-code runtime engine first checks whether the HashMap object of the corresponding front-end rendering meta-model has been cached in the Redis database. If it exists, the cached data is directly used; if not, it proceeds to S207.
[0089] S206: Use the HashMap object of the front-end rendering meta-model as the rule key-value pair data;
[0090] In this step, if the HashMap object of the front-end rendering meta-model exists in the Redis database, it is directly used as the rule key-value pair data and passed to the front-end rendering engine for subsequent page rendering.
[0091] S207: Based on the form access request, match and obtain the front-end rendering meta-model in JSON data format from the meta-model local database, convert the front-end rendering meta-model in JSON data format into a HashMap object, and obtain the rule key-value pair data;
[0092] In this step, if the HashMap object of the front-end rendering meta-model does not exist in the Redis database, the front-end rendering meta-model in JSON format is obtained from the local database, converted into a HashMap object, and then stored in the Redis cache for subsequent use. This step ensures that even if the cache fails, data can be restored from the local database and the service can continue.
[0093] Figure 4 Figure 16 shows a complete timing flowchart for a form page request. When the client browser initiates a request for a form page, the low-code runtime engine will first intercept this request. Then, the low-code runtime engine uses the meta-model identification code (code) obtained from the routing address to quickly search in the Redis cache for the HashMap object of the form meta-model that matches the request. If the corresponding HashMap object exists in the Redis cache, the low-code runtime engine will quickly return it to respond to the client's request. If the matching HashMap object cannot be found in the Redis cache, the low-code runtime engine will directly query the local database using the meta-model identification code. After finding the matching meta-model in JSON format in the database, the low-code runtime engine will convert it into a HashMap object. This conversion process involves recombining and assembling the data to ensure that the meta-model can be stored in the Redis cache in a format suitable for quick access. After the conversion is completed, the engine returns the HashMap object to the front-end browser for rendering the form page. Using the Redis cache reduces the number of database accesses, speeds up the response, and also ensures data consistency and accuracy.
[0094] S208: Parse the rule key-value pair data into a JavaScript object to obtain the rule mapping object for the front-end display page. Render the front-end display page according to the rule mapping object.
[0095] Among them, JavaScript object parsing refers to the process of converting key-value pair data into a JavaScript object. The rule mapping object refers to the parsed JavaScript object, which is used to guide the rendering of the front-end page.
[0096] In this step, the front-end rendering engine parses the HashMap object to generate a corresponding JavaScript object, which reflects the detailed design rules of the form meta-model, including list rules, data rules, logic control rules, permission button rules, style rules, general rules, and customization rules, etc.
[0097] The rendering engine renders the page according to the rule mapping object. First, render the query parameter list and function buttons according to the data rules and permission button rules. This process involves automatically generating components such as text boxes, drop-down menus, and date pickers, and asynchronously requesting the backend to populate the valid data options for these components. At the same time, the rendering engine will also display or hide the corresponding buttons according to the user's permissions to ensure the unity of the page UI style and compliance with the constraints of the system framework.
[0098] Next, the rendering engine renders the table header of the list according to the list rule definition, and processes the display style of single-row or multi-row table headers and merged cells. The rendering engine automatically calculates and arranges the positions and merging situations of each field in the table header by analyzing the rowspan and colspan attributes.
[0099] When the user interacts with the page, such as clicking a button, the rendering engine and the low-code runtime engine work together to handle the verification and control of business logic. For example, when adding or modifying form business, the system will perform logical verification under the constraints of data rules and logic control rules to ensure the legality of the data, and then save the result to the local database. For operations such as form deletion, data transmission, import / export, and electronic signature verification, the low-code runtime engine can accurately capture the relevant behavior parameters and perform correct data processing and determination according to the background execution process.
[0100] It can be seen that in this embodiment, the meta-model is converted into JSON format and stored in the local database. At the same time, the HashMap object and Redis database are used to implement efficient data caching. This caching mechanism significantly reduces the need for direct access to the local database, reduces the load on the database, and improves the speed of data retrieval, thus ensuring that the system can still respond quickly under high-concurrency requests. Further, by parsing the rule key-value pair data into JavaScript objects, the front-end rendering engine can generate the corresponding HTML structure and style according to these object mappings, realizing the dynamic rendering of the form page.
[0101] Next, an intelligent form page reconstruction device provided by an embodiment of the present application will be introduced. The intelligent form page reconstruction device described below can be referred to with the intelligent form page reconstruction method described above.
[0102] See Figure 5 , a structural diagram of an intelligent form page reconstruction device shown according to an exemplary embodiment, as Figure 5 shown, includes:
[0103] The first acquisition module 100 is used to acquire the form code data of the target intelligent form page;
[0104] The first construction module 200 is used to perform text analysis on the form code data, acquire the meta-model rules of the target intelligent form page, and construct the front-end rendering meta-model of the target intelligent form page;
[0105] The second acquisition module 300 is used to acquire the rule key-value pair data corresponding to the front-end rendering meta-model in response to the form access request of the target intelligent form page;
[0106] The rendering module 400 is used to render and obtain the front-end display page corresponding to the target intelligent form page based on the rule key-value pair data.
[0107] The intelligent form page reconstruction device provided by the embodiment of the present application obtains the form code data of the target intelligent form page and performs text analysis on it to construct a front-end rendering meta-model, realizing the efficient reconstruction of the original form page. This method can quickly respond to form access requests, dynamically render the front-end display page through rule key-value pair data, without recompiling and releasing, significantly improving the development efficiency and system flexibility. At the same time, this method can be compatible with the previous development mode, and developers do not need to learn a new development framework additionally, reducing the learning cost. In addition, through low-code design and dynamic expansion of the meta-model, it can flexibly respond to changes in business requirements, enhancing the scalability and security of the system. Thus, the embodiment of the present application realizes the rapid reconstruction of business forms on the basis of the original business system, improving the development efficiency of the business system.
[0108] Based on the above embodiment, as a preferred embodiment, the first construction module 200 includes:
[0109] The first construction unit is used to construct the meta-model rule template of the target intelligent form page; wherein, the meta-model rule template includes one or more of list class rules, data class rules, logic control class rules, permission button class rules, style class rules, and general class rules;
[0110] The second construction unit is used to perform keyword indexing on the form code data in the target code area, obtain the rule parameter information related to the target intelligent form page, and construct a rule parameter library; wherein, the target code area includes one or more of the front-end coding area, script coding area, style sheet coding area, and back-end coding area;
[0111] The third construction unit is used to match and fill the relevant parameters of the meta-model rules in the meta-model rule template based on the rule parameter library, and construct the front-end rendering meta-model.
[0112] Based on the above embodiment, as a preferred embodiment, the construction module 200 further includes:
[0113] The acquisition unit is used to obtain the custom rules of the custom function according to the custom function of the target intelligent form page;
[0114] The expansion unit is used to expand the front-end rendering meta-model according to the custom rules.
[0115] Based on the above embodiment, as a preferred embodiment, the device further includes:
[0116] The second construction module is used to construct a meta-model local database in JSON data format according to the front-end rendering meta-model;
[0117] A third construction module, configured to perform a HashMap object conversion on the meta-model local database to construct a meta-model Redis database.
[0118] Based on the above embodiments, as a preferred embodiment, the second acquisition module 300 includes:
[0119] A judgment module, configured to judge whether the HashMap object of the front-end rendering meta-model is included in the meta-model Redis database according to the form access request; if so, start the working process of the determination module; if not, start the working process of the matching module;
[0120] A determination module, configured to use the HashMap object of the front-end rendering meta-model as the rule key-value pair data;
[0121] A matching module, configured to match and obtain the front-end rendering meta-model in JSON data format from the meta-model local database based on the form access request; perform a HashMap object conversion on the front-end rendering meta-model in JSON data format to obtain the rule key-value pair data.
[0122] Based on the above embodiments, as a preferred embodiment, the rendering module 400 is specifically configured to: perform JavaScript object parsing on the rule key-value pair data to obtain a rule mapping object of the front-end display page; render the front-end display page according to the rule mapping object.
[0123] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0124] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of the present application, the embodiments of the present application further provide an electronic device, Figure 6 As shown in the structural diagram of an electronic device according to an exemplary embodiment, such as Figure 6 shown, the electronic device includes:
[0125] A communication interface 1, capable of performing information interaction with other devices such as network devices;
[0126] A processor 2, connected to the communication interface 1 to implement information interaction with other devices, and configured to execute the method for reconstructing an intelligent form page provided by one or more of the above technical solutions when running a computer program. And the computer program is stored on a memory 3.
[0127] Of course, in practical applications, the various components in the electronic device are coupled together through the bus system 4. It can be understood that the bus system 4 is used to implement the connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 6 all kinds of buses are labeled as the bus system 4.
[0128] The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of these data include: any computer program for operating on the electronic device.
[0129] It can be understood that the memory 3 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory), an electrically erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), a ferromagnetic random access memory (FRAM, ferromagnetic random access memory), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM, Compact Disc Read-Only Memory); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM, Random Access Memory), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as a static random access memory (SRAM, Static Random Access Memory), a synchronous static random access memory (SSRAM, Synchronous Static Random Access Memory), a dynamic random access memory (DRAM, Dynamic Random Access Memory), a synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), a double data rate synchronous dynamic random access memory (DDR SDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), an enhanced synchronous dynamic random access memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), a sync link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), a direct rambus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 3 described in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memories.
[0130] The method disclosed in the embodiments of the present application above can be applied to the processor 2 or implemented by the processor 2. The processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 2 or the instructions in the form of software. The above-mentioned processor 2 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 2 can implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. Combining the steps of the method disclosed in the embodiments of the present application, it can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in the storage medium, which is located in the memory 3. The processor 2 reads the program in the memory 3 and combines its hardware to complete the steps of the foregoing method.
[0131] When the processor 2 executes the program, it realizes the corresponding processes in each method of the embodiments of the present application. For the sake of brevity, it will not be elaborated here.
[0132] In an exemplary embodiment, the embodiments of the present application also provide a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 3 including a stored computer program. The above computer program can be executed by the processor 2 to complete the steps of the foregoing method. The computer-readable storage medium may be a FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, CD-ROM, or other memories.
[0133] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: mobile storage devices, ROM, RAM, magnetic disks, or optical discs, etc., which can store program codes.
[0134] Alternatively, if the above integrated units of the present application are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing an electronic device (which can be a personal computer, a server, a network device, etc.) to execute all or part of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes such as removable storage devices, ROM, RAM, magnetic disks, or optical discs.
[0135] As described above, the above are only specific implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application.
Claims
1. A method for reconstructing an intelligent form page, characterized in that, The method includes: Obtaining form code data of a target intelligent form page; Performing text analysis on the form code data to obtain a meta-model rule of the target intelligent form page, and constructing a front-end rendering meta-model of the target intelligent form page; In response to a form access request of the target intelligent form page, obtaining rule key-value pair data corresponding to the front-end rendering meta-model; Rendering a front-end display page corresponding to the target intelligent form page based on the rule key-value pair data.
2. The reconstruction method according to claim 1, wherein The performing text analysis on the form code data to obtain a meta-model rule of the target intelligent form page, and constructing a front-end rendering meta-model of the target intelligent form page includes: Constructing a meta-model rule template of the target intelligent form page; wherein, the meta-model rule template includes one or more of a list type rule, a data type rule, a logic control type rule, a permission button type rule, a style type rule, and a general type rule; In a target code area, performing keyword indexing on the form code data to obtain rule parameter information related to the target intelligent form page, and constructing a rule parameter library; wherein, the target code area includes one or more of a front-end coding area, a script coding area, a style sheet coding area, and a back-end coding area; Based on the rule parameter library, matching and filling relevant parameters of the meta-model rule in the meta-model rule template to construct the front-end rendering meta-model.
3. The reconstruction method according to claim 2, characterized in that, After the constructing the front-end rendering meta-model of the target intelligent form page based on the rule parameter library, the method further includes: Obtaining a custom rule of the custom function according to the custom function of the target intelligent form page; Expanding the front-end rendering meta-model according to the custom rule.
4. The reconstruction method according to claim 1, characterized in that After the constructing the front-end rendering meta-model of the target intelligent form page, the method further includes: Constructing a meta-model local database in JSON data format according to the front-end rendering meta-model; Performing a HashMap object conversion on the meta-model local database to construct a meta-model Redis database.
5. The reconstruction method according to claim 4, wherein The in response to a form access request of the target intelligent form page, obtaining rule key-value pair data corresponding to the front-end rendering meta-model includes: Judging whether a HashMap object of the front-end rendering meta-model is included in the meta-model Redis database according to the form access request; If so, using the HashMap object of the front-end rendering meta-model as the rule key-value pair data.
6. The reconstruction method according to claim 5, characterized in that, After the judging whether a HashMap object of the front-end rendering meta-model is included in the meta-model Redis database, the method further includes: If not, matching and obtaining the front-end rendering meta-model in JSON data format from the meta-model local database based on the form access request; Performing a HashMap object conversion on the front-end rendering meta-model in JSON data format to obtain the rule key-value pair data.
7. The reconstruction method according to claim 1, characterized in that Rendering to obtain the front-end display page corresponding to the target intelligent form page based on the rule key-value pair data includes: Performing JavaScript object parsing on the rule key-value pair data to obtain the rule mapping object of the front-end display page; Rendering to obtain the front-end display page according to the rule mapping object.
8. A reconstruction device for an intelligent form page, characterized in that, The device includes: A first acquisition module, configured to acquire form code data of a target intelligent form page; A first construction module, configured to perform text analysis on the form code data to obtain the meta-model rule of the target intelligent form page, and construct the front-end rendering meta-model of the target intelligent form page; A second acquisition module, configured to acquire the rule key-value pair data corresponding to the front-end rendering meta-model in response to a form access request of the target intelligent form page; A rendering module, configured to render to obtain the front-end display page corresponding to the target intelligent form page based on the rule key-value pair data.
9. An electronic device, characterized in that, Including: A memory, configured to store a computer program; A processor, configured to implement the steps of the reconstruction method of the intelligent form page according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed, the steps of the reconstruction method of the intelligent form page according to any one of claims 1 to 7 are implemented.