Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main flow of a page form generating method according to an embodiment of the present invention, and as shown in fig. 1, the page form generating method according to the embodiment of the present invention mainly includes:
Step S101, receiving a page form generation request, and generating a form number when the page form generation request does not contain user form configuration information, wherein the page form generation request contains a form type.
Specifically, according to the embodiment of the invention, after receiving the page form generation request, whether the page form generation request includes the user form configuration information is firstly judged, and the user form configuration information includes the form component type indicated by the user and the form data in each form component, so that the corresponding page form can be generated by directly rendering the user form configuration information subsequently. If the user form configuration information does not exist, then the FaaS functions are required to be associated later, the platform form configuration information is obtained from a FaaS (Function AS A SERVICE ) Function platform, and then the page form is generated. The embodiment of the invention provides two page form generation methods, namely, one is that a user transmits full data (user form configuration information) by himself when initiating a page form generation request, and the other is that a FaaS platform is combined to dynamically generate a page form, and through the arrangement, the page form generation efficiency is improved, the application scene of the page form generation method is expanded, and the user experience is improved.
According to a specific implementation of the embodiment of the invention, for the received page form generation request, a unique form number is generated so as to facilitate the subsequent acquisition of corresponding platform form configuration information from FaaS functions according to the form number and the form type association FaaS functions in the page form generation request, so as to generate the page form.
Step S102, according to the form number and the form type, obtaining platform form configuration information from FaaS function platforms.
Specifically, according to an embodiment of the present invention, the step of obtaining platform form configuration information from FaaS function platforms according to the form number and the form type includes:
determining a target form submitting function and a target form inquiring function according to the form numbers and the form types;
And obtaining platform form configuration information from FaaS function platforms according to the target form submitting function, the target form inquiring function, the form submitting function interface parameter and the form inquiring function interface parameter, wherein the platform form configuration information comprises target parameter fields and corresponding target simulation data.
According to the embodiment of the invention, for each form number, corresponding FaaS functions (a target form submitting function and a target form inquiring function) can be determined according to the corresponding form type, and further platform form configuration information is obtained from the FaaS function platform through form submitting function interface parameters and form inquiring function interface parameters. Through the arrangement, the technical problem of high cost for generating the page form due to writing of the form codes is avoided, the efficiency, accuracy and matching degree (matching degree between the generated page form and the user requirement) of acquiring the form configuration information are improved, and the user experience is improved.
Further, according to an embodiment of the present invention, before the step of obtaining the platform form configuration information from the FaaS function platform, the method further includes:
Creating a form submitting function by utilizing a FaaS function platform, and configuring parameter fields corresponding to the form submitting function;
And receiving FaaS form submitting function interface parameters and form inquiring function interface parameters sent by the function platform.
Specifically, according to the embodiment of the present invention, at FaaS, the function platform may create FaaS functions (form submission functions and form query functions) for a plurality of different form types, respectively, to meet the diversity requirements of users.
And step S103, analyzing the platform form configuration information, and rendering the analysis result to obtain the page form.
Specifically, according to an embodiment of the present invention, the steps of analyzing the platform form configuration information and rendering the analysis result to obtain the page form include:
And analyzing the target parameter field and the target simulation data in the platform form configuration information, and rendering an analysis result to obtain a page form, wherein the analysis result indicates the form component type corresponding to the target simulation data.
For example, the platform form configuration information obtained from the FaaS function platform includes the target parameter field and the target simulation data corresponding to the target parameter field, and the form component type corresponding to the target simulation data is not limited, so that the target parameter field and the target simulation data in the platform form configuration file can be analyzed according to the value analysis rule, the corresponding form component type is determined according to the data value type of the target simulation data, and then the page form is obtained through rendering.
Further, according to an embodiment of the present invention, the user form configuration information includes a form component type and form data in each form component, and after the step of receiving the page form generation request, if it is determined that the page form generation request includes the user form configuration information, the method further includes:
and rendering the user form configuration information to obtain the page form.
Because the form component types and the form data in each form component are directly transmitted in the user form configuration information, the form data can be directly rendered to obtain a page form, and the generation efficiency of the page form is further improved.
Preferably, according to an embodiment of the present invention, the method further includes:
And receiving the user form configuration updating information, and updating the page form according to the user form configuration updating information.
Through the setting, the invention also supports the page form updating function, and can carry out adaptive updating on the generated page form directly according to the user form configuration updating information sent by the user, thereby further improving the user experience.
According to the technical scheme, the technical problems that the cost development cost is high, the generation efficiency of the page form is low, the application scene of the page form generation method is narrow and the user experience is poor are solved, the technical problems that the FaaS function platform can be combined, the dynamic generation of the form configuration information is realized, the page form generation method is rendered and generated, the generation efficiency of the page form is improved, the development cost of the page form is reduced, the application scene of the page form generation method is expanded, and the technical effect of user experience is improved are solved.
Fig. 2a is a schematic diagram of main flow of a page form generating method according to another embodiment of the present invention, and as shown in fig. 2a, the page form generating method according to the embodiment of the present invention mainly includes:
And step S201, creating a form submitting function by using the FaaS function platform, configuring parameter fields corresponding to the form submitting function, creating a form inquiring function by using the FaaS function platform, and configuring simulation data corresponding to the parameter fields in the form inquiring function.
Specifically, according to the embodiment of the present invention, at FaaS, the function platform may create FaaS functions (form submission functions and form query functions) for a plurality of different form types, respectively, to meet the diversity requirements of users.
According to one embodiment of the invention, a form submit function is created at FaaS on the function platform, and further parameters fields, such as name and age, are configurable, then a form query function is created at FaaS on the function platform, and the parameters are configured for the form query function as follows:
Name:string
Age:number
Then, for the data type corresponding to the parameter field, the simulation data is configured, for example:
Name, 'Zhang Sano'
Age:‘18’
And meanwhile, determining the form submitting function interface information and the form inquiring function interface information.
Step S202, receiving FaaS form submitting function interface parameters and form inquiring function interface parameters sent by the function platform.
Through the setting, after a page form generation request is received subsequently and is associated to FaaS functions according to the form numbers and the form types, corresponding platform form configuration information can be acquired from the FaaS function platform according to the form submitting function interface parameters and the form inquiring function interface parameters, and then the page form is generated.
Step S203, receiving a page form generation request and generating a form number.
According to a specific implementation of the embodiment of the invention, for the received page form generation request, a unique form number is generated so as to facilitate the subsequent acquisition of corresponding platform form configuration information from FaaS functions according to the form number and the form type association FaaS functions in the page form generation request, so as to generate the page form.
Step S204, judging whether the page form generation request comprises user form configuration information. If not, the step S205 is executed if the page form generation request does not include the user form configuration information, and if yes, the step S208 is executed if the page form generation request includes the user form configuration information.
Specifically, according to the embodiment of the invention, after receiving the page form generation request, whether the page form generation request includes the user form configuration information is firstly judged, and the user form configuration information includes the form component type indicated by the user and the form data in each form component, so that the corresponding page form can be generated by directly rendering the user form configuration information subsequently. If the user form configuration information does not exist, then the FaaS functions are required to be associated later, the platform form configuration information is obtained from a FaaS (Function AS A SERVICE ) Function platform, and then the page form is generated. The embodiment of the invention provides two page form generation methods, namely, one is that a user transmits full data (user form configuration information) by himself when initiating a page form generation request, and the other is that a FaaS platform is combined to dynamically generate a page form, and through the arrangement, the page form generation efficiency is improved, the application scene of the page form generation method is expanded, and the user experience is improved.
Step S205, determining a target form submitting function and a target form inquiring function according to the form numbers and the form types.
According to the embodiment of the invention, for each form number, a corresponding FaaS function (a target form submitting function and a target form querying function) can be determined according to the corresponding form type, and further, for each form number, a corresponding FaaS function (a target form submitting function and a target form querying function) can be determined according to the corresponding form type according to the embodiment of the invention.
Step S206, obtaining platform form configuration information from FaaS function platforms according to the target form submitting function, the target form inquiring function, the form submitting function interface parameter and the form inquiring function interface parameter, wherein the platform form configuration information comprises target parameter fields and corresponding target simulation data.
Through the arrangement, the technical problem of high cost for generating the page form due to writing of the form codes is avoided, the efficiency, accuracy and matching degree (matching degree between the generated page form and the user requirement) of acquiring the form configuration information are improved, and the user experience is improved.
Step S207, analyzing the target parameter field and the target simulation data in the platform form configuration information, and rendering the analysis result to obtain the page form.
For example, the platform form configuration information obtained from the FaaS function platform includes the target parameter field and the target simulation data corresponding to the target parameter field, and the form component type corresponding to the target simulation data is not limited, so that the target parameter field and the target simulation data in the platform form configuration file can be analyzed according to the value analysis rule, the corresponding form component type is determined according to the data value type of the target simulation data, and then the page form is obtained through rendering.
According to an embodiment of the present invention, a value parsing rule (mockdata parsing) is adopted for the platform form configuration information, taking a data value type "string" as an example. As shown in FIG. 2b, regular matching is performed on string type simulation data, if the matching result is matched with the date, the form component type corresponding to the part of simulation data is determined to be a date selector, if the matching result display data is longer, a plurality of lines of text box form components are determined, and if the matching result display data is shorter, a single line of text boxes are determined. Where the decision criteria for more or less data is determined by the amount of data that can be accommodated by a single line of text boxes.
And step S208, rendering the user form configuration information to obtain a page form.
Because the form component types and the form data in each form component are directly transmitted in the user form configuration information, the form data can be directly rendered to obtain a page form, and the generation efficiency of the page form is further improved.
Further, according to an embodiment of the present invention, the method further includes:
And receiving the user form configuration updating information, and updating the page form according to the user form configuration updating information.
Through the setting, the invention also supports the page form updating function, and can carry out adaptive updating on the generated page form directly according to the user form configuration updating information sent by the user, thereby further improving the user experience.
Illustratively, the above-described rendering operations may be implemented by a form rendering engine (drip-form), or any scheme that configures forms in json, in accordance with embodiments of the present invention.
According to the technical scheme, the technical problems that the cost development cost is high, the generation efficiency of the page form is low, the application scene of the page form generation method is narrow and the user experience is poor are solved, the technical problems that the FaaS function platform can be combined, the dynamic generation of the form configuration information is realized, the page form generation method is rendered and generated, the generation efficiency of the page form is improved, the development cost of the page form is reduced, the application scene of the page form generation method is expanded, and the technical effect of user experience is improved are solved.
Fig. 3 is a schematic diagram of main modules of a page form generating device according to an embodiment of the present invention, and as shown in fig. 3, a page form generating device 300 according to an embodiment of the present invention mainly includes:
The receiving module 301 is configured to receive a page form generation request, and generate a form number when it is determined that the page form generation request does not include user form configuration information, where the page form generation request includes a form type.
Specifically, according to the embodiment of the invention, after receiving the page form generation request, whether the page form generation request includes user form configuration information is first determined. If the user form configuration information does not exist, then the FaaS functions are required to be associated later, the platform form configuration information is obtained from the FaaS function platform, and then the page form is generated. Through the arrangement, the page form generation efficiency is improved, the application scene of the page form method is expanded, and the user experience is improved.
According to a specific implementation of the embodiment of the invention, for the received page form generation request, a unique form number is generated so as to facilitate the subsequent acquisition of corresponding platform form configuration information from FaaS functions according to the form number and the form type association FaaS functions in the page form generation request, so as to generate the page form.
And the obtaining module 302 is configured to obtain platform form configuration information from the FaaS function platform according to the form number and the form type.
Specifically, according to an embodiment of the present invention, the acquiring module 302 is further configured to:
determining a target form submitting function and a target form inquiring function according to the form numbers and the form types;
And obtaining platform form configuration information from FaaS function platforms according to the target form submitting function, the target form inquiring function, the form submitting function interface parameter and the form inquiring function interface parameter, wherein the platform form configuration information comprises target parameter fields and corresponding target simulation data.
According to the embodiment of the invention, for each form number, corresponding FaaS functions (a target form submitting function and a target form inquiring function) can be determined according to the corresponding form type, and further platform form configuration information is obtained from the FaaS function platform through form submitting function interface parameters and form inquiring function interface parameters. Through the arrangement, the technical problem of high cost for generating the page form due to writing of the form codes is avoided, the efficiency, accuracy and matching degree (matching degree between the generated page form and the user requirement) of acquiring the form configuration information are improved, and the user experience is improved.
Further, according to an embodiment of the present invention, the page form generating device 300 further includes a function creating module, before the step of obtaining the platform form configuration information from the FaaS function platform, the function creating module is configured to:
Creating a form submitting function by utilizing a FaaS function platform, and configuring parameter fields corresponding to the form submitting function;
And receiving FaaS form submitting function interface parameters and form inquiring function interface parameters sent by the function platform.
Specifically, according to the embodiment of the present invention, at FaaS, the function platform may create FaaS functions (form submission functions and form query functions) for a plurality of different form types, respectively, to meet the diversity requirements of users.
The page generating module 303 is configured to parse the platform form configuration information, and render the parsing result to obtain a page form.
Specifically, according to an embodiment of the present invention, the page generation module 303 is further configured to:
And analyzing the target parameter field and the target simulation data in the platform form configuration information, and rendering an analysis result to obtain a page form, wherein the analysis result indicates the form component type corresponding to the target simulation data.
For example, the platform form configuration information obtained from the FaaS function platform includes the target parameter field and the target simulation data corresponding to the target parameter field, and the form component type corresponding to the target simulation data is not limited, so that the target parameter field and the target simulation data in the platform form configuration file can be analyzed according to the value analysis rule, the corresponding form component type is determined according to the data value type of the target simulation data, and then the page form is obtained through rendering.
Further, according to the embodiment of the present invention, the user form configuration information includes a form component type and form data in each form component, and after the step of receiving the page form generation request, if it is determined that the page form generation request includes the user form configuration information, the page generation module 303 is further configured to:
and rendering the user form configuration information to obtain the page form.
Because the form component types and the form data in each form component are directly transmitted in the user form configuration information, the form data can be directly rendered to obtain a page form, and the generation efficiency of the page form is further improved.
Preferably, according to an embodiment of the present invention, the page form generating device 300 further includes an updating module, configured to:
And receiving the user form configuration updating information, and updating the page form according to the user form configuration updating information.
Through the setting, the invention also supports the page form updating function, and can carry out adaptive updating on the generated page form directly according to the user form configuration updating information sent by the user, thereby further improving the user experience.
According to the technical scheme, the technical problems that the cost development cost is high, the generation efficiency of the page form is low, the application scene of the page form generation method is narrow and the user experience is poor are solved, the technical problems that the FaaS function platform can be combined, the dynamic generation of the form configuration information is realized, the page form generation method is rendered and generated, the generation efficiency of the page form is improved, the development cost of the page form is reduced, the application scene of the page form generation method is expanded, and the technical effect of user experience is improved are solved.
Fig. 4 illustrates an exemplary system architecture 400 to which the page form generating method or page form generating apparatus of embodiments of the present invention may be applied.
As shown in fig. 4, a system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405 (this architecture is merely an example, and the components contained in a particular architecture may be tailored to the application specific case). The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various communication client applications, such as a data processing class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a server (by way of example only) that utilizes terminal devices 401, 402, 403 (performs page form generation/data processing) for a user. The server may analyze and process the received data such as the page form generation request, and feed back the processing result (e.g., the page form—only an example) to the terminal device.
It should be noted that, the page form generating method provided in the embodiment of the present invention is generally executed by the server 405, and accordingly, the page form generating device is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing a terminal device or server in accordance with an embodiment of the present invention. The terminal device or server shown in fig. 5 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Connected to the I/O interface 505 are an input section 506 including a keyboard, a mouse, and the like, an output section 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like, a storage section 508 including a hard disk, and the like, and a communication section 509 including a network interface card such as a LAN card, a modem, and the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
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 two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, a processor may be described as including a receiving module, an obtaining module, and a page generating module. The names of these modules do not limit the module itself in some cases, for example, the receiving module may also be described as "a module for receiving a page form generation request, determining that the page form generation request does not include user form configuration information, and generating a form number".
As a further aspect, the invention also provides a computer readable medium which may be comprised in the device described in the above embodiments or may be present alone without being fitted into the device. The computer readable medium carries one or more programs, and when the one or more programs are executed by the equipment, the equipment comprises a step of receiving a page form generation request, and generating a form number when the page form generation request does not comprise user form configuration information, wherein the page form generation request comprises a form type, a step of acquiring platform form configuration information from a FaaS function platform according to the form number and the form type, and a step of analyzing the platform form configuration information and rendering analysis results to obtain a page form.
According to the technical scheme, the technical problems that the cost development cost is high, the generation efficiency of the page form is low, the application scene of the page form generation method is narrow and the user experience is poor are solved, the technical problems that the FaaS function platform can be combined, the dynamic generation of the form configuration information is realized, the page form generation method is rendered and generated, the generation efficiency of the page form is improved, the development cost of the page form is reduced, the application scene of the page form generation method is expanded, and the technical effect of user experience is improved are solved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.