Dynamic page generation method and device, equipment, medium and program product
By obtaining template files that define the presentation and data mapping rules of user interface elements, the target user interface is dynamically constructed and data persistence operations are performed. This solves the problems of repetitive labor and insufficient support for complex business rules in traditional web applications, and realizes the automation integration of front-end and back-end and improves development efficiency.
Patent Information
- Application Number
- CN202511718852.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-10
AI Technical Summary
In traditional web applications, developers need to write front-end page rendering logic and back-end data processing code separately, resulting in repetitive work. Furthermore, existing low-code platforms are unable to support complex and ever-changing business rules and dynamic interaction requirements, and cannot achieve automated integration of the entire front-end and back-end chain.
By obtaining template files, defining the rendering rules and data mapping rules for user interface elements, dynamically constructing the target user interface, responding to user input operations, converting them into structured data change requests, performing data persistence operations, and using a visual configuration interface to receive configuration information and generate template files.
It achieves end-to-end automation from dynamic front-end interface construction to back-end data persistence operations, reducing development threshold and maintenance complexity, ensuring data operation security and consistency, and improving development efficiency.
Smart Images

Figure CN121501280A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, to the application of computers in financial technology scenarios, and more specifically to a dynamic page generation method, apparatus, device, medium, and program product. Background Technology
[0002] In traditional web applications, developers need to write separate front-end page rendering logic and back-end data processing code for each business function, resulting in a large amount of repetitive work. While common low-code platforms or code generation tools can reduce coding workload to some extent, they lack flexibility, struggle to support complex and ever-changing business rules and dynamic interaction requirements, and typically cannot achieve fully automated integration of the front-end and back-end. Summary of the Invention
[0003] In view of the above problems, this disclosure provides a method, apparatus, device, medium and program product for generating dynamic pages.
[0004] According to a first aspect of this disclosure, a dynamic page generation method is provided, comprising: obtaining a template file, the template file defining presentation rules for user interface elements and mapping rules between user interface elements and data; dynamically constructing a target user interface according to the presentation rules for user interface elements in the template file; responding to a user input operation received through the target user interface, converting the user input operation into a corresponding structured data change request based on the mapping rules defined in the template file; and performing a data persistence operation corresponding to the user input operation according to the structured data change request.
[0005] According to an embodiment of this disclosure, dynamically constructing a target user interface based on the presentation rules of user interface elements in the template file includes: parsing the template file to obtain the structure, attributes, and layout information of the user interface elements; dynamically creating corresponding document object model elements based on the structure, attributes, and layout information; and rendering the document object model elements to the user terminal to generate the target user interface.
[0006] According to an embodiment of this disclosure, before dynamically constructing the target user interface based on the template file, the method further includes: receiving a data identifier; querying and obtaining existing business data from a preset database based on the data identifier; and dynamically constructing the target user interface includes: filling the business data into corresponding document object model elements for display.
[0007] According to embodiments of this disclosure, converting the user input operation into a corresponding structured data change request based on the mapping rules defined in the template file includes: identifying the database table and fields associated with the data corresponding to the user input operation according to the mapping rules defined in the template file; classifying the data corresponding to the user input operation by field and assembling it into a structured data object that matches the database table structure; and generating a corresponding structured data change request based on the structured data object.
[0008] According to an embodiment of this disclosure, the step of performing a data persistence operation corresponding to the user input operation based on the structured data change request includes: concatenating a parameterized structured query language statement according to the structured data change request and the mapping rule; and executing the structured query language statement to realize the data persistence operation corresponding to the user input operation.
[0009] According to an embodiment of this disclosure, obtaining a template file includes: receiving configuration information input by a user through a visual configuration interface, the configuration information including user interface element definitions, layout attributes, mapping rules, and business logic rules; converting the configuration information into a template file; wherein the user interface element definitions include at least one of the following attributes: element identifier, element type, element name, layout coordinates, width, height, whether required, whether hidden, whether read-only, data validation rules, and default value.
[0010] According to embodiments of this disclosure, the mapping rules include: associating the user interface elements with table fields of a preset database; and / or defining custom fields, which are used for user interface display and do not participate in the data persistence operation.
[0011] A second aspect of this disclosure provides a dynamic page generation apparatus, the apparatus comprising: an acquisition module for acquiring a template file, the template file defining presentation rules for user interface elements and mapping rules between user interface elements and data; a construction module for dynamically constructing a target user interface based on the template file; a conversion module for converting a user input operation received through the target user interface into a corresponding structured data change request based on the mapping rules defined in the template file; and an execution module for performing a data persistence operation corresponding to the user input operation based on the structured data change request.
[0012] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0013] A fourth aspect of this disclosure also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0014] The fifth aspect of this disclosure also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description
[0015] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0016] Figure 1 The illustrations depict application scenarios of the dynamic page generation method, apparatus, device, medium, and program product according to embodiments of the present disclosure.
[0017] Figure 2 A flowchart illustrating a dynamic page generation method according to an embodiment of the present disclosure is shown schematically.
[0018] Figure 3 A schematic diagram illustrating the structure of a dynamic page generation apparatus according to an embodiment of the present disclosure; and
[0019] Figure 4 A block diagram schematically illustrates an electronic device suitable for implementing a dynamic page generation method according to an embodiment of the present disclosure. Detailed Implementation
[0020] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0022] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0023] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0024] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user cross-border remittance information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.
[0025] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.
[0026] Figure 1 The diagram illustrates an application scenario of the dynamic page generation method according to an embodiment of the present disclosure.
[0027] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0028] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0029] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0030] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0031] It should be noted that the dynamic page generation method provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the dynamic page generation device provided in this disclosure embodiment can generally be located in server 105. The dynamic page generation method provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the dynamic page generation device provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0032] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0033] Figure 2 A flowchart illustrating a dynamic page generation method according to an embodiment of the present disclosure is shown schematically.
[0034] like Figure 2 As shown, the dynamic page generation method of this embodiment includes operations S210 to S230.
[0035] In operation S210, a template file is obtained.
[0036] According to embodiments of this disclosure, the template file can be a machine-readable configuration file. The template file defines the rendering rules for user interface elements and the mapping rules between user interface elements and data. The template file does not store the final page, but rather stores the instructions and rules for generating the page. The template file uniformly defines two aspects of rules: first, the rendering rules, i.e., the appearance and behavior of the front-end user interface; and second, the mapping rules between the front-end interface and back-end data.
[0037] The basic information of a template can include a template identifier, template name, operation table name, and query table name (which can be a view).
[0038] According to embodiments of this disclosure, user interface elements are the basic visual and interactive units that constitute a user interface. In a template file, user interface elements are defined abstractly and instantiated at runtime. Each user interface element has its own attribute definition in the template file, which collectively determines how it is displayed and interacted with on the final page.
[0039] According to embodiments of this disclosure, "data" can refer to the target end in a mapping rule, not a specific data value, but rather a field or concept in the backend data model. For example, a template file might define "a certain input box corresponds to the username field in the database user table." Here, the "username" field is an abstract representation of "data." This defines the data destination behind user interface elements. Correspondingly, the mapping rule can be which field in which table of the database the user interface element corresponds to.
[0040] When operating S220, the target user interface is dynamically constructed according to the presentation rules of the user interface elements in the template file.
[0041] According to embodiments of this disclosure, rendering rules are a set of rules in a template file used to control how user interface elements are displayed and laid out. Rendering rules can be a set of user interface specifications, specifically including: the element's position on the page (e.g., coordinates, row, column), size (width, height), visual type (input box, dropdown list), display state (whether hidden, whether read-only), and style, etc. When rendering the page, these rules are strictly followed to dynamically construct the user interface.
[0042] According to embodiments of this disclosure, a target user interface refers to a specific web page interface that is dynamically generated at runtime according to the rendering rules of a template file and ultimately presented to the user. The target user interface is the final product of instantiated user interface elements assembled according to rendering rules; it is an object that the user can directly view and interact with.
[0043] In operation S230, in response to user input received through the target user interface, the user input is converted into a corresponding structured data change request based on the mapping rules defined in the template file.
[0044] According to embodiments of this disclosure, user input operations refer to interactive behaviors performed by an end user on a target user interface, such as typing text in an input box, selecting a drop-down option, checking a checkbox, and finally clicking action buttons such as "Submit" or "Save". These operations generate specific data values that need to be processed and saved by the system.
[0045] According to embodiments of this disclosure, a structured data change request is a standardized data object that matches the database table structure, formed by identifying, classifying, and assembling the user's scattered and unstructured input data according to mapping rules. This request is the direct input for subsequently generating specific database operation commands. A dynamic rendering control component can be used to identify, classify, and assemble the user's scattered and unstructured input data.
[0046] In operation S240, based on the structured data change request, the data persistence operation corresponding to the user input operation is executed.
[0047] According to embodiments of this disclosure, data persistence operations refer to the operation of permanently saving data to a non-volatile storage medium. The most common forms are CRUD operations on a database. The specific execution method of the data persistence operation is determined by the underlying data operation engine, with the ultimate goal of ensuring that the data is permanently stored.
[0048] According to the embodiments of this disclosure, by introducing a template file that uniformly defines the rules for interface presentation and data mapping, the entire chain of automation from dynamic construction of the front-end interface to persistent data operation in the back-end is realized. This can eliminate the tedious work of repeatedly writing front-end and back-end code for each business module in web development. The configuration method significantly reduces the development threshold and maintenance complexity, while ensuring the security and consistency of data operations, thereby achieving a qualitative improvement in overall development efficiency.
[0049] In some embodiments of this disclosure, a template file can be parsed to obtain the structure, attributes, and layout information of user interface elements; corresponding document object model elements can be dynamically created based on the structure, attributes, and layout information; and the document object model elements can be rendered to the user terminal to generate the target user interface.
[0050] Structural information describes the hierarchical relationships and organization of user interface elements, such as which elements belong to the same form, which elements should be grouped, and the parent-child relationships between elements. Structural information defines the skeleton of the page.
[0051] Attribute information defines the specific parameters and characteristics of each user interface element, such as: a unique identifier for an input field, the default displayed text, the maximum input length, and whether it is required. Attribute information determines the behavior and state of an element.
[0052] Layout information precisely defines the geometric position and space occupied by each element on the final user interface. Examples include the element's X and Y coordinates, the number of rows and columns it occupies in a grid layout, and its width and height. Layout information controls the final visual effect of the page.
[0053] The Document Object Model (DOM) elements can be seen as a tree-like representation of a document after the browser parses it using Hypertext Markup Language. A DOM element is a node in this tree, corresponding to a specific component of the webpage, such as a... <input> Or one <button>Label.
[0054] According to embodiments of this disclosure, dynamically creating corresponding DOM elements can refer to generating these standard Hypertext Markup Language element objects in memory in real time and programmatically using a scripting language, rather than directly loading pre-written Hypertext Markup Language files, thereby achieving dynamic construction.
[0055] According to embodiments of this disclosure, a user terminal can refer to a device used by an end user that is capable of displaying a user interface and receiving user input operations. A user terminal can be a web browser on a personal computer, a browser on a mobile device (phone, tablet), or a hybrid application or desktop application with a built-in web page rendering engine.
[0056] According to the embodiments of this disclosure, by revealing the specific technical implementation path of automated interface construction based on templates, the absolute accuracy and high efficiency of the interface construction process are ensured by replacing manually written Hypertext Markup Language code with programmatic generation of DOM elements.
[0057] In some embodiments of this disclosure, a data identifier may be received before dynamically constructing the target user interface based on a template file; existing business data may be retrieved from a preset database based on the data identifier. Accordingly, dynamically constructing the target user interface may include populating the business data into corresponding document object model elements for display.
[0058] A data identifier is a credential used to uniquely identify a specific business data record. It is typically a unique value corresponding to the primary key of a database table. Data identifiers can be received at the beginning of a process and serve as an index and query condition for subsequent data query operations. They are used to precisely locate the existing data record that the user intends to view or edit.
[0059] The pre-built database can be a relational or non-relational database system that has been deployed and stores a large amount of business data. Existing business data refers to historical data records that have been persistently stored in the pre-built database. This is in contrast to the new data entered by the user; it refers to data that has already been created and saved in the past. In data display or editing scenarios, this data needs to be retrieved from the database and displayed on a dynamically generated interface for the user to view or modify. For example, after a user clicks "Edit User," the form should display the user's existing information.
[0060] In some embodiments, before populating the business data into the corresponding document object model element for display, the business data obtained from the query can be assembled into a structured data object according to the mapping rules defined in the template file; accordingly, the population operation can be performed based on the structured data object.
[0061] According to the embodiments of this disclosure, based on the automated construction of a blank interface, the accurate display and loading function of existing business data is further realized, so that the same template can not only be used for new data scenarios, but also automatically adapt to data editing and viewing scenarios. Users only need to trigger one operation to automatically complete the entire process from database query to interface filling, which can eliminate the repetitive work of manually writing data query and assignment code in the editing page, and greatly improve the development efficiency and user experience of complex business applications.
[0062] In some embodiments of this disclosure, the database tables and fields associated with the data corresponding to the user input operation can be identified according to the mapping rules defined in the template file; the data corresponding to the user input operation can be categorized by field and assembled into a structured data object that matches the database table structure; and a corresponding structured data change request can be generated based on the structured data object.
[0063] The process of identifying the database table and field associated with the data corresponding to the user input operation can be achieved by searching the template file for the mapped database table name and field name based on the element identifier of the user interface element corresponding to the user input operation. When the user completes the input and submits it on the front-end interface, what is received is a raw, unstructured data set. By consulting the predefined mapping rules in the template file, that is, which user interface element corresponds to which table and which field in the database, it is possible to identify which database table and which specific field in that table the data entered by the user in a certain input box should correspond to.
[0064] After clarifying the destination of each data point, the scattered data is then organized into a structured form. Following the record structure of the database tables, the data is categorized and assembled. The final result is a well-structured and cohesive data object. In a specific implementation, this could be a JSON object or a similar collection of key-value pairs.
[0065] In some embodiments, after assembling into a structured data object and before generating a structured data change request, the data in the structured data object can be validated based on the validation rules predefined for the fields in the template file; if the validation fails, the process is terminated and an error message is returned; if the validation passes, the subsequent steps of generating the request are executed.
[0066] In some embodiments, a data change request may include the data itself, as well as the type of operation to be performed and the target table name.
[0067] According to the embodiments of this application, the large model can efficiently identify frequently used words, phrases and sentence structures in cross-border messages from external organizations, ensuring the accuracy of capturing key information, generating response content that is highly relevant to business elements and conforms to the communication habits of external organizations, and ultimately forming a special query and reply method for the external organization and the query intent, ensuring the integrity and effectiveness of information communication, improving the efficiency of manual processing, and alleviating the workload and risks of manual data entry.
[0068] In some embodiments of this disclosure, parameterized structured query language statements can be concatenated according to structured data change requests and mapping rules; the structured query language statements can be executed to realize data persistence operations corresponding to user input operations.
[0069] Specifically, based on the structured data change request and mapping rules, concatenating parameterized structured query language statements may include determining the corresponding Structured Query Language (SQL) statement type based on the operation type contained in the structured data change request (operation types include adding, deleting, modifying, or querying); determining the database table name and field name corresponding to the data in the structured data change request based on the mapping rules defined in the template file; and concatenating the parameterized SQL statement based on the table name, field name, and data value.
[0070] In some implementations, a database engine can be invoked, and parameterized structured query language statements and corresponding data values can be passed in as parameters, with the database engine performing the final data persistence operation.
[0071] According to the embodiments of this application, by automatically generating parameterized query statements, the risk of SQL injection vulnerabilities can be reduced. At the same time, based on template mapping rules, it can be ensured that each user input data can be accurately persisted to the corresponding field in the database, which can eliminate the manual development and security maintenance costs of the backend data operation layer.
[0072] In some embodiments of this disclosure, configuration information input by the user can be received through a visual configuration interface, and the configuration information can be converted into a template file. By providing a visual interface, the traditional code-writing development model is transformed into an intuitive graphical configuration operation.
[0073] The configuration information includes user interface element definitions, layout attributes, mapping rules, and business logic rules.
[0074] The user interface element definition includes at least one of the following attributes: element identifier, element type, element name, layout coordinates, width, height, whether it is required, whether it is hidden, whether it is read-only, data validation rules, and default value.
[0075] In one specific implementation, user interface elements may include information such as element positioning, element size, element type, element default value, and bound events. The user interface element list information includes: element identifier, element name (the name displayed in front of input boxes, etc.), field type (can be a table field or a custom field; custom fields are only displayed on the interface and not stored in the database), element type (input box, dropdown list, etc.), default value (how to display and store the value if the field is empty), row coordinates, column coordinates, number of rows spanned, number of columns spanned, row width, column width (default values are used if these attributes are not specifically specified), whether it is required (can be used with conditional expressions), whether it is hidden (can be used with conditional expressions), whether it is read-only (can be used with conditional expressions), maximum length, and format validation (can be used with regular expressions).
[0076] In some embodiments, when a template file is saved, JSON can be generated and stored on a server or in a database, managed by a template configuration center, and the aforementioned information can be persisted in the database.
[0077] In some embodiments of this disclosure, the mapping rules may include associating user interface elements with table fields in a pre-defined database. For example, when a user enters a value in an input box and submits it, the value can be automatically inserted or updated into the corresponding field in the database using parameterized SQL, based on this mapping rule. This automates basic data CRUD (Create, Read, Update, Delete) functions.
[0078] In some embodiments of this disclosure, the mapping rules may include defining custom fields. These custom fields are used only for user interface display and do not participate in data persistence operations. This decouples the page display logic from the database storage structure. Developers can design complex pages without having to create corresponding fields in the database for each displayed item, greatly improving development flexibility and efficiency.
[0079] Based on the above-described dynamic page generation method, this application also provides a dynamic page generation apparatus. The following will be combined with... Figure 3 The device is described in detail.
[0080] Figure 3 A schematic block diagram of a dynamic page generation apparatus according to an embodiment of the present disclosure is shown.
[0081] like Figure 3 As shown, the dynamic page generation device of this embodiment includes an acquisition module 310, a construction module 320, a conversion module 330, and an execution module 340.
[0082] The acquisition module 310 is used to acquire a template file, which defines the rendering rules of user interface elements and the mapping rules between user interface elements and data. In one embodiment, the acquisition module 310 can be used to perform the operation S210 described above, which will not be repeated here.
[0083] The construction module 320 is used to dynamically construct the target user interface based on the template file. In one embodiment, the construction module 320 can be used to perform the operation S220 described above, which will not be repeated here.
[0084] The conversion module 330 is used to respond to user input operations received through the target user interface and convert the user input operations into corresponding structured data change requests based on the mapping rules defined in the template file. In one embodiment, the large language model 330 can be used to perform the operation S230 described above, which will not be repeated here.
[0085] The execution module 340 is used to perform data persistence operations corresponding to user input operations based on structured data change requests. In one embodiment, the execution module 340 can be used to perform the operation S240 described above, which will not be repeated here.
[0086] According to embodiments of this disclosure, dynamically constructing a target user interface based on the presentation rules of user interface elements in a template file includes: parsing the template file to obtain the structure, attributes, and layout information of the user interface elements; dynamically creating corresponding document object model elements based on the structure, attributes, and layout information; and rendering the document object model elements to the user terminal to generate the target user interface.
[0087] According to embodiments of this disclosure, the apparatus further includes: a receiving module for receiving a data identifier; an obtaining module for querying and obtaining existing business data from a preset database based on the data identifier; and dynamically constructing a target user interface by filling the business data into corresponding document object model elements for display.
[0088] According to embodiments of this disclosure, converting user input operations into corresponding structured data change requests based on mapping rules defined in a template file includes: identifying the database table and fields associated with the data corresponding to the user input operation according to the mapping rules defined in the template file; classifying the data corresponding to the user input operation by field and assembling it into a structured data object that matches the database table structure; and generating a corresponding structured data change request based on the structured data object.
[0089] According to embodiments of this disclosure, performing a data persistence operation corresponding to a user input operation based on a structured data change request includes: concatenating a parameterized structured query language statement according to the structured data change request and mapping rules; and executing the structured query language statement to realize the data persistence operation corresponding to the user input operation.
[0090] According to an embodiment of this disclosure, obtaining a template file includes: receiving configuration information input by a user through a visual configuration interface, the configuration information including user interface element definitions, layout attributes, mapping rules, and business logic rules; converting the configuration information into a template file; wherein, the user interface element definitions include at least one of the following attributes: element identifier, element type, element name, layout coordinates, width, height, whether required, whether hidden, whether read-only, data validation rules, and default value.
[0091] According to embodiments of this disclosure, the mapping rules include: associating user interface elements with table fields of a pre-configured database; and / or defining custom fields, which are used for user interface display and do not participate in data persistence operations.
[0092] According to embodiments of this disclosure, any plurality of modules among the acquisition module 310, construction module 320, conversion module 330, and execution module 340 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the acquisition module 310, construction module 320, conversion module 330, and execution module 340 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these. Alternatively, at least one of the acquisition module 310, construction module 320, conversion module 330, and execution module 340 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0093] Figure 4 A block diagram schematically illustrates an electronic device suitable for implementing a dynamic page generation method according to an embodiment of the present disclosure.
[0094] like Figure 4 As shown, an electronic device according to an embodiment of this disclosure includes a processor 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage portion 408 into a random access memory (RAM) 403. The processor 401 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 401 may also include onboard memory for caching purposes. The processor 401 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0095] RAM 403 stores various programs and data required for the operation of electronic device 400. Processor 401, ROM 402, and RAM 403 are interconnected via bus 404. Processor 401 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 402 and / or RAM 403. It should be noted that programs may also be stored in one or more memories other than ROM 402 and RAM 403. Processor 401 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0096] According to embodiments of this disclosure, the electronic device may further include an input / output (I / O) interface 405, which is also connected to a bus 404. The electronic device 400 may also include one or more of the following components connected to the input / output (I / O) interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the input / output (I / O) interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 410 as needed so that computer programs read from it can be installed into the storage section 408 as needed.
[0097] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0098] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 402 and / or RAM 403 and / or one or more memories other than ROM 402 and RAM 403 described above.
[0099] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the dynamic page generation method provided in the embodiments of this disclosure.
[0100] When the computer program is executed by the processor 401, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0101] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via communication section 409, and / or installed from removable medium 411. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0102] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by processor 401, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0103] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0105] Those skilled in the art will understand that the features described in the various embodiments of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.< / button>
Claims
1. A method for generating dynamic pages, characterized in that, include: Obtain a template file, which defines the rendering rules of user interface elements and the mapping rules between user interface elements and data; Construct the target user interface based on the rendering rules of the user interface elements in the template file; In response to a user input operation received through the target user interface, the user input operation is converted into a corresponding structured data change request based on the mapping rules defined in the template file; Based on the structured data change request, perform the data persistence operation corresponding to the user input operation.
2. The method according to claim 1, characterized in that, The step of dynamically constructing the target user interface according to the rendering rules of the user interface elements in the template file includes: The template file is parsed to obtain the structure, attributes, and layout information of the user interface elements; Based on the structure, attributes, and layout information, dynamically create the corresponding document object model elements; The document object model elements are rendered to the user terminal to generate the target user interface.
3. The method according to claim 2, characterized in that, Before dynamically constructing the target user interface based on the template file, the method further includes: Receive a data identifier; Based on the data identifier, retrieve existing business data from a pre-set database; The dynamically constructed target user interface includes: The business data is populated into the corresponding document object model elements for display.
4. The method according to claim 1, characterized in that, The process of converting the user input operation into a corresponding structured data change request based on the mapping rules defined in the template file includes: Based on the mapping rules defined in the template file, identify the database table and fields associated with the data corresponding to the user input operation; The data corresponding to the user input operations are categorized by field and assembled into structured data objects that match the database table structure. Based on the structured data object, a corresponding structured data change request is generated.
5. The method according to claim 1, characterized in that, The step of performing the data persistence operation corresponding to the user input operation based on the structured data change request includes: Based on the structured data change request and the mapping rules, a parameterized structured query language statement is constructed. The structured query language statement is executed to implement the data persistence operation corresponding to the user input operation.
6. The method according to claim 1, characterized in that, The process of obtaining a template file includes: The system receives configuration information input by the user through a visual configuration interface. The configuration information includes user interface element definitions, layout attributes, mapping rules, and business logic rules. Convert the configuration information into a template file; The user interface element definition includes at least one of the following attributes: Element identifier, element type, element name, layout coordinates, width, height, whether required, whether hidden, whether read-only, data validation rules, and default value.
7. The method according to claim 6, characterized in that, The mapping rules include: Associating and mapping the user interface elements with table fields in a pre-set database; and / or, Define a custom field, which is used for user interface display and does not participate in the data persistence operation.
8. A dynamic page generation device, characterized in that, The device includes: The acquisition module is used to acquire a template file, which defines the presentation rules of user interface elements and the mapping rules between user interface elements and data; A build module is used to dynamically build the target user interface based on the template file; A conversion module is used to respond to user input operations received through the target user interface and convert the user input operations into corresponding structured data change requests based on the mapping rules defined in the template file. The execution module is used to perform a data persistence operation corresponding to the user input operation based on the structured data change request.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.