Web page form automatic generation method, device, medium, equipment and program product

By automatically generating web forms, the reflection ability of preset form structure description protocol and programming language is solved, and the problem of insufficient development resources of the backend management system and inconsistent technology stack is achieved, rapid development and high-quality web forms are achieved, and the Maintenance process.

CN114327463BActive Publication Date: 2025-01-07ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111679296.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-01-07
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In the prior art, the development time and resources of the backend management system are insufficient, and due to inconsistent technology stacks, the web development effect is poor, the learning cost is high, and it is difficult to quickly adapt to the needs of microservice systems and agile development.

Method used

By automatically generating web forms, form description information is collected, form elements are generated according to the preset form structure description protocol, and function modules are displayed on the web page to realize automatic rendering and verification, and the reflection ability of the programming language is used to automatically execute function functions. Returns the execution result.

Benefits of technology

It improves the speed and quality of backend management system development, lowers the user experience threshold, simplifies the maintenance process, avoids inconsistencies between form and server function functions, and realizes automatic adaptation to function function modification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327463B_ABST
    Figure CN114327463B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, medium, device and program product for automatically generating a web page form. The method for automatically generating a web page form provided in the embodiment of the present application collects form description information of a web page, then generates corresponding form elements according to a preset form structure description protocol and the form description information, and then generates a web page form of the web page according to the form elements, thereby realizing automatic generation of a page form.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of web page development, and in particular to a method, device, medium, equipment and program product for automatically generating a web page form. Background Art

[0002] At present, with the rapid development of Internet technology, many systems generally come with a background management system for server-side technicians to perform operations such as querying some data and repairing abnormal data.

[0003] In the existing technology, developers need to develop the backend management system separately for each project's needs. However, with the development of microservice systems and the practice of agile development, the system development process is becoming faster and faster, and there is insufficient time, personnel and other resources to develop this backend management system. On the other hand, developing web pages is also difficult for technical staff on the server side. In addition, due to different technology stacks, the learning cost is relatively high, and the effects of the developed web pages vary greatly.

[0004] Therefore, there is an urgent need for a backend management system web form development method that can effectively improve the speed and quality of development. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, medium, device and program product for automatically generating a web form for a background management system, so as to improve the speed and quality of the background management system development.

[0006] In a first aspect, an embodiment of the present application provides a method for automatically generating a webpage form, comprising:

[0007] Collecting form description information of a web page, wherein the form description information includes function information of a function, and the function is used to support a corresponding function of the web page;

[0008] Generate corresponding form elements according to a preset form structure description protocol and the form description information, wherein the preset form structure description protocol is used to agree on the relationship between function functions and function modules, and the form elements are used to display the function modules on the web page;

[0009] A webpage form of the webpage is generated according to the form elements.

[0010] In a possible design, the form description information of the collected webpage includes:

[0011] After the server is started, the web page is scanned and the form description information is collected.

[0012] In a possible design, generating corresponding form elements according to a preset form structure description protocol and the form description information includes:

[0013] Pulling the preset form structure description protocol in the server;

[0014] The corresponding form structure is rendered according to the preset form structure description protocol and the form description information to generate the form element.

[0015] In a possible design, after generating the webpage form of the webpage according to the form elements, the method further includes:

[0016] Obtaining input information entered into the webpage form;

[0017] Verifying the input information according to the preset form structure description protocol, wherein the preset form structure description protocol is also used to stipulate the format standard of the input information corresponding to each form element;

[0018] If the verification passes, the web form is submitted.

[0019] In a possible design, after submitting the webpage form, the method further includes:

[0020] After receiving the webpage form, the server executes the function in the form description information according to the reflection capability provided by the programming language;

[0021] Return the execution result to the web page.

[0022] The web page is rendered according to the execution result and displayed on the web page as a response result to the input information.

[0023] In a possible design, the preset form structure description protocol includes: the function name of the function function, the parameters of the function function, and the characteristic information of the parameters of the function function; the characteristic information of the parameters of the function function includes: parameter type, parameter requirements and parameter range.

[0024] In a second aspect, an embodiment of the present application provides a device for automatically generating a webpage form, comprising:

[0025] A scanning module, used to collect form description information of a web page, wherein the form description information includes function information of a function, and the function is used to support a corresponding function of the web page;

[0026] A processing module, used to generate corresponding form elements according to a preset form structure description protocol and the form description information, wherein the preset form structure description protocol is used to agree on the relationship between a function function and a function module, and the form element is used to display the function module on a web page;

[0027] A rendering module is used to generate a web page form of the web page according to the form elements.

[0028] In a possible design, the scanning module is specifically used for:

[0029] After the server is started, the web page is scanned and the form description information is collected.

[0030] In a possible design, generating corresponding form elements according to a preset form structure description protocol and the form description information includes:

[0031] Pulling the preset form structure description protocol in the server;

[0032] The corresponding form structure is rendered according to the preset form structure description protocol and the form description information to generate the form element.

[0033] In a possible design, the processing module is further specifically used for:

[0034] Obtaining input information entered into the webpage form;

[0035] Verifying the input information according to the preset form structure description protocol, wherein the preset form structure description protocol is also used to stipulate the format standard of the input information corresponding to each form element;

[0036] If the verification passes, the web form is submitted.

[0037] In a possible design, the webpage form automatic generation device further includes: an execution module, specifically used to:

[0038] After receiving the webpage form, the server executes the function in the form description information according to the reflection capability provided by the programming language;

[0039] Return the execution result to the web page.

[0040] The web page is rendered according to the execution result and displayed on the web page as a response result to the input information.

[0041] In a possible design, the preset form structure description protocol includes: the function name of the function function, the parameters of the function function, and the characteristic information of the parameters of the function function; the characteristic information of the parameters of the function function includes: parameter type, parameter requirements and parameter range.

[0042] In a third aspect, an embodiment of the present application further provides an electronic device, including:

[0043] Processor; and

[0044] a memory for storing a computer program for the processor;

[0045] The processor is configured to implement any one of the methods for automatically generating a web page form in the first aspect by executing the computer program.

[0046] In a fourth aspect, an embodiment of the present application further provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements any one of the methods for automatically generating a web page form in the first aspect.

[0047] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the methods for automatically generating a web page form in the first aspect.

[0048] The embodiments of the present application provide a method, apparatus, medium, device and program product for automatically generating a web page form. The method collects form description information of a web page, generates corresponding form elements according to a preset form structure description protocol and the form description information, and then generates a web page form of the web page according to the form elements, thereby automatically generating a page form. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0050] Figure 1 is a flow chart of a method for automatically generating a webpage form according to an exemplary embodiment of the present application;

[0051] Figure 2 is a flow chart of a method for automatically generating a webpage form according to an exemplary embodiment of the present application;

[0052] Figure 3 yes Figure 2 A schematic diagram of the effect of the automatically generated web page form in the embodiment shown;

[0053] Figure 4 is a structural schematic diagram of a device for automatically generating a webpage form according to an exemplary embodiment of the present application;

[0054] Figure 5 is a structural schematic diagram of a device for automatically generating a webpage form according to another exemplary embodiment of the present application;

[0055] Figure 6 It is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0057] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0058] At present, with the rapid development of Internet technology, many systems generally come with a background management system for service-side technicians to perform operations such as querying some data and repairing abnormal data. In the prior art, developers need to develop a separate background management system for each project's needs. However, with the development of microservice systems and the practice of agile development, the system development process is becoming faster and faster, and there are insufficient resources such as time and personnel to develop this background management system. On the other hand, developing web pages is also difficult for service-side technicians. In addition, due to different technology stacks, the learning cost is relatively high, and the effects of the developed web pages vary greatly.

[0059] As for the development method of web forms for backend management systems, there are generally several ways to solve it:

[0060] Method 1: Implement it by providing a network interface. Specifically, the backend management system page is discarded, and only the corresponding network interface is left. When it is used, the interface is called through the command line to achieve the expected effect. This method does not require high requirements for developers, but it requires high requirements for users, who need to know clearly how to use the interface. However, it is also inconvenient for subsequent maintenance, and detailed usage documents need to be maintained for team members to review.

[0061] Method 2: Design the web form system in a visual way. Specifically, some technicians have developed a visual web design platform, which can design the web form system in a visual way, and the design result of the web page is used as the structure of the form. Although this method solves certain problems, it also has corresponding limitations: the web form designed by visual design needs to be designed according to the server interface, which has a certain communication cost. In addition, it is likely that the corresponding problems will be caused by the mismatch between the web page and the interface, resulting in unexpected results. When the server interface changes, the page also needs to be adjusted accordingly, which requires a higher cost.

[0062] The embodiment of the present application aims to provide a method for developing web forms for a backend management system that can effectively improve the speed and quality of development. Specifically, it provides a method for automatically generating web forms for a backend management system. It can be that the commonly used form elements of the relevant management system are standardized and agreed upon as a form structure description protocol. This protocol describes the function name of each function in the server, the parameters of the function, and the characteristic information of the parameters of the function, wherein the characteristic information of the parameters of the function includes: parameter type, parameter requirements, and parameter range. Specifically, this protocol describes the unique name of each function in the server, all required parameters, and specific information of each parameter: parameter type, parameter requirements, range or enumeration of allowed values ​​for the parameter, and whether the parameter is required. Based on this information, the web page can infer how the form is rendered, thereby achieving the purpose of automatically generating the form.

[0063] On the server side, the protocol can be automatically extracted, so that when the system starts, the form description information of the web page can be automatically scanned and collected, that is, the protocol content of the functions in the project can be collected and summarized.

[0064] In addition, the automatic rendering of the management system form page can also be realized. Specifically, when the web page is started, a request for obtaining the form structure description protocol content will be sent to the server, and then the corresponding input box, selection box and other form elements will be rendered on the page according to the protocol content, and the form can be verified according to the description of the protocol.

[0065] In addition, the server can also realize the automatic execution of web page operations. Specifically, after receiving the form submission, the corresponding function of the form is automatically executed by using the reflection and other related capabilities provided by the programming language, and the result is returned to the web page, so as to achieve the purpose of automatic execution. Among them, the reflection provided by the programming language is to self-check at runtime and operate on internal members. That is to say, the type of this variable can be changed dynamically, and its function can be determined at runtime. Many high-level programming languages ​​have these mechanisms.

[0066] In summary, the present application aims to provide a method, device, medium, equipment and program product for automatically generating web page forms, which can automatically generate page forms. Compared with the formless solution of the above-mentioned method one, the user experience is better, the threshold for use is lower, and the subsequent maintenance is simpler. Compared with the above-mentioned method two, a fixed protocol is agreed upon in the embodiment of the present application. There is a unified description protocol on the web page and the server. On the basis of this protocol, the protocol can be automatically generated according to the server code, and the web page form can be automatically generated and rendered by the protocol, which can avoid the inconsistency between the form and the server function function. Secondly, after the server function function is modified, the web page does not need to be modified and can automatically adapt to the modification, which also avoids the inconsistency between the web page form and the server function function.

[0067] Figure 1 FIG. 1 is a flow chart of a method for automatically generating a web page form according to an exemplary embodiment of the present application. Figure 1 The method for automatically generating a webpage form provided in this embodiment includes:

[0068] Step 101: Collect form description information of the web page.

[0069] In this step, the form description information of the web page is collected, wherein the form description information includes function information of the function function, and the function function is used to support the corresponding function of the web page. Specifically, when the system is started, the form description information of the web page is automatically scanned and collected, that is, the protocol content of the function in the project is collected and summarized.

[0070] Step 102: Generate corresponding form elements according to the preset form structure description protocol and form description information.

[0071] Specifically, corresponding form elements can be generated according to a preset form structure description protocol and form description information. The preset form structure description protocol is used to agree on the relationship between functional functions and functional modules. The form elements generated after rendering are used to display functional modules on the web page. For example, a form selection area, a form content area, a form submission button, and an execution result display area are generated after rendering.

[0072] It is worth noting that the preset form structure description protocol includes: the function name of the function, the parameters of the function, and the characteristic information of the parameters of the function; the characteristic information of the parameters of the function includes: parameter type, parameter requirements, and parameter range. Specifically, this protocol describes the unique name of each function in the server, all required parameters, and specific information of each parameter: parameter type, parameter requirements, parameter allowed value range or enumeration, whether the parameter is required. Based on this information, the web page can infer how the form is rendered, thereby achieving the purpose of automatically generating the form.

[0073] Step 103: Generate a web form of the web page according to the form elements.

[0074] Then, after generating corresponding form elements according to the preset form structure description protocol and form description information, continue to generate the web form of the web page according to the form elements. Specifically, when the web page is started, a request to obtain the content of the form structure description protocol will be initiated to the server, and then, corresponding input boxes, selection boxes and other form elements are rendered on the page according to the content of the protocol, and the web form of the web page is generated according to the form elements.

[0075] In this embodiment, by collecting the form description information of the web page, then generating the corresponding form elements according to the preset form structure description protocol and the form description information, and then generating the web form of the web page according to the form elements, the page form can be automatically generated. Compared with the formless solution of the above-mentioned method 1, the user experience is better, the threshold for use is lower, and the subsequent maintenance is also simpler. Compared with the above-mentioned method 2, a fixed protocol is agreed upon in the embodiment of the present application. There is a unified description protocol on the web page side and the server side. On the basis of this protocol, the protocol can be automatically generated according to the server code, and the web form can be automatically generated and rendered by the protocol, which can avoid the inconsistency between the form and the server function function. Secondly, after the server function function is modified, the web page side does not need to be modified and can automatically adapt to the modification, which also avoids the inconsistency between the web page form and the server function function.

[0076] Figure 2 FIG. 1 is a flow chart of a method for automatically generating a web page form according to an exemplary embodiment of the present application. Figure 2 As shown, the method for automatically generating a webpage form provided in this embodiment includes:

[0077] Step 201: After the server is started, the web page is scanned and form description information is collected.

[0078] Step 202: Pull the preset form structure description protocol in the server.

[0079] Step 203: Render the corresponding form structure according to the preset form structure description protocol and the form description information to generate form elements.

[0080] In step 201-step 203, after the server is started, the form description information of the web page is automatically scanned and collected, that is, the protocol content of the function in the project is collected and summarized. Then, the preset form structure description protocol in the server is pulled. The corresponding form elements can be generated according to the preset form structure description protocol and the form description information. The preset form structure description protocol is used to agree on the relationship between the function function and the function module, wherein the form elements generated after rendering are used to display the function module on the web page, for example, after rendering, a form selection area, a form content area, a form submission button, and an execution result display area are generated.

[0081] It is worth noting that the preset form structure description protocol includes: the function name of the function, the parameters of the function, and the characteristic information of the parameters of the function; the characteristic information of the parameters of the function includes: parameter type, parameter requirements, and parameter range. Specifically, this protocol describes the unique name of each function in the server, all required parameters, and specific information of each parameter: parameter type, parameter requirements, parameter allowed value range or enumeration, whether the parameter is required. Based on this information, the web page can infer how the form is rendered, thereby achieving the purpose of automatically generating the form.

[0082] Step 204: Obtain input information entered into the webpage form.

[0083] Step 205: Verify the input information according to the preset form structure description protocol.

[0084] Step 206: If the verification passes, submit the web form.

[0085] In step 204 to step 206, the input information may be verified according to a preset form structure description protocol. The preset form structure description protocol is also used to stipulate the format standard of the input information corresponding to each form element.

[0086] in, Figure 3 yes Figure 2 The effect diagram of the automatically generated web page form in the embodiment shown is as follows. Figure 3As shown, the generated web form mainly includes: form selection area, form content area, form submission button, and execution result display area.

[0087] Among them, you can enter the mobile phone number in the input box corresponding to the mobile phone number, and the input mobile phone number will be verified according to the preset form structure description protocol. Specifically, in the preset form structure description protocol, the fixed length and format of the mobile phone number can be agreed upon. If the content entered in the input box corresponding to the mobile phone number meets the fixed length and format requirements in the preset form structure description protocol, the verification passes. At this time, after clicking the Submit button, you can successfully submit the web form. If the content entered in the input box corresponding to the mobile phone number does not meet the fixed length and format requirements in the preset form structure description protocol, the verification fails. At this time, even after clicking the Submit button, you cannot submit the web form.

[0088] Step 207: Execute the function in the form description information according to the reflection capability provided by the programming language.

[0089] After receiving the web form, the server can execute the function in the form description information according to the reflection capability provided by the programming language. Specifically, after receiving the form submission, the server can use the reflection and other related capabilities provided by the programming language to automatically execute the function corresponding to the form and return the result to the web page, so as to achieve the purpose of automatic execution. Among them, the reflection provided by the programming language is to self-check at runtime and operate on internal members. That is to say, the type of this variable can be changed dynamically, and its function can be determined at runtime. Many high-level programming languages ​​have these mechanisms.

[0090] Step 208: Return the execution result to the web page.

[0091] Step 209: The web page renders according to the execution result and displays it on the web page as a response result to the input information.

[0092] In step 208-step 209, after executing the functional functions in the form description information according to the reflection capability provided by the programming language, an execution result is generated, and the execution result is returned to the web page so that the web page can render according to the execution result and display it in the web page as a response result to the input information.

[0093] In this embodiment, the function of the server can be written first, and after the server is started, the server protocol is automatically scanned and the corresponding form elements are generated. Then, when the web page is opened, the function of the server function is pulled to describe the protocol content, and the protocol is described according to the preset form structure, the corresponding form structure is rendered, and the form content is verified according to the expression, and after the form is submitted, the server can receive the form submission and execute it, wherein the server automatically executes the relevant function according to the reflection ability provided by the programming language, and finally, the execution result is returned to the web page, and the web page renders the submission result information of the form. It can be seen that in the embodiment, the preset form structure description protocol is used to standardize and protocolize the form function description required by the management system web page, so that the unique name of the function in the server described by the protocol, all required parameters, and specific information of each parameter: parameter type, parameter requirements, parameter allowed value range or enumeration, whether the parameter is necessary, the web page can infer how the form is rendered, thereby achieving the purpose of automatically generating the form. In addition, the server protocol also realizes automatic extraction, specifically, when the system is started, the protocol content of the function in the project is automatically collected and summarized. It also implements automatic rendering of the management system form page. Specifically, when the web page starts, it will initiate a request to the server to obtain the form structure description protocol content. After that, the corresponding input box, selection box and other form elements are rendered on the page according to the protocol content, and the form can be verified according to the protocol description. Finally, the server can also implement automatic execution. After receiving the form submission, the server uses the reflection and other related capabilities provided by the programming language to automatically execute the function corresponding to the form and return the result to the web page, thereby achieving the purpose of automatic execution.

[0094] Figure 4 FIG. 1 is a schematic diagram of a structure of a device for automatically generating a webpage form according to an exemplary embodiment of the present application. Figure 4 As shown, the web form automatic generation device 300 provided in this embodiment includes:

[0095] Scanning module 301, used to collect form description information of a web page, wherein the form description information includes function information of a function, and the function is used to support a corresponding function of the web page;

[0096] Processing module 302, used to generate corresponding form elements according to a preset form structure description protocol and the form description information, wherein the preset form structure description protocol is used to agree on the relationship between function functions and function modules, and the form elements are used to display the function modules on a web page;

[0097] The rendering module 303 is used to generate a web form of the web page according to the form elements.

[0098] In a possible design, the scanning module 301 is specifically used for:

[0099] After the server is started, the web page is scanned and the form description information is collected.

[0100] In a possible design, generating corresponding form elements according to a preset form structure description protocol and the form description information includes:

[0101] Pulling the preset form structure description protocol in the server;

[0102] The corresponding form structure is rendered according to the preset form structure description protocol and the form description information to generate the form element.

[0103] In a possible design, the processing module 302 is further specifically configured to:

[0104] Obtaining input information entered into the webpage form;

[0105] Verifying the input information according to the preset form structure description protocol, wherein the preset form structure description protocol is also used to stipulate the format standard of the input information corresponding to each form element;

[0106] If the verification passes, the web form is submitted.

[0107] exist Figure 4 Based on the embodiment shown, Figure 5 FIG. 1 is a schematic diagram of a structure of a device for automatically generating a webpage form according to another exemplary embodiment of the present application. Figure 5 As shown, the web form automatic generation device 300 provided in this embodiment further includes: an execution module 304, which is specifically used to:

[0108] After receiving the webpage form, the server executes the function in the form description information according to the reflection capability provided by the programming language;

[0109] Return the execution result to the web page.

[0110] The web page is rendered according to the execution result and displayed on the web page as a response result to the input information.

[0111] In a possible design, the preset form structure description protocol includes: the function name of the function function, the parameters of the function function, and the characteristic information of the parameters of the function function; the characteristic information of the parameters of the function function includes: parameter type, parameter requirements and parameter range.

[0112] The system provided in this embodiment can be used to execute the steps in the above method embodiment. For details not disclosed in the device embodiment of this application, please refer to the method embodiment of this application.

[0113] Figure 6 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. Figure 6 As shown, this embodiment provides an electronic device 400, including:

[0114] Processor 401; and

[0115] A memory 402, used to store executable instructions of the processor, and the memory may also be a flash memory;

[0116] The processor 401 is configured to execute each step in the above method by executing the executable instructions.

[0117] Optionally, the memory 402 may be independent or integrated with the processor 401 .

[0118] When the memory 402 is a device independent of the processor 401, the electronic device 400 may further include:

[0119] The bus 403 is used to connect the processor 401 and the memory 402 .

[0120] This embodiment further provides a readable storage medium, in which a computer program is stored. When at least one processor of an electronic device executes the computer program, the electronic device executes each step in the above method.

[0121] This embodiment also provides a program product, which includes a computer program stored in a readable storage medium. At least one processor of the electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device implements each step in the above method.

[0122] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for automatically generating a web page form, characterized in that: include: Collecting form description information of a web page, wherein the form description information includes function information of a function, and the function is used to support a corresponding function of the web page; Generate corresponding form elements according to a preset form structure description protocol in the server and the form description information, wherein the preset form structure description protocol is used to agree on the relationship between function functions and function modules, and the form elements are used to display the function modules on the web page; Generate a webpage form of the webpage according to the form elements; Obtaining input information entered into the webpage form; Verifying the input information according to the preset form structure description protocol, wherein the preset form structure description protocol is also used to stipulate the format standard of the input information corresponding to each form element; If the verification passes, submit the web form; After submitting the webpage form, the method further includes: after receiving the webpage form, the server executes the function in the form description information according to the reflection capability provided by the programming language; Return the execution result to the web page. The web page is rendered according to the execution result and displayed in the web page as a response result of the input information, wherein the web page and the server have a unified preset form structure description protocol.

2. The method for automatically generating a web form according to claim 1, characterized in that: The form description information of the collected webpage includes: After the server is started, the web page is scanned and the form description information is collected.

3. The method for automatically generating a webpage form according to claim 2, characterized in that: The generating corresponding form elements according to the preset form structure description protocol and the form description information includes: Pulling the preset form structure description protocol in the server; The corresponding form structure is rendered according to the preset form structure description protocol and the form description information to generate the form element.

4. The method for automatically generating a web form according to any one of claims 1 to 3, characterized in that: The preset form structure description protocol includes: the function name of the function function, the parameters of the function function, and the characteristic information of the parameters of the function function; the characteristic information of the parameters of the function function includes: parameter type, parameter requirements and parameter range.

5. A web form automatic generation device, characterized in that: include: A scanning module, used to collect form description information of a web page, wherein the form description information includes function information of a function, and the function is used to support a corresponding function of the web page; A processing module, used to generate corresponding form elements according to a preset form structure description protocol in the server and the form description information, wherein the preset form structure description protocol is used to agree on the relationship between the function function and the function module, and the form element is used to display the function module on the web page; A rendering module, used for generating a web page form of the web page according to the form elements; The processing module is further specifically used to: obtain input information input into the webpage form; Verifying the input information according to the preset form structure description protocol, wherein the preset form structure description protocol is also used to stipulate the format standard of the input information corresponding to each form element; If the verification passes, submit the web form; The webpage form automatic generation device further includes: an execution module, which is specifically used to: after the server receives the webpage form, execute the function in the form description information according to the reflection capability provided by the programming language; Return the execution result to the web page. The web page is rendered according to the execution result and displayed in the web page as a response result of the input information, wherein the web page and the server have a unified preset form structure description protocol.

6. An electronic device comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.

8. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Form configuration method and device

    CN113051269A