Form data processing method and device, equipment and storage medium
By obtaining the form template ID and determining the filter fields, form data can be extracted directly from the form template's data structure, solving the problem of low efficiency in form data storage and querying in existing technologies, and achieving more efficient data processing and an improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2023-11-29
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies require frequent maintenance of wide table columns and modification of the application to accommodate query statements when storing and querying form data, resulting in low processing efficiency and poor user experience.
By obtaining the form template ID, the names and types of the filter fields are determined. Based on the data entered by the user, the corresponding form data is extracted from the data structure of the form template, and a structured storage and query method is adopted.
It improves the efficiency of form data retrieval and user experience, simplifies data processing, and reduces the complexity of system maintenance.
Smart Images

Figure CN117632962B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, device and storage medium for processing form data. Background Technology
[0002] In the computer field, form data generally refers to the data transmitted to the server after a user submits a form on a webpage. This data includes the content filled in by the user in the form, such as text entered in text boxes and selected options in checkboxes. Form data is one of the important data sources for user-server interaction. It is also one of the fundamental data sources for website operation. By collecting user form data, websites can understand user needs and thus develop more precise marketing and service strategies. Furthermore, form data can be used for data analysis to help websites optimize user experience.
[0003] In existing technologies, form data is mainly stored and retrieved using relational or non-relational databases. Specifically, form data is stored by creating and maintaining one or more wide tables with all fields, and retrieved by concatenating and assembling query statements.
[0004] However, the existing methods of storing and querying form data require constant maintenance of wide table columns and frequent modifications to the application to match query statements, which poses a great challenge to system maintenance and further affects the efficiency of form data processing. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for processing form data, in order to solve the problems of low processing efficiency and poor user experience of form data.
[0006] Firstly, this application provides a method for processing form data, including:
[0007] Retrieve the ID of the form template selected by the first user for the query;
[0008] At least one filter field to be queried is determined based on the form template ID, and the filter field to be queried includes: field name and field type;
[0009] Obtain at least one query filter field data filled in by the first user based on the field name and field type, and extract the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID based on the query filter field data.
[0010] In one possible design, the method further includes: creating a form template according to the needs of a first user, the form template including at least one form field, each form field including a field name and a field type; creating a data structure of the form template in an open-source search engine; obtaining form data filled in by a second user according to the field name and field type, and storing the form data in a structured manner in the data structure of the form template.
[0011] In one possible design, the form field also includes field validation rules, and the method further includes: validating the form field data in the form data according to the field validation rules; if the validation passes, storing the form field data in the data structure of the form template in a structured manner; if the validation fails, sending a prompt to the second user indicating that the form field data was filled in incorrectly.
[0012] In one possible design, the data structure of the form template includes: form data ID, form template ID, form template version identifier, original form data, and structured form data, wherein the original form data is a string consisting of all the form field data separated by commas.
[0013] In one possible design, the field types include: text input boxes, number input boxes, date input boxes, time input boxes, drop-down lists, radio buttons, and check boxes.
[0014] In one possible design, the structured form data is form field data stored in key-value pairs. The process of structuring and storing the form data within the data structure of the form template includes: if the field type is one of a text input box, a number input box, or a radio button, using the column value of the form field data in the original form data as the key and storing the form field data as the value in the structured form data; if the field type is one of a dropdown list or a checkbox, using the column value of the form field data in the original form data as the key and storing the form field data with multiple field option data separated by vertical bars as the value in the structured form data; if the field type is one of a date input box or a time input box, using the column value of the form field data in the original form data as the key and storing the timestamp obtained from the form field data as the value in the structured form data.
[0015] In one possible design, the method further includes: setting a first user interface for obtaining user requirements for creating a form template and querying the form data, and a second user interface for filling in the form data.
[0016] Secondly, this application provides a form data processing apparatus, comprising:
[0017] The retrieval module is used to retrieve the ID of the form template to be queried selected by the first user;
[0018] The determination module is used to determine at least one query filter field based on the form template ID, wherein the query filter field includes: field name and field type;
[0019] The processing module is used to obtain at least one query filter field data filled in by the first user according to the field name and field type, and extract the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID according to the query filter field data.
[0020] To execute the form data processing method described in the first aspect above.
[0021] Thirdly, this application provides a form data processing device, comprising:
[0022] Processor, memory, communication interface;
[0023] The memory is used to store the executable instructions of the processor;
[0024] The processor is configured to execute the form data processing method described in the first aspect above by executing the executable instructions.
[0025] Fourthly, this application provides a readable storage medium, comprising: storing a computer program thereon, wherein when executed by a processor, the computer program implements the form data processing method described in the first aspect above.
[0026] The form data processing method, apparatus, device, and storage medium provided in this application obtain the form template ID selected by a first user, determine at least one query filter field based on the form template ID, the query filter field includes: field name and field type, obtain at least one query filter field data filled in by the first user based on the field name and field type, and extract the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID based on the query filter field data. In this way, by directly extracting the corresponding form data from the data structure of the form template based on the query filter field filled in based on the field name and field type, the form data query is more convenient, the efficiency of form data query is improved, and the form data processing efficiency and user experience are further improved. Attached Figure Description
[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0028] Figure 1 A flowchart illustrating the form data processing method provided in the first embodiment of this application;
[0029] Figure 2 A flowchart illustrating the construction of the data structure of the form template provided in the second embodiment of this application and the process of storing the form data;
[0030] Figure 3 A schematic diagram of the structure of a form data processing device provided in the third embodiment of this application;
[0031] Figure 4 This is a schematic diagram of the structure of a form data processing device provided in the fourth embodiment of this application.
[0032] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0033] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0034] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0035] In existing technologies, form data is primarily stored and retrieved using relational or non-relational databases. This typically involves creating and maintaining one or more wide tables containing all fields, and retrieving form data by concatenating and assembling query statements. However, these existing methods require continuous maintenance of the wide table columns and frequent modifications to the application to accommodate the query statements, posing significant challenges to system maintenance and further impacting the efficiency of form data processing.
[0036] This application obtains the form template ID selected by the first user, determines at least one query filter field based on the form template ID, and the query filter field includes: field name and field type. It obtains the query filter field data filled in by the first user based on the field name and field type, and extracts the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID based on the query filter field data. In this way, by directly extracting the corresponding form data from the data structure of the form template based on the query filter field filled in based on the field name and field type, the query of form data is more convenient, which can improve the efficiency of form data query, and further improve the processing efficiency of form data and user experience.
[0037] The form data processing method provided in this application aims to solve the above-mentioned technical problems in the prior art.
[0038] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0039] Figure 1 This is a flowchart illustrating the form data processing method provided in the first embodiment of this application. The executing entity is a form data processing device, which can generally be implemented by software, hardware, or a combination of software and hardware.
[0040] like Figure 1 As shown, the form data processing method in this embodiment may include the following steps:
[0041] Step S101: Obtain the form template ID selected by the first user for querying.
[0042] Specifically, the form template ID selected by the first user can be obtained. The first user is a user with the permission to select the form template ID to be queried. The form template ID refers to the ID of the basic template for filling in and storing form data. Different form templates correspond to different form fields.
[0043] Step S102: Determine at least one filter field to be queried based on the form template ID. The filter field to be queried includes: field name and field type.
[0044] Specifically, at least one filter field to be queried can be determined based on the form template ID obtained in step S101. The filter field to be queried corresponds to the form fields of the form template; that is, all form fields in the form template can be used as filter fields for the current query. The filter fields to be queried include: field name and field type, for example: Field 1, field name: Name, field type: Text input; Field 2, field name: Gender, field type: Radio button; Field 3, field name: Age, field type: Numeric input.
[0045] Step S103: Obtain at least one query filter field data filled in by the first user based on the field name and field type, and extract the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID based on the query filter field data.
[0046] Specifically, at least one query filter field data can be obtained. This query filter field data is filled in by the first user based on the field name and field type determined in step S102, for example: Zhang San, male, 29 years old. The number of query filter fields filled in by the first user can be determined according to the first user's query filtering needs for the form data; for example, the query filter field data could also be Zhang San, male, or 29 years old. The first user also has the authority to determine the query filter field data based on the query filter fields corresponding to the form template.
[0047] Specifically, after obtaining at least one query filter field data filled in by the first user based on the field name and field type, the form data corresponding to the query filter field data can be extracted from the data structure of the form template corresponding to the form template ID. The data structure of the form template refers to the data structure created in the open-source search engine based on the form template created according to the first user's needs, used to store the form data filled in by the second user, who has the permission to fill in form data based on the field name and field type.
[0048] The form data processing method provided in this embodiment obtains the form template ID selected by the first user, determines at least one query filter field based on the form template ID, and the query filter field includes: field name and field type. It obtains at least one query filter field data filled in by the first user based on the field name and field type, and extracts the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID based on the query filter field data. In this way, by directly extracting the corresponding form data from the data structure of the form template based on the query filter field filled in based on the field name and field type, the form data query is more convenient, which can improve the efficiency of form data query, and further improve the form data processing efficiency and user experience.
[0049] Figure 2 This is a flowchart illustrating the construction of the data structure of the form template and the storage process of the form data provided in the second embodiment of this application. Figure 1 Based on the illustrated embodiment, this application embodiment also includes the construction of the data structure of the form template and the storage process of the form data. This embodiment describes the storage process of the form data in detail.
[0050] like Figure 2 As shown, the process of storing form data in this embodiment may include the following steps:
[0051] Step S201: Create a form template according to the needs of the first user. The form template includes at least one form field. A form field includes: field name and field type.
[0052] Specifically, a form template can be created based on the needs of the first user. The form template is a template of data structure consisting of all the form fields to be collected by the first user.
[0053] The form template includes at least one form field. Each form field includes a field name and a field type. The description of the form field can be found in step S102, where it is described as the field to be filtered; this embodiment will not repeat it here. Optionally, field types include, but are not limited to, text input boxes, number input boxes, date input boxes, time input boxes, dropdown lists, radio buttons, and checkboxes. During the creation of the form template, appropriate field types can be configured for the form fields required by the user. For example, if the form field name is "Name," the field type can be set to a text input box; if the form field name is "Gender," the field type can be set to a radio button; and if the form field name is "Age," the field type can be set to a number input box.
[0054] Step S202: Create the data structure for the form template in the open-source search engine.
[0055] Specifically, the data structure for the form template created in step S201 can be created within an open-source search engine. The data structure for the form template refers to the data structure corresponding to the form template and used for structured storage of the form template data. Optionally, the data structure for the form template includes: form data ID, form template ID, form template version identifier, original form data, and structured form data. The original form data is a string consisting of all form field data separated by commas. Specifically, the form data ID (ID) is a unique identifier for a single piece of form data; the form template ID (formID) identifies the ID of the form template corresponding to the form data; the form template version identifier (version) identifies the modified version of the form template corresponding to the form data, and together with the form template ID, it determines the version of the form template corresponding to the form data; the original form data (originalDate) is a string consisting of all form field data separated by commas, that is, the values of the form data are saved as strings in the order of the form fields in the form template, with each character of the string separated by commas; the structured form data (mapDate) is a structure for the structured storage of the form fields and the data of each form field within the form data. Optionally, structured form data is stored as key-value pairs of form field data. The key of each key-value pair is the column value of the form character data stored in the original form data. For example, the first column stored in the original form data has a key of 0, the second column has a key of 1, and so on. The value of each key-value pair corresponds to the form field data of the field type. Optionally, if the field type is a text input box, a number input box, or a radio button, the column value of the form field data in the original form data is used as the key, and the form field data is stored as the value in the structured form data. Optionally, if the field type is a dropdown list or a checkbox, the column value of the form field data in the original form data is used as the key, and the form field data with multiple field options separated by vertical bars is stored as the value in the structured form data. Optionally, if the field type is either a date input box or a time input box, the column value of the form field data in the original form data is used as the key, and the timestamp obtained by converting the form field data is used as the value and stored in the structured form data.
[0056] Step S203: Obtain the form data filled in by the second user according to the field name and field type, and store the form data in a structured manner in the data structure of the form template.
[0057] Specifically, after creating the data structure of the form template, the form data filled in by the second user according to the field names and field types can be obtained, and the form data can be structured and stored in the data structure of the form template according to the composition of the data structure of the form template in step S202. Optionally, the form fields in the form template also include field validation rules, which are rules for validating the form data filled in according to the field names and field types. After obtaining the form data filled in by the second user according to the field names and field types, the form field data in the form data can be validated according to the field validation rules. If the validation passes, the form field data is structured and stored in the data structure of the form template; if the validation fails, a prompt indicating that the form field data is filled in incorrectly is sent to the second user. Optionally, the field validation rules can be set to one or more, for example: for a form field named "age", one validation rule is an integer greater than zero.
[0058] The construction of the form template data structure and the storage process of form data provided in this embodiment involve creating a form template based on the needs of a first user. The form template includes at least one form field, where each field includes a field name and a field type. A data structure for the form template is created in an open-source search engine. The form data filled in by the second user based on the field name and field type is then obtained and structurally stored within the form template's data structure. Specifically, creating the form template's data structure to store the form data filled in by the second user based on the field name and field type is... Figure 1 The form data query process described in the illustrated embodiment provides a foundation for improving the efficiency of form data processing. In particular, creating a data structure for form templates and storing and querying form data through an open-source engine can also improve the efficiency of form data processing.
[0059] exist Figure 1 or Figure 2 Based on the illustrated embodiments, this application further proposes to set up a first user interface for obtaining user requirements for creating a form template and querying form data, and a second user interface for obtaining second-filled form data. The first user interface can obtain user requirements for creating a form template by obtaining the form fields of the form template defined by the first user. The first user interface can query form data by obtaining the form template ID selected by the first user and at least one query filter field filled in by the first user.
[0060] Figure 3 This is a schematic diagram of the structure of a form data processing device provided in the third embodiment of this application.
[0061] like Figure 3As shown, the form data processing device 30 in this embodiment includes an acquisition module 31, a determination module 32, and a processing module 33.
[0062] The acquisition module 31 is used to acquire the form template ID selected by the first user for querying;
[0063] Module 32 is used to determine at least one filter field to be queried based on the form template ID. The filter field to be queried includes: field name and field type.
[0064] Processing module 33 is used to obtain at least one query filter field data filled in by the first user according to the field name and field type, and extract the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID based on the query filter field data.
[0065] The apparatus provided in this embodiment can be used to execute the above-described method embodiments. Figures 1 to 2 The technical solution is similar in principle and effect, and will not be described again in this embodiment.
[0066] Figure 4 This is a schematic diagram of the structure of a form data processing device provided in the fourth embodiment of this application.
[0067] like Figure 4 As shown, the form data processing device 40 in this embodiment includes: a processor 41, a memory 42, and a communication interface 43.
[0068] Memory 42 is used to store executable instructions for the processor;
[0069] The processor 41 is configured to execute the above method embodiments by executing executable instructions. Figures 1 to 2 The method for processing form data for any item.
[0070] In the above Figure 4 In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0071] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0072] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0073] This application also provides a readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, performs the above-described method embodiments. Figures 1 to 2 The method for processing form data for any item.
[0074] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0075] It should be further noted that although the steps in the flowchart are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the exact order indicated by the arrows. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps; they can be executed in other orders. Furthermore, the flowchart...
[0076] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0077] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0078] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as these combinations of technical features do not contradict each other, they should be considered within the scope of this specification.
[0079] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0080] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing form data, characterized in that, Retrieve the ID of the form template selected by the first user for the query; At least one filter field to be queried is determined based on the form template ID, and the filter field to be queried includes: field name and field type; Obtain at least one query filter field data filled in by the first user based on the field name and field type, and extract the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID based on the query filter field data; The method further includes: A form template is created based on the needs of the first user. The form template includes at least one form field, and each form field includes: a field name and a field type. Create the data structure for the form template in an open-source search engine; Obtain the form data filled in by the second user based on the field name and field type, and store the form data in the data structure of the form template in a structured manner; The data structure of the form template includes: form data ID, form template ID, form template version identifier, original form data, and structured form data. The original form data is a string consisting of all form field data separated by commas. The structured form data is form field data stored in key-value pairs. The process of structuring and storing the form data in the data structure of the form template includes: If the field type is a text input box, a number input box, or a radio button, the column value of the form field data in the original form data is used as the key, and the form field data is stored as the value in the structured form data; If the field type is a drop-down list or a checkbox, the column value of the form field data in the original form data is used as the key, and the form field data separated by vertical bars is stored as the value in the structured form data; If the field type is a date input box or a time input box, the column value of the form field data in the original form data is used as the key, and the timestamp obtained by converting the form field data is stored as the value in the structured form data.
2. The method of claim 1, wherein, The form fields also include field validation rules, and the method further includes: The form field data in the form data is validated according to the field validation rules. If the validation passes, the form field data is structured and stored in the data structure of the form template. If the validation fails, a prompt indicating that the form field data is filled in incorrectly is sent to the second user.
3. The method of claim 2, wherein, The field types include: text input box, number input box, date input box, time input box, drop-down list, radio button, and check box.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: A first user interface is set up to obtain user requirements for creating form templates and querying the form data, and a second user interface is set up to fill in the form data.
5. A form data processing apparatus characterized by comprising: include: The retrieval module is used to retrieve the form template ID selected by the first user for querying; The determination module is used to determine at least one query filter field based on the form template ID, wherein the query filter field includes: field name and field type; The processing module is used to obtain at least one query filter field data filled in by the first user according to the field name and field type, and extract the form data corresponding to the query filter field data from the data structure of the form template corresponding to the form template ID according to the query filter field data; The device is also used for: A form template is created based on the needs of the first user. The form template includes at least one form field, and each form field includes: a field name and a field type. Create the data structure for the form template in an open-source search engine; Obtain the form data filled in by the second user based on the field name and field type, and store the form data in the data structure of the form template in a structured manner; The data structure of the form template includes: form data ID, form template ID, form template version identifier, original form data, and structured form data. The original form data is a string consisting of all form field data separated by commas. The structured form data is form field data stored in key-value pairs. The process of structuring and storing the form data in the data structure of the form template includes: If the field type is a text input box, a number input box, or a radio button, the column value of the form field data in the original form data is used as the key, and the form field data is stored as the value in the structured form data; If the field type is a drop-down list or a checkbox, the column value of the form field data in the original form data is used as the key, and the form field data separated by vertical bars is stored as the value in the structured form data; If the field type is a date input box or a time input box, the column value of the form field data in the original form data is used as the key, and the timestamp obtained by converting the form field data is stored as the value in the structured form data.
6. A form data processing apparatus, characterized by comprising: include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to perform the form data processing method according to any one of claims 1 to 4 by executing the executable instructions.
7. A readable storage medium, having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the form data processing method according to any one of claims 1 to 4.