Form page-based data interaction method and device

By abstracting the form page data input items into single element information and dynamically generating the form page, the problem that the front-end form page cannot be modified dynamically is solved, real-time modification is achieved without shutting down and data security is improved.

CN119621739APending Publication Date: 2025-03-14BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311181861.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the existing technology, the front-end form page is fixed and does not support dynamic modification, which causes the system to be downtime and deployed, and the back-end database structure and operation code need to be changed, which affects the database usage and poses security risks.

Method used

Dynamic generation and update of form pages are achieved by abstracting the form page data input items into single element information, and dynamically generating form pages based on the association between the form page and the form element and the correspondence between the form element and the page rendering template.

Benefits of technology

It realizes real-time modification of front-end form pages without shutting down, avoids changes in the back-end database structure and operation code, ensures the stability and sustainability of database services, and improves data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621739A_ABST
    Figure CN119621739A_ABST
Patent Text Reader

Abstract

The invention discloses a data interaction method and device based on a form page, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: in response to a received form page access request, obtaining a form page identifier from the access request; at least one form element associated with the form page is obtained according to the form page identifier, and the form elements are obtained by abstracting form data input items and have element types; for each form element, obtaining a page rendering template corresponding to the form element according to the element type of the form element; and rendering each form element according to the page rendering template corresponding to each form element to generate a form page, and performing data interaction with a user through the generated form page. According to the embodiment, the form page is dynamically generated and updated, the problem that the form page cannot be dynamically modified is solved, meanwhile, the stability and continuity of database service are guaranteed, and the data security is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data interaction method and device based on a form page. Background Art

[0002] Currently, there is a form page on each Web (World Wide Web) page for users to input or select data. There is also a form submission action for the front-end and back-end application programs to interact and save the data input by the user. In the prior art, the form submission action is implemented by storing each input data in the front-end form page into a field in a database. After the back-end application receives the data from the front-end program, the back-end application uses a relational database to store the data, thereby implementing the interactive action of form data submission.

[0003] In the process of implementing the present invention, the inventors found that in the prior art, the form of the front-end page is fixed and does not support dynamic modification. Once modified, it will lead to the redeployment and shutdown of the system; when the front-end form page is modified, the corresponding back-end database storage structure and database operation code will also be modified, affecting the use of the database and posing a greater security risk. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a data interaction method and device based on a form page, which can abstract the data input items of the form page into single element information, and dynamically generate the form page according to the association relationship between the form page and the form elements and the correspondence between the form elements and the page rendering template, thereby realizing dynamic generation and update of the form page, solving the problem that the form page cannot be dynamically modified, and realizing real-time modification of the front-end form page without stopping the system, while not affecting user use; at the same time, it also solves the problem that after modifying the front-end form page, it is necessary to change the structure of the back-end database and the operation code of the back-end database, and realizes the effect that after the form page is modified, there is no need to modify the structure and operation code of the database, thereby ensuring the stability and continuity of the database service and improving data security.

[0005] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a data interaction method based on a form page is provided, comprising: in response to receiving a form page access request, obtaining a form page identifier from the access request; obtaining at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted according to form data input items, and the form element has an element type; for each form element, obtaining a page rendering template corresponding to the form element according to the element type of the form element; rendering each form element according to the page rendering template corresponding to each form element to generate a form page, and interacting with a user through the generated form page.

[0006] Optionally, before obtaining at least one form element associated with the form page according to the form page identifier, it also includes: abstracting each form data input item included in the form page into a single form element, and establishing an association relationship between the form page and the form element, wherein the element information of each form element includes the element type corresponding to the form element; for each form element, obtaining a page rendering template corresponding to the element type according to the element type corresponding to the form element, and establishing a correspondence between the form element and the page rendering template.

[0007] Optionally, the element information of each form element is stored as a data record in a row of a database.

[0008] Optionally, data interaction with the user is performed through the generated form page, including: in response to receiving a user's instruction to add data to the form page, obtaining the user's input data, the input data including a data identifier; extracting element values ​​corresponding to each form element included in the form page from the input data; for each form element, storing the element information of the form element, the element value of the form element and the data identifier as a data record in a row of a database.

[0009] Optionally, data interaction with the user is performed through the generated form page, including: in response to receiving a data query instruction from the user on the form page, obtaining a data identifier of the form data to be queried; obtaining element information and element values ​​of each form element corresponding to the form data to be queried according to the data identifier, the element information of the form element including an element name; generating a header of the query result according to the element name of each form element; and generating a query result of the form data to be queried according to the header and the element values ​​of each form element.

[0010] Optionally, after generating the query result of the form data to be queried, the method further includes: generating operation prompt information for the query result, so that the user can operate the novelty search result according to the prompt information.

[0011] Optionally, the operation prompt information includes an instruction for generating a data update operation and / or an instruction for generating a data deletion operation.

[0012] According to another aspect of an embodiment of the present invention, a data interaction device based on a form page is provided, comprising: an access request processing module, for obtaining a form page identifier from the access request in response to receiving a form page access request; a form element acquisition module, for obtaining at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted according to form data input items, and the form element has an element type; a rendering template acquisition module, for obtaining, for each form element, a page rendering template corresponding to the form element according to the element type of the form element; and a page generation and display module, for rendering each form element according to the page rendering template corresponding to each form element to generate a form page, and performing data interaction with a user through the generated form page.

[0013] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the form page-based data interaction method provided in an embodiment of the present invention.

[0014] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the form page-based data interaction method provided by an embodiment of the present invention is implemented.

[0015] An embodiment of the above invention has the following advantages or beneficial effects: in response to receiving a form page access request, a form page identifier is obtained from the access request; at least one form element associated with the form page is obtained according to the form page identifier, the form element is abstracted according to the form data input item, and the form element has an element type; for each form element, a page rendering template corresponding to the form element is obtained according to the element type of the form element; each form element is rendered according to the page rendering template corresponding to each form element to generate a form page, and a technical solution for data interaction with a user through the generated form page is provided, by abstracting the form page data input items into single element information, and dynamically generating the form page according to the association relationship between the form page and the form element and the correspondence relationship between the form element and the page rendering template, so as to realize dynamic generation and update of the form page, solve the problem that the form page cannot be dynamically modified, realize real-time modification of the front-end form page without stopping the system, and do not affect the use of users; at the same time, it also solves the problem that the structure of the back-end database and the operation code of the back-end database need to be changed after the front-end form page is modified, and realizes the effect that the structure and operation code of the database do not need to be modified after the form page is modified, thereby ensuring the stability and continuity of the database service and improving data security.

[0016] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0018] Figure 1 is a schematic diagram of the main steps of a data interaction method based on a form page according to an embodiment of the present invention;

[0019] Figure 2 is an abstract principle schematic diagram of a form element of an embodiment of the present invention;

[0020] Figure 3 It is a schematic diagram of an abstract flow chart of form elements of a form page according to an embodiment of the present invention;

[0021] Figure 4 is a schematic diagram of rendering results of a form page according to an embodiment of the present invention;

[0022] Figure 5 2 is a schematic diagram of main modules of a data interaction device based on a form page according to an embodiment of the present invention;

[0023] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0024] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0026] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution disclosed in the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0027] In the prior art, the front-end form page is fixed and does not support dynamic modification. Once modified, it will lead to system redeployment and shutdown. When the front-end form page is modified, for example, new form data submission content is added, the corresponding back-end database also needs to add corresponding fields to receive the new data content. At the same time, the code of the back-end application operating the database will also be modified. At this time, when the amount of data in the database is too large, modifying the database will cause the program service to be unavailable for a long time, and the data stored in the database will also have a greater security risk when modifying the database.

[0028] To this end, the present invention provides a data interaction method based on form pages, which solves the problem that the front-end form pages cannot be modified dynamically, and realizes real-time modification of the front-end form pages without stopping the system, and does not affect user use; it solves the problem that after modifying the front-end form pages (for example, adding data submission content of a new form), the back-end database structure and the back-end program code for operating the database need to be changed, and finally achieves the effect that after the form page is modified, there is no need to modify the database structure or the code, thereby ensuring the service continuity and stability of the database, as well as data security.

[0029] Figure 1 Schematic diagram of the main steps of the data interaction method based on the form page according to an embodiment of the present invention. Figure 1 As shown, the data interaction method based on the form page of the embodiment of the present invention mainly includes the following steps S101 to S104.

[0030] Step S101: in response to receiving a form page access request, obtaining a form page identifier from the access request. When a user wants to access a form page, a form page access request is sent through a client. After receiving the form page access request, the client first obtains a form page identifier from the access request. The form page identifier is, for example, an access address link of the form page, or a code of the form page, etc., which can uniquely identify a form page.

[0031] Step S102: Obtain at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted from the form data input item, and the form element has an element type. Generally, a form page includes at least one form data input item, for example, a user registration page needs to include at least two form data input items, namely, a user name and a user password.

[0032] In an embodiment of the present invention, before obtaining at least one form element associated with the form page according to the form page identifier, it may also include: abstracting each form data input item included in the form page into a single form element, and establishing an association relationship between the form page and the form element, wherein the element information of each form element includes the element type corresponding to the form element; for each form element, obtaining a page rendering template corresponding to the element type according to the element type corresponding to the form element, and establishing a correspondence between the form element and the page rendering template. In a specific implementation, each form page may be processed in advance to abstract the form data input items in the form page into form elements, and establish an association relationship between the form page and the form element, as well as a correspondence between the form element and the page rendering template.

[0033] According to an embodiment of the present invention, when the form data input items in the form page are abstracted into form elements, specifically, the form data input items in the form page (such as radio buttons, multiple selection boxes, input boxes, etc.) can be abstracted into a single form element, and each form element has element information such as element name, element code, element type, element unit, element description, element enumeration value, etc. Among them, the element name represents the display name of the form data input item in the form page; the element code represents the unique identification code of the form data input item in the form page; the element description represents the functional description of the form data input item in the form page; the element type represents the rendering effect of the form data input item in the form page in the page (for example, if the element type is radio button, a radio button is rendered on the page, etc.); the element enumeration value represents the specific value that can be selected for the form data input item in the form page (for example, for a radio button element, it represents the value that can be selected for the element).

[0034] Figure 2FIG. 1 is an abstract schematic diagram of a form element of an embodiment of the present invention. Figure 2 As shown, in this embodiment, the form data input item is used to select the operation type, which is a radio button with an enumerated value. Therefore, after the form data input item is abstracted into a form element, the element name can be obtained as: operation type, the element type is: radio button, the element enumeration value is: add, delete, the element code can be generated according to the system setting rules, and the element description is: used to select the operation type.

[0035] Through the above method, the form data input items in the form page can be abstracted into individual form elements, and the association relationship between the form page and the form elements can be established. For example, form page one includes form element one, form element two, form element three, etc., and then the association relationship between the form page and the form elements is stored in a relational database.

[0036] After that, it is also necessary to bind the corresponding page rendering template to the form element. Among them, the page rendering template corresponds to the element type of the form element, and form elements of different element types correspond to different page rendering templates. Specifically, you can use HTML (Hypertext Markup Language), CSS (Cascading Style Sheets), JavaScript and other front-end web programming languages ​​to implement page rendering templates. The specific template rendering effect depends on the page UI display effect that the system designer wants. For example, for radio-select elements, prepare a page rendering template corresponding to the radio button, for multiple-select elements, prepare a page rendering template corresponding to the multiple-select box, and for input elements, prepare a page rendering template corresponding to the input box, and then maintain different rendering templates in the front-end code library.

[0037] In the specific implementation process, the two steps of establishing the association relationship between the form page and the form element and binding the corresponding page rendering template to the form element can be performed simultaneously or one after another, which will not affect the technical implementation of the present invention.

[0038] Figure 3 FIG. 1 is a schematic diagram of an abstract flow chart of form elements of a form page according to an embodiment of the present invention. Figure 3 As shown, in this embodiment of the present invention, when abstracting the form elements on the form page, specifically, the following steps S301 to S303 may be included:

[0039] Step S301: abstracting the form data input items in the form page into individual form elements and storing them in a database;

[0040] Step S302: establishing a correspondence between form elements and page rendering templates, and storing the correspondence and the page rendering template in a database;

[0041] Step S303: Establish an association relationship between the form page and the form element and store it in the database.

[0042] Through the above steps S301 to S303, the form page can be abstractly processed and stored. Among them, step S302 and step S303 can be executed simultaneously or successively, and the present invention does not limit this.

[0043] Step S103: For each form element, the page rendering template corresponding to the form element is obtained according to the element type of the form element. According to the form page identifier, all form elements associated with the form page can be obtained from the database according to the pre-saved association relationship between the form page and the form element. Then, for each form element, according to the element type of the form element, the page rendering template corresponding to the form element can be obtained from the database according to the pre-saved correspondence between the form element and the page rendering template. In this way, the page rendering templates corresponding to all form elements associated with the form page can be obtained. Among them, the page rendering template is used to render and display the form elements.

[0044] Step S104: Render each form element according to the page rendering template corresponding to each form element to generate a form page, and interact with the user through the generated form page. After obtaining the page rendering template corresponding to each form element, the form page can be generated by rendering each form element, and then the data can be interacted with the user through the dynamically generated form page. The user can perform interactive actions such as adding, updating, deleting, and querying data on the dynamically generated form page.

[0045] In an embodiment of the present invention, the element information of each form element is stored as a data record in a row of a database. In the prior art, the data corresponding to all form data input items included in a form page are stored as a data record, while in the present invention, each form data input item is abstracted as a form element, and the relevant element information of each form element is stored as a data record. In this way, when the form data input items of the form page are increased or decreased, the corresponding form elements can be directly increased or decreased in the database without modifying the field content in the database and the operation code of the database, thereby ensuring the continuity and stability of the database service and the security of the data.

[0046] In an embodiment of the present invention, a relational database is used to store the form data of a form page. When storing the form data, it is different from a traditional form data storage solution. The traditional form data storage solution adopts a method in which one form data entry corresponds to one row of data in a backend database. The solution adopted by the present invention is as follows: Since the present invention abstracts each form data input item in the form page into a single form element, the present invention stores the element information of one form element in a database in a scheme of storing one row. Therefore, one form page will store multiple rows of form element information. A simple form data storage solution is shown in Table 1 below.

[0047] Table 1

[0048] No. 1 Element 1 Element Value No. 1 Element 1 Element Value No. 1 Element 1 Element Value

[0049] The advantage of adopting this storage method in the present invention is that when a form data input item is added to the form page, the backend database does not need to modify the database table structure, and does not need to shut down to change the database, thereby realizing dynamic storage of the form data.

[0050] The following is a specific example to describe how the present invention dynamically generates a form page. Taking the user registration scenario as an example, the function implemented by the form page is to enter the user's registration information. The designed form page elements include three form data input items such as "user name", "password", and "gender". After the form page is designed, the actual operation is performed according to the following steps.

[0051] Step 1: Abstract the three form input data items such as "user name", "password" and "gender" in the form page into three form elements. The element information of the form elements is as follows:

[0052] (1) Username element. Element name: Username; Element code: userName; Element description: Username used when the user registers; Element type: Input type; Element enumeration value: None;

[0053] (2) Password element. Element name: password; Element code: secretCode; Element description: The password used by the user when logging in; Element type: input type; Element enumeration value: none;

[0054] (3) Gender element. Element name: gender; Element code: gender; Element description: user's gender; Element type: single choice; Element enumeration value: 1: male, 2: female.

[0055] After the three form data input items are abstracted into three form elements, the element information of the three form elements is stored in the backend relational database. The storage results are shown in Table 2 and Table 3 below.

[0056] Table 2

[0057] Element Name Element Encoding Element Type Element Description username userName Input Type User name used when registering password secretCode Input Type The password used by the user to log in gender gender Single choice User's gender

[0058] Table 3

[0059] Element Name Element Encoding Enumeration name Enumeration Values gender gender male 1 gender gender female 2

[0060] Step 2: Write corresponding page rendering templates for form elements of different element types. In this embodiment, the page rendering templates corresponding to input type and radio type form elements can be mainly written, and stored in the front-end page code library after writing;

[0061] Step 3: Establish an association relationship between the form page and the form elements. In this embodiment, the user registration form page is associated with the user name element, password element and gender element, and the association relationship is stored in the backend database, as shown in Table 4 below.

[0062] Table 4

[0063] Form Name Element Name Element Encoding User registration form username userName User registration form password secretCode User registration form gender gender

[0064] Step 4: The user requests to access the user registration form. The back-end application queries the database for the association between the user registration form page and the form elements according to the form page ID (i.e., the form page identifier) ​​accessed by the user, and obtains the association stored in step 3 (see Table 4). Then, the form element database is queried according to the obtained association to obtain the element information of all form elements contained in the user registration form page (see Table 2 and Table 3). After that, the front-end program matches the page rendering template according to the form element information returned by the back-end application (including the user name element, password element, and gender element), and dynamically renders and generates the form page. The rendering effect of the generated form page is shown in the figure below. Figure 4 As shown, Figure 4 It is a schematic diagram of the rendering result of a form page according to an embodiment of the present invention.

[0065] According to the technical solution of the embodiment of the present invention, when the system designer needs to modify the form page, for example, the system designer wants to add an age form data input item to the user registration form, the specific implementation steps are as follows:

[0066] Step 1: The system designer first needs to insert a new age element into the element information table shown in Table 2. The element information is as follows: age element, element name: age; element code: userAge; element description: age entered when the user registers; element type: input type; element enumeration value: none. Since this element has no enumeration value, there is no need to modify Table 3. The element information table obtained after inserting the age element into Table 2 is shown in Table 5 below.

[0067] Table 5

[0068] Element Name Element Encoding Element Type Element Description username userName Input Type User name used when registering password secretCode Input Type The password used by the user to log in gender gender Single choice User's gender age userAge Input Type The age entered by the user when registering

[0069] Step 2: The system designer needs to add a new association between the form page and the age element in the association table of the form page and form elements shown in Table 4. The newly added table is shown in Table 6 below.

[0070] Table 6

[0071] Form Name Element Name Element Encoding User registration form username userName User registration form password secretCode User registration form gender gender User registration form age userAge

[0072] Step 3: When a user requests to access the user registration form, the form page can be dynamically rendered according to the process in step 4 as described above. At this time, the generated form page includes four form data input items: user name, password, gender and age.

[0073] From the above introduction, it can be seen that according to the technical solution of the embodiment of the present invention, the form page can be dynamically generated, which solves the problem that the form page cannot be modified dynamically, and realizes the real-time modification of the front-end form page without stopping the system, and does not affect user use; it also solves the problem that after modifying the front-end form page, the back-end database structure and the operation code of the back-end database need to be changed, and the effect of not needing to modify the database structure and operation code after the form page is modified is achieved, thereby ensuring the stability and continuity of the database service and improving data security.

[0074] According to another embodiment of the present invention, when data interaction is performed with a user through the generated form page, it may specifically include: in response to receiving a user's instruction to add data to the form page, obtaining the user's input data, the input data including a data identifier; extracting element values ​​corresponding to each form element included in the form page from the input data; for each form element, storing the element information of the form element, the element value of the form element and the data identifier as a data record in a row of a database. When the user needs to add data through the form page, first obtain the input data submitted by the user through the form page, then extract the element values ​​corresponding to each form element from the input data, and then store the data identifier (used to uniquely identify a piece of data), element information and element value together in a row of data.

[0075] Taking the user registration scenario mentioned above as an example, after the user enters the username, password and selects the gender on the dynamically generated form page, the form data submitted by the front-end program interacts with the back-end program in JSON format. The interactive data example is as follows:

[0076] {"Form Name":"User Registration Form",

[0077] "Input element":[

[0078] {"element name":"user name","element code":"userName","element type":"input type","element value":"Zhang San"},

[0079] {"element name":"password","element code":"secretCode","element type":"input type","element value":"123"},

[0080] {"element name":"gender","element code":"gender","element type":"single choice","element value":"male"}]}.

[0081] The result of storing the input data submitted by the user in the backend database is shown in Table 7 below.

[0082] Table 7

[0083]

[0084] As shown in the database storage results in Table 7 above, when a new form data input item is added to the dynamically generated form page, only one new piece of data needs to be stored in the back-end database without changing the database table structure. For example, when a new age form data input item is added to the user registration form page, the data results stored in the back-end database will be changed to the following Table 8.

[0085] Table 8

[0086]

[0087] It can be seen from this that by adopting the technical solution of the present invention, when a new form data input item is added to the dynamically generated form page, the backend database does not need to modify the database table structure, does not need to shut down the database service for modification, and does not affect user use.

[0088] According to another embodiment of the present invention, when data interaction with a user is performed through the generated form page, it can specifically include: in response to receiving a data query instruction from the user on the form page, obtaining a data identifier of the form data to be queried; obtaining element information and element values ​​of each form element corresponding to the form data to be queried according to the data identifier, the element information of the form element including the element name; generating a header of the query result according to the element name of each form element; and generating a query result of the form data to be queried according to the header and the element values ​​of each form element.

[0089] In combination with the above embodiment, when a user wants to view a piece of data on a dynamically generated form page, for example, to view the data of a user named "Zhang San", the form data submitted by the front-end program interacts with the back-end program in JSON format. The interactive data example is as follows:

[0090] {"data ID":1}.

[0091] After the backend program receives an instruction to query data, for example, after receiving an instruction to query data with a data identifier of 1, the backend program will perform the following three steps:

[0092] 1. First, query the user data with data ID 1 and the element data associated with the user registration form from the database. The results are as follows:

[0093] User data with data identifier 1:

[0094] {"Form Name":"User Registration Form",

[0095] "Input element":[

[0096] {"Serial number":1,"Element name":"User name","Element code":"userName","Element type":"Input type","Element value":"Zhang San"},

[0097] {"Serial number":2,"Element name":"Password","Element code":"secretCode","Element type":"Input type","Element value":"123"},

[0098] {"Serial number":3,"Element name":"Gender","Element code":"gender","Element type":"Single choice","Element value":"Male"}]};

[0099] Element data associated with the user registration form:

[0100] {"Form Name":"User Registration Form",

[0101] "Input element":[

[0102] {"element name":"user name","element code":"userName"},

[0103] {"element name":"password","element code":"secretCode"},

[0104] {"element name":"gender","element code":"gender"}]};

[0105] 2. After obtaining the element data associated with the user registration form, the front-end program can dynamically generate a header for the query results based on the element information of the form elements associated with the user registration form. Specifically, for example, the header for the query results can be dynamically generated based on the element name of the form element. The generated header is shown in the following Table 9.

[0106] Table 9

[0107] username password gender

[0108] 3. After the front-end program dynamically generates the header of the query result, it can obtain data with the same element code from the user data with the data identifier 1 according to the element code in the element information of the form element associated with the user registration form. For example, the code of the user name element is "userName" from the element information associated with the user registration form, and then the element value corresponding to the element code "userName" is obtained from the user data with the data identifier 1. Repeat the above steps to dynamically generate the query results shown in Table 10.

[0109] Table 10

[0110] username password gender Zhang San 123 male

[0111] From the above introduction, it can be seen that the present invention is based on a solution of abstracting the form data input items in the form page into a single form element, and can dynamically generate query results according to the association relationship between the form page and the form elements. When a new form data input item is added to the form page, the front-end program code does not need to be changed, and the generated results can be dynamically rendered without affecting the user.

[0112] According to another embodiment of the present invention, after generating the query results of the form data to be queried, it may also include: generating operation prompt information for the query results, so that the user can operate the search results according to the prompt information. According to an embodiment of the present invention, the operation prompt information includes instructions for generating data update operations and / or instructions for generating data deletion operations. In combination with the above-mentioned embodiments, operation prompt information for the query results in Table 10 may also be added, for example, prompt information for update or deletion operations may be added, as shown in Table 11 below.

[0113] Table 11

[0114] username password gender operate Zhang San 123 male Update / Delete

[0115] The user can trigger the generation of an instruction for generating a data update operation or an instruction for generating a data deletion operation by clicking on the operation prompt information in the query result.

[0116] In one embodiment, after the user searches for data on a dynamically generated form page, he re-enters his user name, for example, changes his user name to "Li Si", and submits a data update request. The data update is submitted in JSON format. The interactive data example is as follows:

[0117] {"Form Name":"User Registration Form",

[0118] "Input element":[

[0119] {"Serial number":1,"Element name":"User name","Element code":"userName","Element type":"Input type","Element value":"Li Si"},

[0120] {"Serial number":2,"Element name":"Password","Element code":"secretCode","Element type":"Input type","Element value":"123"},

[0121] {"Serial number":3,"Element name":"Gender","Element code":"gender","Element type":"Single choice","Element value":"Male"}]};

[0122] After the back-end program receives the interactive data, it can update the database according to the sequence number in the submitted data.

[0123] In another embodiment, after the user searches for data on a dynamically generated form page, if the user wants to delete a piece of data, for example, to delete the data of a user named "Zhang San", after submitting a data deletion request, the data deletion is submitted in JSON format. The interactive data example is as follows:

[0124] {"Data ID":1}

[0125] After the backend program receives the data identifier, it will delete all the data in the data table with a value of 1 in the database.

[0126] Figure 5 Schematic diagram of the main modules of the data interaction device based on the form page according to an embodiment of the present invention. Figure 5 As shown, the data interaction device 500 based on the form page according to the embodiment of the present invention mainly includes an access request processing module 501 , a form element acquisition module 502 , a rendering template acquisition module 503 and a page generation and display module 504 .

[0127] The access request processing module 501 is used to obtain a form page identifier from the access request in response to receiving the form page access request;

[0128] A form element acquisition module 502, configured to acquire at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted from the form data input item and has an element type;

[0129] The rendering template acquisition module 503 is used to acquire, for each form element, a page rendering template corresponding to the form element according to the element type of the form element;

[0130] The page generation and display module 504 is used to render each form element according to the page rendering template corresponding to each form element to generate a form page, and to perform data interaction with the user through the generated form page.

[0131] According to one embodiment of the present invention, the data interaction device 500 based on the form page may also include a form page abstraction module (not shown in the figure), which is used to: before obtaining at least one form element associated with the form page according to the form page identifier, abstract each form data input item included in the form page into a single form element, and establish an association relationship between the form page and the form element, wherein the element information of each form element includes the element type corresponding to the form element; for each form element, obtain a page rendering template corresponding to the element type according to the element type corresponding to the form element, and establish a correspondence between the form element and the page rendering template.

[0132] According to another embodiment of the present invention, the element information of each form element is stored as a data record in a row of a database.

[0133] According to another embodiment of the present invention, the page generation and display module 504 can also be used for: in response to receiving a user's instruction to add data to the form page, obtaining the user's input data, the input data including a data identifier; extracting element values ​​corresponding to each form element included in the form page from the input data; for each form element, storing the element information of the form element, the element value of the form element and the data identifier as a data record in a row of a database.

[0134] According to another embodiment of the present invention, the page generation and display module 504 can also be used for: in response to receiving a data query instruction from a user on the form page, obtaining a data identifier of the form data to be queried; obtaining element information and element values ​​of each form element corresponding to the form data to be queried according to the data identifier, the element information of the form element including the element name; generating a header of the query result according to the element name of each form element; generating a query result of the form data to be queried according to the header and the element value of each form element.

[0135] According to another embodiment of the present invention, the page generation and display module 504 can also be used to: after generating the query result of the form data to be queried, generate operation prompt information for the query result, so that the user can operate the search result according to the prompt information.

[0136] According to yet another embodiment of the present invention, the operation prompt information includes an instruction for generating a data update operation and / or an instruction for generating a data deletion operation.

[0137] According to the technical solution of the embodiment of the present invention, in response to receiving a form page access request, a form page identifier is obtained from the access request; at least one form element associated with the form page is obtained according to the form page identifier, the form element is abstracted according to the form data input item, and the form element has an element type; for each form element, a page rendering template corresponding to the form element is obtained according to the element type of the form element; each form element is rendered according to the page rendering template corresponding to each form element to generate a form page, and data interaction with the user is performed through the generated form page. By abstracting the form page data input items into single element information, and dynamically generating the form page according to the association relationship between the form page and the form element and the correspondence relationship between the form element and the page rendering template, the dynamic generation and update of the form page is realized, the problem that the form page cannot be dynamically modified is solved, and the front-end form page can be modified in real time without stopping the system, and the use of the user is not affected; at the same time, the problem that the structure of the back-end database and the operation code of the back-end database need to be changed after the front-end form page is modified is solved, and the effect that the structure and operation code of the database do not need to be modified after the form page is modified is achieved, thereby ensuring the stability and continuity of the database service and improving data security.

[0138] Figure 6 An exemplary system architecture 600 is shown to which a form page-based data interaction method or a form page-based data interaction device according to an embodiment of the present invention can be applied.

[0139] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0140] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0141] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0142] The server 605 may be a server that provides various services, such as a background management server that provides support for websites browsed by users using terminal devices 601, 602, and 603 (for example only). The background management server may respond to the received form page access request and other data by receiving the form page access request and obtaining a form page identifier from the access request; obtaining at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted according to the form data input item, and the form element has an element type; for each form element, obtaining a page rendering template corresponding to the form element according to the element type of the form element; rendering each form element according to the page rendering template corresponding to each form element to generate a form page, and performing data interaction and other processing with the user through the generated form page, and feeding back the processing result (such as the generated form page - for example only) to the terminal device.

[0143] It should be noted that the data interaction method based on the form page provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the data interaction device based on the form page is generally arranged in the server 605 .

[0144] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0145] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 7 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0146] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0147] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0148] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0149] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0150] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0151] The units or modules involved in the embodiments of the present invention may be implemented in software or hardware. The units or modules described may also be provided in a processor. For example, they may be described as follows: a processor includes an access request processing module, a form element acquisition module, a rendering template acquisition module, and a page generation and display module. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves. For example, the access request processing module may also be described as "a module for obtaining a form page identifier from the access request in response to receiving a form page access request."

[0152] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: in response to receiving a form page access request, obtaining a form page identifier from the access request; obtaining at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted according to the form data input item, and the form element has an element type; for each form element, obtaining a page rendering template corresponding to the form element according to the element type of the form element; rendering each form element according to the page rendering template corresponding to each form element to generate a form page, and interacting with the user through the generated form page.

[0153] According to the technical solution of the embodiment of the present invention, in response to receiving a form page access request, a form page identifier is obtained from the access request; at least one form element associated with the form page is obtained according to the form page identifier, the form element is abstracted according to the form data input item, and the form element has an element type; for each form element, a page rendering template corresponding to the form element is obtained according to the element type of the form element; each form element is rendered according to the page rendering template corresponding to each form element to generate a form page, and data interaction with the user is performed through the generated form page. By abstracting the form page data input items into single element information, and dynamically generating the form page according to the association relationship between the form page and the form element and the correspondence relationship between the form element and the page rendering template, the dynamic generation and update of the form page is realized, the problem that the form page cannot be dynamically modified is solved, and the front-end form page can be modified in real time without stopping the system, and the use of the user is not affected; at the same time, the problem that the structure of the back-end database and the operation code of the back-end database need to be changed after the front-end form page is modified is solved, and the effect that the structure and operation code of the database do not need to be modified after the form page is modified is achieved, thereby ensuring the stability and continuity of the database service and improving data security.

[0154] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data interaction method based on a form page, characterized in that: include: In response to receiving a form page access request, obtaining a form page identifier from the access request; Acquire at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted according to the form data input item, and the form element has an element type; For each form element, obtaining a page rendering template corresponding to the form element according to the element type of the form element; Each form element is rendered according to the page rendering template corresponding to each form element to generate a form page, and data interaction is performed with the user through the generated form page.

2. The method according to claim 1, characterized in that: Before acquiring at least one form element associated with the form page according to the form page identifier, the method further includes: Abstracting each form data input item included in the form page into a single form element, and establishing an association relationship between the form page and the form element, wherein the element information of each form element includes an element type corresponding to the form element; For each form element, a page rendering template corresponding to the element type is obtained according to the element type corresponding to the form element, and a corresponding relationship between the form element and the page rendering template is established.

3. The method according to claim 1 or 2, characterized in that: The element information of each form element is stored as a data record in a row of the database.

4. The method according to claim 1, characterized in that: Interact with users through the generated form page, including: In response to receiving a user's instruction to add data to the form page, acquiring the user's input data, the input data including a data identifier; Extracting element values ​​corresponding to various form elements included in the form page from the input data; For each form element, the element information of the form element, the element value of the form element and the data identifier are stored as a data record in a row of a database.

5. The method according to claim 1 or 4, characterized in that: Interact with users through the generated form page, including: In response to receiving a data query instruction from a user on the form page, obtaining a data identifier of the form data to be queried; Acquire element information and element value of each form element corresponding to the form data to be queried according to the data identifier, wherein the element information of the form element includes an element name; Generate a header of the query result according to the element name of each form element; Generate a query result of the form data to be queried according to the table header and the element value of each form element.

6. The method according to claim 5, characterized in that After generating the query result of the form data to be queried, the method further includes: Generate operation prompt information for the query result, so that the user can operate the novelty search result according to the prompt information.

7. The method according to claim 6, characterized in that The operation prompt information includes an instruction for generating a data update operation and / or an instruction for generating a data deletion operation.

8. A data interaction device based on a form page, characterized in that: include: An access request processing module, configured to, in response to receiving a form page access request, obtain a form page identifier from the access request; A form element acquisition module, used for acquiring at least one form element associated with the form page according to the form page identifier, wherein the form element is abstracted according to the form data input item, and the form element has an element type; A rendering template acquisition module is used to acquire, for each form element, a page rendering template corresponding to the form element according to the element type of the form element; The page generation and display module is used to render each form element according to the page rendering template corresponding to each form element to generate a form page, and to interact with the user through the generated form page.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.