Form processing method and device, computer equipment and storage medium
By filtering and building table cell models in the application management page, generating form interfaces and saving data, the problem of repetitive development in traditional form development is solved, and the reusability and flexibility of form development are improved.
Patent Information
- Application Number
- CN202511918052.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-20
AI Technical Summary
In traditional form development, the same business functions cannot be directly reused across different form entities, leading to redundant development, increased costs, and low construction efficiency, making it difficult to quickly respond to changes in business requirements.
By displaying a preset application management page, the system receives business components selected by the user, builds a table unit model based on the component library, and generates a form interface through component integration configuration information. It supports the saving and processing of form instance data, thereby realizing the autonomy and reuse of components.
It improves the reusability and flexibility of form development, reduces the workload of component development, increases the efficiency and flexibility of form construction, and reduces the workload of format configuration.
Smart Images

Figure CN121704834A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to form processing methods, apparatus, computer equipment and storage media. Background Technology
[0002] In the process of building enterprise information systems, forms, as a key carrier of core business operations, directly affect the smooth operation of enterprise business processes and the overall level of informatization through the efficiency and quality of their development and construction. Traditional form development mainly relies on developers to customize each specific form entity by writing code.
[0003] However, this traditional development model has significant drawbacks. In actual business scenarios, different form entities often share many identical business functionalities. For example, multiple business forms may require operations such as inputting, validating, and displaying customer information. However, in the traditional model, these identical business functions cannot be directly reused across different form entities. Every time a new form is developed, even if it contains the same functionalities as existing forms, developers still need to rewrite the code to implement these functions. This not only leads to a significant waste of human resources and increases development costs but also makes the form construction process inflexible. Because each form needs to be developed from scratch, it is difficult to quickly respond to changes in business requirements and to adjust the form structure and functionality in a timely manner, resulting in low form construction efficiency and an inability to meet the rapidly evolving business needs of enterprises.
[0004] Therefore, how to improve the reusability, flexibility, and efficiency of form development has become a key issue that urgently needs to be addressed in the construction of current enterprise information systems. Summary of the Invention
[0005] The purpose of this application is to provide a form processing method, apparatus, computer device, and storage medium to solve the technical problems of low flexibility and low construction efficiency in existing form processing methods.
[0006] Firstly, a form processing method is provided, including: When a form processing request triggered by a user is received, a preset application management page is displayed; wherein, the form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library; Receive business components selected by the user from the component library within the application management page; Extract the form entity requirements from the form processing request, and construct a corresponding table unit model based on the form entity requirements and the business component; Based on the preset component integration configuration information, the table unit model is rendered to generate the corresponding form interface. Generate corresponding form instance data based on the business data entered by the user in the form interface; Determine whether a form save event has been received; If so, the form instance data is saved.
[0007] Secondly, a form processing apparatus is provided, comprising: The display module is used to display a preset application management page when a form processing request triggered by a user is received; wherein the form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library; The filtering module is used to receive business components filtered by the user from the component library within the application management page; The construction module is used to extract the form entity requirements from the form processing request and construct a corresponding table unit model based on the form entity requirements and the business components. The first generation module is used to perform page rendering on the table unit model based on preset component integration configuration information to generate the corresponding form interface. The second generation module is used to generate corresponding form instance data based on the business data entered by the user in the form interface; The first judgment module is used to determine whether a form save action event has been received; The save module is used to save the form instance data if the condition is met.
[0008] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described form processing method.
[0009] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described form processing method.
[0010] In the above-described form processing method, apparatus, computer equipment, and storage medium, when a form processing request triggered by a user is received, a preset application management page is displayed. The form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library. Then, the business components selected by the user from the component library within the application management page are received. Next, the form entity requirements are extracted from the form processing request, and a corresponding table unit model is constructed based on the form entity requirements and the business components. Subsequently, based on preset component integration configuration information, the table unit model is rendered to generate a corresponding form interface. And based on the business data input by the user in the form interface, corresponding form instance data is generated. Further, it is determined whether a triggered form save action event has been received; if so, the form instance data is saved. Based on the above automated processing flow, this application, upon receiving a form processing request triggered by a user and carrying form entity requirements, displays a preset application management page and receives the business components selected by the user from the component library within the application management page. Then, based on the form entity requirements and the business components, a corresponding table unit model is constructed. Subsequently, based on preset component integration configuration information, the table unit model is rendered to generate a form interface, and form instance data is generated based on the business data entered by the user in the form interface. Finally, upon receiving a triggered form save action event, the form instance data is saved. In this way, this application pre-encapsulates business functions as autonomous components, decoupling them from the main form model. The same business components can be reused by any form entity, eliminating redundant development and reducing component development workload. Furthermore, by adopting a user-selected component-based assembly method to replace complex coding and multiple rule configurations, the workload of form format configuration is reduced, effectively improving form construction efficiency and flexibility. Attached Figure Description
[0011] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is an exemplary system architecture diagram to which this application can be applied; Figure 2 This is a flowchart of one embodiment of the form processing method according to this application; Figure 3 This is a schematic diagram of the structure of one embodiment of the form processing apparatus according to this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0014] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0015] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0016] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102, and server 103. Terminal device 101 may be a laptop 1011, tablet 1012, or mobile phone 1013. Network 102 is used as a medium to provide a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0017] Users can use terminal device 101 to interact with server 103 via network 102 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0018] Terminal device 101 can be various electronic devices with a display screen and support web browsing. In addition to laptops 1011, tablets 1012, or mobile phones 1013, terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, and a desktop computer, etc.
[0019] Server 103 can be a server that provides various services, such as a backend server that provides support for the pages displayed on terminal device 101.
[0020] It should be noted that the form processing method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the form processing device is generally set in the server / terminal device.
[0021] 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.
[0022] Continue to refer to Figure 2 The flowchart illustrates an embodiment of the form processing method according to this application. Depending on different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. The form processing method provided by this application embodiment can be applied to any scenario requiring form processing, and therefore can be applied to products in these scenarios. The form processing method includes the following steps: Step S201: When a form processing request triggered by a user is received, a preset application management page is displayed; wherein, the form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library.
[0023] In this embodiment, the form processing method runs on an electronic device (e.g., Figure 1The server / terminal device shown can receive form processing requests via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future known wireless connection methods. The executing entity of this application is specifically a form processing system, which can be simply referred to as the system. The aforementioned form processing request is a form construction request triggered by the user based on actual form processing needs. The aforementioned application management page is a page pre-built in the system containing a preset component library. The aforementioned form processing request carries the form entity requirements input by the user according to actual needs, such as "the sales contract needs to record the amount, date, and customer information."
[0024] In addition, the system provides business component development capabilities, which encapsulate independent business functions into reusable autonomous components, ensuring data and logic cohesion. The specific implementation process includes: 1. Business data model definition. Input: Business requirements document (e.g., "Customer management needs to store basic information and transaction records"). Processing: Designing the component-specific data table structure (e.g., the customer table includes fields: customer ID, name, contact information, address). Defining field attributes (e.g., "Contact information" must be in mobile phone number format). Output: Data model document or metadata description in JSON format.
[0025] 2. Business Logic Rule Writing. Input: Business rules (e.g., "Customer name cannot be empty", "Order amount must be greater than 0"). Processing: Convert the rules into executable logic (e.g., "Validate required fields before saving"). Define calculation logic (e.g., "Total order price = unit price × quantity"). Output: Logic rule document or configurable rule description.
[0026] 3. External Interface Design. Input: Component functional requirements (e.g., "Need to save customer data", "Need to query customer list"). Processing: Design standardized interfaces (e.g., save customer (customer data), query customer (conditions)). Define the interface's input parameters and return values (e.g., return customer ID upon successful saving). Output: Interface definition document or interface configuration file.
[0027] Components are black boxes for business functions, internally encapsulating data, logic, and interfaces, and externally called through these interfaces, ensuring independence and reusability. For example, the "customer component" only needs to expose and store the customer() interface, without needing to know whether the caller is a contract form or an order form.
[0028] Step S202: Receive the business components selected by the user from the component library within the application management page.
[0029] In this embodiment, users can access the edit configuration on the application management page, click on the desired reference components to select the business components to be imported (optional front-end, back-end, front-end and back-end components, etc., custom components), and then click OK. Alternatively, users can select the desired business components (such as "customer components" or "order components") from the component library through search or category filtering.
[0030] Step S203: Extract the form entity requirements from the form processing request, and construct a corresponding table unit model based on the form entity requirements and the business components.
[0031] In this embodiment, the required form entity requirements can be extracted from the form processing request by parsing the information. Furthermore, the specific implementation process of constructing the corresponding table unit model based on the form entity requirements and the business components will be described in further detail in subsequent embodiments of this application, and will not be elaborated upon here.
[0032] Step S204: Based on the preset component integration configuration information, perform page rendering on the table unit model to generate the corresponding form interface.
[0033] In this embodiment, the specific implementation process of rendering the table unit model to generate the corresponding form interface based on the preset component integration configuration information will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0034] Step S205: Generate corresponding form instance data based on the business data entered by the user in the form interface.
[0035] In this embodiment, the specific implementation process of generating corresponding form instance data based on the business data entered by the user in the form interface will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0036] Step S206: Determine whether a form save action event has been received.
[0037] In this embodiment, the user can click the "Save" button at the bottom of the form, and the system will capture the click event (i.e., the form save action event) and start the save process.
[0038] Step S207: If yes, save the form instance data.
[0039] In this embodiment, the specific implementation process of saving the form instance data described above will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0040] When this application receives a form processing request triggered by a user, it displays a preset application management page. The form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library. Then, it receives the business components selected by the user from the component library within the application management page. Next, it extracts the form entity requirements from the form processing request and constructs a corresponding table unit model based on the form entity requirements and the business components. Subsequently, based on preset component integration configuration information, it renders the table unit model to generate a corresponding form interface. It also generates corresponding form instance data based on the business data input by the user in the form interface. Furthermore, it determines whether a triggered form save action event has been received; if so, it saves the form instance data. Based on the above automated processing flow, this application, upon receiving a form processing request triggered by a user and carrying form entity requirements, displays a preset application management page and receives the business components selected by the user from the component library within the application management page. Then, based on the form entity requirements and the business components, a corresponding table unit model is constructed. Subsequently, based on preset component integration configuration information, the table unit model is rendered to generate a form interface, and form instance data is generated based on the business data entered by the user in the form interface. Finally, upon receiving a triggered form save action event, the form instance data is saved. In this way, this application pre-encapsulates business functions as autonomous components, decoupling them from the main form model. The same business components can be reused by any form entity, eliminating redundant development and reducing component development workload. Furthermore, by adopting a user-selected component-based assembly method to replace complex coding and multiple rule configurations, the workload of form format configuration is reduced, effectively improving form construction efficiency and flexibility.
[0041] In some alternative implementations, step S203 includes the following steps: Based on the form entity requirements, construct the corresponding form entity metamodel.
[0042] In this embodiment, the meta-model is defined as: an abstract description of the data structure, including metadata such as field names, types, validation rules, and relationships (i.e., a "data template"). Its relationship to fields is: the meta-model is a collection of fields plus logical rules between fields (such as relationships).
[0043] The process of constructing the form entity metamodel may include: receiving user-inputted form entity requirements (such as "sales contracts need to record amount, date, and customer information"), and breaking down these requirements into data fields and rules: Fields: Contract ID, Amount, Signing Date, Customer ID (foreign key), etc. Rules: Amount must be positive, date cannot be later than the current time, Contract ID must be unique, etc. Then, the main entity metamodel is defined in the system through a visual interface or configuration file, including: Field type: selecting basic types such as string, number, and date. Validation rules: setting required fields, minimum value, maximum value, regular expressions, etc. Relationships: marking foreign key fields (such as customer ID being associated with the customer component).
[0044] Based on the received user-triggered model selection action for the business component, the component metamodel to be assembled is selected from the business components.
[0045] In this embodiment, users can use the "Reference Definition" function to select the component metamodel to be installed from the imported business components (e.g., selecting "Customer Information Model" under "Customer Component"). Specifically, by clicking "Import Definition," a pop-up window lists all the models of the components imported on the application management page. Users can select the component metamodel to be installed according to their actual business needs and confirm. This component metamodel can also be called a referenced component metamodel, which is equivalent to the referenced component's fields plus the component's own validation / association rules. Additionally, users can click the "View" button in the component model list's operation column to open the component model project viewing page, displaying the model project information.
[0046] The form entity metamodel and the component metamodel are merged based on preset merging rules to obtain the corresponding merged data.
[0047] In this embodiment, the specific implementation process of merging the form entity meta-model and the component meta-model based on the preset merging rules to obtain the corresponding merged data will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0048] The merged data is used as the table cell model.
[0049] In this embodiment, the merged table cell model will serve as the final definition of the form data structure.
[0050] This application constructs a corresponding form entity metamodel based on the form entity requirements; then, based on the received user-triggered model selection action for the business component, it filters out the component metamodels to be assembled from the business components; subsequently, it merges the form entity metamodel and the component metamodel based on preset merging rules to obtain corresponding merged data; and finally, it uses the merged data as the table unit model. Based on the above processing flow, this application constructs a corresponding form entity metamodel based on the use of form entity requirements, filters out the component metamodels to be assembled from the business components based on the received user-triggered model selection action for the business component, merges the form entity metamodel and the component metamodel based on merging rules, and uses the generated merged data as the corresponding table unit model, thereby improving the construction efficiency and intelligence of the table unit model.
[0051] In some optional implementations of this embodiment, the process of merging the form entity metamodel and the referenced component metamodel based on preset merging rules to obtain the corresponding merged data includes the following steps: The form entity metamodel and the component metamodel are merged to obtain the corresponding first processed data.
[0052] In this embodiment, the form entity metamodel and component metamodel can be merged into a complete metamodel to obtain the corresponding first processing data.
[0053] The first processed data is deduplicated to obtain the corresponding second processed data.
[0054] In this embodiment, the deduplication process for the above fields includes: if the form entity and the referenced entity have fields with the same name (such as "name"), the process is handled according to business rules: retain the main entity field and discard the referenced field (default strategy). Alternatively, they can be merged into an array (such as in a multi-level category scenario).
[0055] The second processed data is subjected to association establishment processing to obtain the corresponding third processed data.
[0056] In this embodiment, the above-mentioned relationship establishment process includes: automatically generating foreign key fields (such as "Customer ID" in the form being associated with "Customer ID" in the customer table). If the component metamodel has already defined a relationship (such as the order component being associated with the customer component), the relationship is directly inherited.
[0057] The third processed data is sorted by field to obtain the corresponding fourth processed data.
[0058] In this embodiment, the above-mentioned field sorting process refers to sorting the fields according to business logic, such as contract field first, customer field in the middle, and order field last.
[0059] The fourth processed data is used as the merged data.
[0060] This application merges the form entity metamodel and the component metamodel to obtain corresponding first processed data; then, it performs field deduplication on the first processed data to obtain corresponding second processed data; subsequently, it performs association establishment on the second processed data to obtain corresponding third processed data; next, it performs field sorting on the third processed data to obtain corresponding fourth processed data; finally, it uses the fourth processed data as the merged data. Based on the above processing flow, this application first merges the form entity metamodel and the component metamodel to obtain first processed data, then performs field deduplication, association establishment, and field sorting on the first processed data, and finally uses the obtained fourth processed data as the corresponding merged data. This allows for efficient and accurate merging of the form entity metamodel and the component metamodel, ensuring the accuracy and standardization of the obtained merged data.
[0061] In some alternative implementations, step S204 includes the following steps: The table cell model is parsed to identify the corresponding field mapping information.
[0062] In this embodiment, the table cell model is parsed to read the field type of each field, such as text, number, date, and foreign key. Then, the default UI controls are matched according to the field type: text → single-line input box; number → number input box (with stepper); date → date picker; foreign key → dropdown selection box or related query button. The mapping relationship between fields and UI controls is then output, i.e., field mapping information (e.g., "Contract Amount" → number input box).
[0063] Retrieve preset component integration configuration information.
[0064] In this embodiment, the aforementioned component integration configuration information is used to specify the display method, layout position, and interactive behavior of fields in the interface. Specifically, the component integration configuration information may include: when a form entity references a component model, the component model can be displayed as detailed data in the form interface's format wizard; it can also be used by binding the referenced component to a scene page via form function buttons; and it can also bind the component's action buttons to the form entity format for use. Specifically, when a component model is referenced by a form as a reference entity, the component model can be selected and displayed as an optional detailed data option during form interface settings; form buttons can be bound to component scenes for use in the form format; and form buttons can be bound to component actions for use in the form format.
[0065] A corresponding visual structure is constructed based on the component integration configuration information and the field mapping information.
[0066] In this embodiment, the display position and interaction method of each field in the table unit model are determined based on the component integration configuration information and the field-control mapping relationship: Main table area: directly embedded in the main form layout. Sub-table tabs: generate collapsible tab areas with embedded related components. Pop-ups: generate buttons that pop up form filling components when clicked. Example: "Customer Name" is configured as a sub-table tab → a "Customer Information" tab is generated below the main form, with a customer component embedded inside. "Order Details" is configured as a pop-up → an "Add Order" button is added to the main form, which pops up an order filling pop-up when clicked. The output is a UI structure with layout information, i.e., a visual structure (e.g., the main table area contains 2 input boxes, and there is 1 tab and 1 button at the bottom).
[0067] The visualization structure is rendered to generate a corresponding visualization form interface.
[0068] In this embodiment, the rendering process includes the following steps: 1) Layout rendering: Arrange UI controls according to the configured layout rules (such as grid system, flow layout). Main table area: Arrange input boxes from top to bottom according to field order. Sub-table tabs: Generate tab containers and load component interfaces inside. Pop-ups: Generate static buttons and bind pop-up open events. 2) Component initialization: Components in sub-table tabs (such as customer components) load their own metamodels and configurations and recursively generate sub-forms. Pop-up components are hidden during initialization and dynamically loaded into the pop-up container after clicking the button. 3) Data binding: Two-way bind the input values of fields and UI controls (such as automatically updating the form data object when the value of the "Contract Amount" input box changes).
[0069] Specifically, the visualization structure is rendered to generate a complete visualization form interface (including main table, sub-table tabs, and pop-up buttons), which serves as the corresponding form interface.
[0070] The visual form interface is used as the form interface.
[0071] In this embodiment, the final generated form interface is a WYSIWYG form, including: Main table area: Directly fill in fields such as contract amount and date. Sub-table tab: Click the "Customer Information" tab to fill in the customer's name and contact information (possibly through another mini-form). Pop-up button: Clicking "Add Order" will pop up an order details filling window. No manual coding is required: All layouts and controls are automatically generated by the table cell model and component integration configuration; developers only need to adjust the configuration (such as moving fields from the main table to the sub-table tab).
[0072] This application parses the table unit model to identify corresponding field mapping information; then obtains preset component integration configuration information; then constructs a corresponding visual structure based on the component integration configuration information and the field mapping information; subsequently, it renders the visual structure to generate a corresponding visual form interface; and finally, it uses the visual form interface as the form interface. Based on the above processing flow, this application automatically and intelligently generates complex form interfaces with zero code by parsing the table unit model to identify field mapping information, constructing a corresponding visual structure based on the obtained component integration configuration information and field mapping information, rendering the visual structure, and using the generated visual form interface as the corresponding form interface. Users can directly fill in data without needing to pay attention to the underlying implementation, thus improving the efficiency and intelligence of form interface generation.
[0073] In some alternative implementations, step S205 includes the following steps: Receive business data entered by the user in the form interface.
[0074] In this embodiment, user-inputted business data can be collected using a generated form interface, including main entity data and component data filled in different areas. Specifically, users can fill in main entity data (such as contract amount) in the main table area of the form interface, and fill in component data (such as customer name) in the sub-table tab or pop-up window within the form interface. The form interface will then collect complete data (contract amount + customer name + order details).
[0075] The form interface also allows for the following user operations and data processing: (1) Components can be used as the main table items of the form, and their model data can be selected. (2) Components can be used as reference entities of the form, and their data can be displayed as sub-table tabs. (3) Form buttons can be bound to component scenarios, and clicking them opens the component's interface, allowing for the maintenance of component information. (4) Form buttons can be bound to component actions, and clicking them executes the component's actions, including front-end and back-end actions.
[0076] Obtain the preset data verification strategy.
[0077] In this embodiment, the data validation strategy includes: Field-level validation: Real-time checks on the validity of input data based on validation rules (such as minimum value, maximum value, and regular expressions) in the table cell model. Example: When a negative number is entered for the order quantity, "Quantity must be greater than 0" is displayed below the input box. Cross-field validation: If the table cell model defines complex rules (such as the total contract amount must equal the sum of the order details), the system triggers validation when the user attempts to submit and prevents mismatched data from being saved. Component data integrity check: If a component field is marked as required (such as the product name in the order details), saving is prevented and the corresponding cell is highlighted when the user does not fill it in.
[0078] The business data is validated based on the data validation strategy.
[0079] In this embodiment, data verification of the aforementioned business data can be performed based on the strategy content of the data verification strategy described above, and corresponding data verification results can be generated. The data verification results include whether the business data passed data verification or failed data verification.
[0080] If the business data passes data validation, then corresponding form instance data is generated based on the business data.
[0081] In this embodiment, if the business data is detected to have passed data validation, corresponding form instance data will be generated based on the user-input business data. The user's act of filling in business data on the form interface is an operation on a form instance, and temporary data of the form instance (i.e., form instance data) is generated after the data is filled in. This data is stored in the front-end memory or browser cache. The temporary data needs to be saved subsequently to generate formal business records (such as contract records or customer records).
[0082] This application receives business data input by a user in a form interface; then obtains a preset data validation strategy; subsequently, it validates the business data based on the data validation strategy; if the business data passes the validation, it generates corresponding form instance data. Based on this process, when this application receives business data input by a user in a form interface, it automatically and intelligently validates the business data based on the data validation strategy, and only generates corresponding form instance data when the business data passes validation, thereby effectively ensuring the compliance and accuracy of the generated form instance data.
[0083] In some optional implementations of this embodiment, the form instance data includes main entity data and component data; step S207 includes the following steps: Call the preset form save method.
[0084] In this embodiment, the above-mentioned form saving method refers to a saving method applicable to forms, used to store form data into the corresponding form business table. For example, the main entity data can be stored into the form business table by calling form business logic (such as backend API or database operations).
[0085] Based on the form saving method, the main entity data is saved to a preset form business table.
[0086] In this embodiment, the main entity data can be stored in the corresponding form business table (such as the contract table) according to the called form saving method, and a corresponding main entity ID (such as contract ID: CON20240001) can be generated and returned to the front end. Then, the main entity data will be persisted to the database.
[0087] The preset data scheduling engine calls the component saving method corresponding to the business component.
[0088] In this embodiment, the aforementioned data scheduling engine is a pre-built automated engine with data scheduling capabilities. The data scheduling engine can be used to traverse all referenced components (business components) and sequentially call the save method (i.e., component save method) of each business component.
[0089] The component data is saved to the corresponding component business table based on the component saving method.
[0090] In this embodiment, the component data can be distributed and stored in the corresponding component business tables according to the invoked component saving method, and associated with the main entity. For example, if the business components include a customer component and an order component, the customer's name and phone number are stored in the customer table, generating a customer ID: CUS001. If the customer already exists, it is directly associated (to avoid redundancy). Order details are stored in the order table, with each detail associated with a contract ID and a product ID. Data consistency is ensured through foreign keys (such as associating with customer ID and contract ID).
[0091] The system also implements data consistency assurance, specifically through the following steps: Relationship key storage: The main table only stores the relationship keys of component entities (such as customer ID), avoiding duplicate storage of component fields (such as customer name). Snapshot mechanism: Optional configuration of component data snapshots (such as recording a snapshot of the customer name when saving) for historical queries, but the actual data is based on the component table. Cascading operations: Configuring cascading rules between components (such as automatically voiding associated orders when deleting a contract). In this way, data consistency is maintained through relationship keys rather than redundant fields, reducing storage overhead while supporting flexible queries.
[0092] This application achieves separate storage of main entity data and component data by invoking a preset form saving method; then, based on the form saving method, saving the main entity data to a preset form business table; subsequently, based on a preset data scheduling engine, invoking the component saving method corresponding to the business component; and finally, based on the component saving method, saving the component data to the corresponding component business table. Based on this processing flow, this application achieves separate storage of main entity data and component data by saving the main entity data to the form business table based on the invoked form saving method and saving the component data to the corresponding component business table based on the component saving method invoked through the data scheduling engine. This avoids excessively wide forms, thus preventing redundancy and improving the intelligence of form data storage.
[0093] In some optional implementations of this embodiment, before step S201, the electronic device may further perform the following steps: Determine whether a triggered component registration request has been received; wherein the component registration request carries component information of the specified component.
[0094] In this embodiment, the component registration request mentioned above can be triggered by the actual need of relevant users (such as developers) to include a specified developed component into a component library. The component content of the specified developed component may include: Metadata: Basic information of the component (name, version, author, description). Logical rules: Business logic of the component (e.g., a "customer component" needs to support customer data query and pagination display). Interface definition: Interaction rules between the component and external systems (e.g., parameter format for calling customer APIs). UI template: Visual representation of the component (e.g., layout style of input boxes and buttons). Dependency declaration: External libraries or services required for the component to run (e.g., importing a UI framework). The component format may include: a ZIP archive containing all the above files; or a combination of configuration files and code files.
[0095] Users can access the "Upload New Component" function through the system's component management module. This supports drag-and-drop upload of ZIP packages or directly selecting the directory containing configuration files and code files to trigger the corresponding component registration request. The component information mentioned above can refer to the component package (e.g., a ZIP archive) of the specified component.
[0096] If so, the component information is parsed to extract the corresponding component function tags.
[0097] In this embodiment, after receiving the component information of the specified component, the system extracts its internal files to a temporary directory. Then, it reads the component information from a metadata file (e.g., component.json) and extracts the following information: Basic information: component name (e.g., "Customer Component"), version number, icon path. Functional tags: developer-defined tags (e.g., "Customer Management," "Data Validation"). Input / output parameters: configuration items exposed by the component (e.g., "Whether to display the Add button"). Dependencies: checks for conflicts with existing platform dependencies (e.g., incompatible UI libraries). The system then selects the necessary functional tags to use as the component's functional tags.
[0098] A component index corresponding to the specified component is generated based on the component function tag.
[0099] In this embodiment, the process of generating the component index includes: Storage location: Saving component files (code, styles, resources) to the system's static resource library (such as a dedicated directory or object storage). Metadata and index information are stored in the platform's database (such as a component registry). Index creation: Categorizing components by functional tags (such as classifying the "Customer Management" component into the "Business Components" category). Supporting multi-level categorization (such as "Business Components" → "Customer Management" → "Data Display"). Generating a unique component ID for subsequent reference (such as customer-component-v1.0.0).
[0100] Based on the component index, the specified component is stored in the component library.
[0101] In this embodiment, a specified component can be validated, and after the validation is passed, the specified component is stored in a pre-created component library based on the generated component index. The specified component then appears in the platform's component library panel, supporting the following operations: Search: Quickly locate the component by name, tag, or category (e.g., searching for "customer" to find the "customer component"). Preview: View the component's UI effects and configuration parameters (e.g., the interface changes after checking "Show Add Button"). Reference: Drag and drop onto the canvas or insert directly into a form / page through the configuration panel. Furthermore, multiple versions of the same component can be retained, supporting rollback (e.g., switching between v1.0 and v2.0 of the "customer component"). Additionally, if the component depends on external libraries, the platform automatically handles dependency conflicts (e.g., prompting the user to upgrade the UI framework version).
[0102] The component validation process includes: Static checks: verifying whether the component interface conforms to platform specifications (e.g., it must include an onSubmit callback function). Checking whether the UI template is compatible with the platform's basic styles (e.g., color variables, grid system). Dynamic testing: rendering the component in a sandbox environment, simulating input data, and verifying whether the output meets expectations.
[0103] In addition, component registration is similar to "installing" a software module into the system, which can then be used directly by dragging and dropping or configuring, avoiding redundant development. For example, multiple forms (contracts, orders) can all reference the same "customer component".
[0104] Furthermore, through the component registration method in this embodiment, the functionality and behavior of components are entirely defined by metadata, and the system achieves automated management by parsing the metadata. Moreover, components are decoupled from the platform's core logic, interacting only through standard interfaces. Additionally, through tag categorization and search functions, it can be ensured that components can be reused in different scenarios (such as contract forms and order forms), achieving reusability assurance.
[0105] This application determines whether a triggered component registration request has been received; wherein the component registration request carries component information of a specified component; if so, the component information is parsed to extract the corresponding component function tags; then, a component index corresponding to the specified component is generated based on the component function tags; subsequently, the specified component is stored in the component library based on the component index. Based on the above processing flow, after receiving a triggered component registration request corresponding to a specified component, this application intelligently parses the component information of the specified component to extract the corresponding component function tags, and then generates a component index corresponding to the specified component based on the component function tags. Subsequently, the specified component is stored in the component library based on the use of the component index, thereby realizing standardized registration and reuse of components. This allows developers to avoid repeatedly developing the same functions and simply drag and drop or configure them from the component library to use them, improving the intelligence of component development and enhancing the user experience.
[0106] In some alternative implementations, the user information obtained is subject to user consent and complies with relevant laws and policies.
[0107] Furthermore, any software tools or components not belonging to our company that appear in the embodiments of this application are merely illustrative examples and do not represent actual use.
[0108] Furthermore, this application solves the problems of coupling, redundancy, and complex configuration in traditional models by splitting forms into highly cohesive, loosely coupled autonomous business components and using a unified assembly, data management, and event scheduling mechanism to achieve flexible, efficient, and high-performance form construction. Moreover, this application has the following significant advantages: 1. Thorough decoupling and high cohesion: Business functions are encapsulated as autonomous components, decoupled from the main form model, which greatly improves the maintainability and scalability of the system.
[0109] 2. High reusability and low cost: The same business components can be used immediately by any form entity, eliminating redundant development and reducing development workload by more than 50%.
[0110] 3. Eliminate redundancy and ensure consistency: By managing business data uniformly through components, the form sub-tables no longer redundantly store business data, but only store relation keys or snapshots, which solves the problems of data redundancy and inconsistency from the root.
[0111] 4. Simplified configuration and easy to use: By replacing complex coding and multiple rule configurations with "checkbox" assembly, the workload of form format configuration can be reduced by more than 60%.
[0112] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0114] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0115] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a form processing apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0116] like Figure 3 As shown, the form processing device 300 described in this embodiment includes: a display module 301, a filtering module 302, a construction module 303, a first generation module 304, a second generation module 305, a first judgment module 306, and a saving module 307. Wherein: The display module 301 is used to display a preset application management page when a form processing request triggered by a user is received; wherein the form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library; The filtering module 302 is used to receive business components filtered by the user from the component library in the application management page; The construction module 303 is used to extract the form entity requirements from the form processing request and construct a corresponding table unit model based on the form entity requirements and the business components. The first generation module 304 is used to perform page rendering on the table unit model based on preset component integration configuration information to generate a corresponding form interface. The second generation module 305 is used to generate corresponding form instance data based on the business data entered by the user in the form interface; The first judgment module 306 is used to determine whether a triggered form save action event has been received; The saving module 307 is used to save the form instance data if the condition is met.
[0117] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the form processing method in the aforementioned embodiments, and will not be repeated here.
[0118] In some optional implementations of this embodiment, the construction module 303 includes: The first construction submodule is used to construct the corresponding form entity metamodel based on the form entity requirements; The filtering submodule is used to filter out component metamodels to be assembled from the business components based on the received model selection action for the business components triggered by the user. The merging submodule is used to merge the form entity metamodel and the component metamodel based on preset merging rules to obtain the corresponding merged data; The first determining submodule is used to use the merged data as the table unit model.
[0119] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the form processing method in the aforementioned embodiments, and will not be repeated here.
[0120] In some optional implementations of this embodiment, the merged submodule includes: The merging unit is used to merge the form entity metamodel and the component metamodel to obtain the corresponding first processed data. The first processing unit is used to perform field deduplication on the first processed data to obtain the corresponding second processed data; The second processing unit is used to perform association relationship establishment processing on the second processed data to obtain the corresponding third processed data; The third processing unit is used to perform field sorting on the third processed data to obtain the corresponding fourth processed data; A determining unit is used to use the fourth processed data as the merged data.
[0121] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the form processing method in the aforementioned embodiments, and will not be repeated here.
[0122] In some optional implementations of this embodiment, the first generation module 304 includes: The parsing submodule is used to parse the table unit model in order to identify the corresponding field mapping information; The first acquisition submodule is used to acquire preset component integration configuration information; The second construction submodule is used to construct a corresponding visual structure based on the component integration configuration information and the field mapping information; The first generation submodule is used to render the visualization structure and generate the corresponding visualization form interface; The second determining submodule is used to use the visual form interface as the form interface.
[0123] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the form processing method in the aforementioned embodiments, and will not be repeated here.
[0124] In some optional implementations of this embodiment, the second generation module 305 includes: A receiving submodule is used to receive business data entered by the user in the form interface; The second acquisition submodule is used to acquire preset data verification strategies; The verification submodule is used to perform data verification on the business data based on the data verification strategy. The second generation submodule is used to generate corresponding form instance data based on the business data if the business data passes data validation.
[0125] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the form processing method in the aforementioned embodiments, and will not be repeated here. In some optional implementations of this embodiment, the saving module 307 includes: The first submodule is used to call the preset form saving method; The first saving submodule is used to save the main entity data to a preset form business table based on the form saving method. The second calling submodule is used to call the component saving method corresponding to the business component based on a preset data scheduling engine; The second storage submodule is used to save the component data to the corresponding component business table based on the component storage method.
[0126] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the form processing method in the aforementioned embodiments, and will not be repeated here.
[0127] In some optional implementations of this embodiment, the form processing apparatus further includes: The second judgment module is used to determine whether a triggered component registration request has been received; wherein, the component registration request carries component information of the specified component; The extraction module is used to parse the component information to extract the corresponding component function tags if the condition is met. The third generation module is used to generate a component index corresponding to the specified component based on the component function tag; A storage module is used to store the specified component into the component library based on the component index.
[0128] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the form processing method in the aforementioned embodiments, and will not be repeated here. To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0129] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0130] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0131] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for form processing methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
[0132] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, such as executing computer-readable instructions for the form processing method.
[0133] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.
[0134] Compared with the prior art, the embodiments of this application have the following beneficial effects: In this embodiment, when a user-triggered form processing request carrying form entity requirements is received, a preset application management page is displayed. The application then receives business components selected by the user from the component library within the application management page. Based on the form entity requirements and the business components, a corresponding table unit model is constructed. Subsequently, based on preset component integration configuration information, the table unit model is rendered to generate a form interface. Form instance data is generated based on the business data entered by the user in the form interface. Finally, when a form save event is received, the form instance data is saved. Thus, by pre-encapsulating business functions as autonomous components, decoupling them from the main form model, and allowing the same business components to be reused by any form entity, this application eliminates redundant development and reduces component development workload. Furthermore, by adopting a user-selected component-based assembly method instead of complex coding and multiple rule configurations, the workload of form format configuration is reduced, effectively improving form construction efficiency and flexibility.
[0135] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the form processing method described above.
[0136] Compared with the prior art, the embodiments of this application have the following main advantages: In this embodiment, when a user-triggered form processing request carrying form entity requirements is received, a preset application management page is displayed. The application then receives business components selected by the user from the component library within the application management page. Based on the form entity requirements and the business components, a corresponding table unit model is constructed. Subsequently, based on preset component integration configuration information, the table unit model is rendered to generate a form interface. Form instance data is generated based on the business data entered by the user in the form interface. Finally, when a form save event is received, the form instance data is saved. Thus, by pre-encapsulating business functions as autonomous components, decoupling them from the main form model, and allowing the same business components to be reused by any form entity, this application eliminates redundant development and reduces component development workload. Furthermore, by adopting a user-selected component-based assembly method instead of complex coding and multiple rule configurations, the workload of form format configuration is reduced, effectively improving form construction efficiency and flexibility.
[0137] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this 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 (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0138] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A form processing method, characterized in that, Includes the following steps: When a form processing request triggered by a user is received, a preset application management page is displayed; wherein, the form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library; Receive business components selected by the user from the component library within the application management page; Extract the form entity requirements from the form processing request, and construct a corresponding table unit model based on the form entity requirements and the business component; Based on the preset component integration configuration information, the table unit model is rendered to generate the corresponding form interface. Generate corresponding form instance data based on the business data entered by the user in the form interface; Determine whether a form save event has been received; If so, the form instance data is saved.
2. The form processing method according to claim 1, characterized in that, The step of constructing a corresponding table unit model based on the form entity and the business component specifically includes: Construct a corresponding form entity meta-model based on the aforementioned form entity requirements; Based on the received user-triggered model selection action for the business component, the component metamodel to be assembled is selected from the business component. The form entity metamodel and the component metamodel are merged based on preset merging rules to obtain the corresponding merged data; The merged data is used as the table cell model.
3. The form processing method according to claim 2, characterized in that, The step of merging the form entity metamodel and the component metamodel based on preset merging rules to obtain the corresponding merged data specifically includes: The form entity metamodel and the component metamodel are merged to obtain the corresponding first processed data; The first processed data is deduplicated to obtain the corresponding second processed data. The second processed data is subjected to association establishment processing to obtain the corresponding third processed data; The third processed data is sorted by field to obtain the corresponding fourth processed data; The fourth processed data is used as the merged data.
4. The form processing method according to claim 1, characterized in that, The step of rendering the table unit model to generate the corresponding form interface based on preset component integration configuration information specifically includes: The table cell model is parsed to identify the corresponding field mapping information; Retrieve preset component integration configuration information; A corresponding visualization structure is constructed based on the component integration configuration information and the field mapping information; The visualization structure is rendered to generate a corresponding visualization form interface; The visual form interface is used as the form interface.
5. The form processing method according to claim 1, characterized in that, The step of generating corresponding form instance data based on the business data entered by the user in the form interface specifically includes: Receive business data entered by the user in the form interface; Obtain the preset data verification strategy; The business data is validated based on the data validation strategy. If the business data passes data validation, then corresponding form instance data is generated based on the business data.
6. The form processing method according to claim 1, characterized in that, The form instance data includes main entity data and component data; the step of saving the form instance data specifically includes: Call the preset form save method; Based on the form saving method, the main entity data is saved to a preset form business table; The component saving method corresponding to the business component is invoked based on the preset data scheduling engine. The component data is saved to the corresponding component business table based on the component saving method.
7. The form processing method according to claim 1, characterized in that, Before the step of displaying a preset application management page upon receiving a user-triggered form processing request, the method further includes: Determine whether a triggered component registration request has been received; wherein the component registration request carries component information of the specified component; If so, the component information is parsed to extract the corresponding component function tags; Generate a component index corresponding to the specified component based on the component function tags; Based on the component index, the specified component is stored in the component library.
8. A form processing device, characterized in that, include: The display module is used to display a preset application management page when a form processing request triggered by a user is received; wherein the form processing request carries the form entity requirements input by the user, and the application management page includes a preset component library; The filtering module is used to receive business components filtered by the user from the component library within the application management page; The construction module is used to extract the form entity requirements from the form processing request and construct a corresponding table unit model based on the form entity requirements and the business components. The first generation module is used to perform page rendering on the table unit model based on preset component integration configuration information to generate the corresponding form interface. The second generation module is used to generate corresponding form instance data based on the business data entered by the user in the form interface; The first judgment module is used to determine whether a form save action event has been received; The save module is used to save the form instance data if the condition is met.
9. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the form processing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the form processing method as described in any one of claims 1 to 7.