Page generation method and device, electronic equipment and storage medium

By parsing and formatting the target page structure template to generate a Hypertext Markup Language file, the problem of complex page development is solved, page generation is achieved automatically, and development efficiency, as well as the readability and scalability of the template, are improved.

CN114764328BActive Publication Date: 2025-11-28BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110045842.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-13
Publication Date
2025-11-28
Estimated Expiration
2041-01-13

AI Technical Summary

Technical Problem

The page development process is complex, requiring users to have strong professional skills, and the parameter configuration page needs to be redeployed when the plugin is upgraded.

Method used

By determining the target page structure template, parsing and formatting the structure to generate a Hypertext Markup Language (HTML) file, and finally rendering the target page, the data is defined using a structured language to simplify page development.

Benefits of technology

It eliminates the need for users to manually develop pages, improving page development efficiency. Furthermore, the page structure templates are easy to write and have good readability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114764328B_ABST
    Figure CN114764328B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a page generation method and device, electronic equipment and storage medium, the method comprising: determining a target page structure template; parsing the target page structure template to obtain a plurality of structure bodies defined in the target page structure template, each structure body corresponding to a page element and each structure body defining attribute data of the corresponding page element; performing format conversion on the plurality of structure bodies to obtain a corresponding hypertext markup language file; and rendering the hypertext markup language file to generate a target page. Thus, a user can automatically generate a page by configuring a page structure template, thereby eliminating the need for the user to develop a page and improving development efficiency in scenarios involving page development.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a page generation method and device, electronic equipment and storage medium. BACKGROUND

[0002] A plug-in is a program written according to a certain application program interface. In a big data platform, a user can develop some plug-ins to process big data job tasks, and the plug-ins developed by the user are referred to as custom plug-ins below.

[0003] When using the custom plug-in, the user needs to configure some parameters (referred to as job parameters) used in a job task, such as a data source, a database, a data table, and the like. Therefore, when developing the custom plug-in, the user also needs to develop a plug-in parameter configuration page to configure the job parameters. Further, when upgrading the developed plug-in, the plug-in parameter configuration page also needs to be redeployed. However, page development is a relatively complex process and requires the user to have excellent professional skills.

[0004] At present, no effective solution has been proposed for the above technical problem. SUMMARY

[0005] In view of this, to solve the technical problem that the page development process is complex, embodiments of the present application provide a page generation method and device, electronic equipment and storage medium.

[0006] In a first aspect, embodiments of the present application provide a page generation method, comprising:

[0007] determining a target page structure template;

[0008] parsing the target page structure template to obtain a plurality of structure bodies defined in the target page structure template, each structure body corresponding to a page element and each structure body defining attribute data of the corresponding page element;

[0009] format-converting the plurality of structure bodies to obtain a corresponding hypertext markup language file;

[0010] rendering the hypertext markup language file to generate a target page.

[0011] In a possible implementation, the format of the target page structure template is a json format or an extensible markup language xml format.

[0012] In a possible implementation, the format-converting the plurality of structure bodies comprises:

[0013] The structure is parsed into a block-level element, wherein a corresponding page element is generated according to attribute data in the structure for representing an interactive mode of the page element, and a style of the corresponding page element is set according to other attribute data in the structure, the other attribute data at least including an element name, attribute data for representing an arrangement order of the page element in a page, and attribute data for representing a storage format of input data in the page element.

[0014] In one possible implementation, before the parsing of the target page structure template, the method further includes:

[0015] Performing legality verification on the target page structure template;

[0016] If the verification result indicates that the target page structure template is legal, performing the step of parsing the target page structure template;

[0017] If the verification result indicates that the target page structure template is illegal, ending the process.

[0018] In one possible implementation, the method is applied to a plug-in development scenario, the target page is a plug-in parameter configuration page, and each page element in the target page corresponds to a job parameter for inputting by a user in the page element.

[0019] In a second aspect, an embodiment of the present application provides a page generation device, and the device includes:

[0020] A template determination module is configured to determine a target page structure template.

[0021] A template parsing module is configured to parse the target page structure template to obtain a plurality of structures defined in the target page structure template, each structure corresponding to a page element and each structure defining attribute data of the corresponding page element.

[0022] A format conversion module is configured to convert the plurality of structures to obtain a corresponding hypertext markup language file.

[0023] A page rendering module is configured to render the hypertext markup language file to generate a target page.

[0024] In one possible implementation, the format conversion module is specifically configured to parse each structure into a block-level element, and includes:

[0025] A first conversion submodule is configured to generate a corresponding page element according to attribute data in the structure for representing an interactive mode of the page element.

[0026] a second conversion sub-module, configured to set a style of the corresponding page element according to other attribute data in the structure, the other attribute data at least including: an element name, attribute data for representing an arrangement order of the page element in a page, and attribute data for representing a storage format of input data in the page element.

[0027] In one possible implementation, the method further includes:

[0028] a verification module, configured to perform legality verification on the target page structure template;

[0029] a template analysis module, specifically configured to perform the step of analyzing the target page structure template if the verification result indicates that the target page structure template is legal.

[0030] a termination module, configured to end the process if the verification result indicates that the target page structure template is illegal.

[0031] In a third aspect, an electronic device is provided, including a processor and a memory, where the processor is configured to execute a page generation method program stored in the memory to implement the page generation method in any one of the first aspect.

[0032] In a fourth aspect, a storage medium is provided, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the page generation method in any one of the first aspect.

[0033] The technical solution provided by the embodiments of the present application determines a target page structure template, analyzes the target page structure template, obtains a plurality of structures defined in the target page structure template, each structure corresponding to a page element and each structure defining attribute data of the corresponding page element, converts the plurality of structures to obtain a corresponding hypertext markup language file, renders the hypertext markup language file, and generates a target page, which realizes automatic generation of a page when a user configures a page structure template, thereby eliminating the need for the user to develop a page. Furthermore, compared with page development, the page structure template uses a structured language to define data, so the page structure template is easy to write and has good readability and expandability, thereby the technical solution provided by the embodiments of the present application can improve the development efficiency in a scenario involving page development. BRIEF DESCRIPTION OF DRAWINGS

[0034] Figure 1 An embodiment flowchart of a page generation method provided by the embodiments of the present application;

[0035] Figure 2An example of a target page;

[0036] Figure 3 An embodiment flow chart of another page generation method provided by an embodiment of the present application;

[0037] Figure 4 An embodiment block diagram of a page generation device provided by an embodiment of the present application;

[0038] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0039] To make the objectives, technical solutions and advantages of embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0040] The page generation method provided by the present application will be further explained in detail below with reference to the drawings and specific embodiments, and the embodiments do not constitute limitation on the embodiments of the present application.

[0041] Reference is made to Figure 1 An embodiment flow chart of a page generation method provided by an embodiment of the present application, as shown in Figure 1 The method can include the following steps:

[0042] Step 101, determining a target page structure template.

[0043] The target page structure template refers to a page structure template used when generating a target page. In an embodiment of the present application, the page structure template defines a plurality of structure bodies, each structure body corresponds to a page element and each structure body defines attribute data of the corresponding page element.

[0044] As an embodiment, the format of the page structure template can be json format, and the structure body is a json object. As another embodiment, the format of the page structure template can be xml format, and the structure body is an xml element.

[0045] The attribute data includes but is not limited to: element name, arrangement order of the page element in the form, interaction mode of the page element, saving format of the data in the page element, whether the page element is enabled for data validity / specification check, whether the page element has an initialized default value, etc. The interaction mode of the page element includes but is not limited to: text box input, drop-down option input, multi-selection box input, etc. The saving format of the data in the page element includes but is not limited to: String, Integer, json, xml, etc. The data validity / specification check includes but is not limited to: whether it is a required item check.

[0046] One specific example: in the plug-in development scenario, since the user usually needs to configure some parameters (hereinafter referred to as job parameters) used in the job when using the plug-in, such as data source, database, data table, etc., it is necessary to develop a plug-in parameter configuration page for the user to configure the above-mentioned job parameters. In this scenario, each structure in the target page structure template corresponds to a job parameter, so that each page element in the finally generated target page can be used by the user to configure the corresponding job parameter.

[0047] Further, in the above plug-in development scenario, a json format target page structure template example is as follows:

[0048]

[0049]

[0050]

[0051] The json target page structure template shown in the above example defines two structures, one of which corresponds to a page element with a text box input interaction mode for the user to input the operator parallelism, and the other corresponds to a page element with a drop-down option input interaction mode for the user to input the data source type.

[0052] An xml format target page structure template example is as follows:

[0053]

[0054]

[0055] The xml target page structure template shown in the above example defines two structures, one of which corresponds to a page element with a text box input interaction mode for the user to input the operator parallelism, and the other corresponds to a page element with a drop-down option input interaction mode for the user to input the data source type.

[0056] In practice, as an embodiment, when developing the plug-in, the user can write the page structure template by using a notepad, word or the like, and then upload the written page structure template to an electronic device, such as a big data platform (the big data platform can be a single electronic device or a device cluster composed of multiple electronic devices) through a terminal device. Thus, in the step 101, determining the target page structure template includes determining the received page structure template as the target page structure template.

[0057] As another embodiment, when developing the plug-in, the user can select a required page structure template from a page structure module library provided on the electronic device. Thus, in the step 101, determining the target page structure template includes determining the selected page structure template in the page structure template library as the target page structure template.

[0058] Step 102, parsing the target page structure template to obtain a plurality of structure bodies defined in the target page structure template.

[0059] As described above, the target page structure template defines a plurality of structure bodies, and thus the target page structure template can be parsed to obtain the plurality of structure bodies defined in the target page structure template. Specifically, in application, the fastJson parsing framework can be used to parse the target page structure template in the json format, and the dom4j parsing framework can be used to parse the target page structure template in the xml format.

[0060] Step 103, performing format conversion on the plurality of structure bodies to obtain a corresponding hypertext markup language file.

[0061] In the embodiment of the application, performing format conversion on the plurality of structure bodies includes converting each structure body into a div element (the div element is a block-level element), wherein a corresponding page element is generated according to attribute data in the structure body for representing an interaction mode of the page element, and a style of the corresponding page element is set according to other attribute data in the structure body. Here, the other attribute data refers to attribute data in the structure body other than the attribute data for representing the interaction mode of the page element.

[0062] For example, based on the structure defined above, "input_type":"text",<input_typetype="string"> text< / input_type> Generate a text input box based on the "input_type":"selected" definition in the structure shown in the example above.<input_type type="string"> selected< / input_type> Generate a dropdown input. Based on the "name":"operator parallelism" defined in the structure shown in the example above, or...<name type="string"> The operator parallelism sets the element name displayed on the page for the above text input box to the operator parallelism, based on the "visible": true definition in the structure of the example above.<visiable type="boolean"> `true` sets the text input box to make the input content visible, according to the "required": false definition in the structure of the example above.<required type="boolean"> `false` sets the above text input box to optional, based on the "default_value":"1" definition in the structure of the example above.<default_value type="string"> 1< / default_value> Set the initial default value of the above text input box to 1, based on the "order_id":15 defined in the structure of the example above.<order_id type="number"> 15< / order_id> Set the order of the above text input boxes on the page to the 15th from the top.

[0063] Step 104: Render the Hypertext Markup Language file to generate the target page.

[0064] like Figure 2 The image shown is a schematic diagram of the target page.

[0065] Understandably, based on Figure 2 The example target page allows users to interact via dropdown options. Figure 2 The example data source type input box allows you to set the data source type through interactive text input. Figure 2 Enter the operator parallelism in the example operator parallelism input box.

[0066] The technical scheme provided by the embodiment of the present application determines a target page structure template, analyzes the target page structure template, obtains a plurality of structure bodies defined in the target page structure template, each structure body corresponds to a page element and each structure body defines attribute data of the corresponding page element, performs format conversion on the plurality of structure bodies, obtains a corresponding hypertext markup language file, renders the hypertext markup language file, and generates a target page, so that a user can automatically generate a page by configuring a page structure template, thereby eliminating the need for the user to develop a page, and further, compared with page development, the page structure template uses a structured language to define data, so that the page structure template is easy to write and has good readability and expandability, thereby the technical scheme provided by the embodiment of the present application can improve the development efficiency in a page development scenario.

[0067] Referring to Figure 3 An embodiment flowchart of another page generation method provided by the embodiment of the present application is shown in the figure, and the Figure 3 The flowchart shown in the figure is based on the above Figure 1 The flowchart shown in the figure is based on the above

[0068] Step 301, determining a target page structure template.

[0069] Step 302, performing legality verification on the target page structure template, if the verification result indicates that the target page structure template is legal, performing step 303, and if the verification result indicates that the target page structure template is illegal, performing step 306.

[0070] Step 303, analyzing the target page structure template to obtain a plurality of structure bodies defined in the target page structure template.

[0071] Step 304, performing format conversion on the plurality of structure bodies, if a corresponding hypertext markup language file is successfully obtained, performing step 305, and if the corresponding hypertext markup language file is not obtained, performing step 306.

[0072] Step 305, rendering the hypertext markup language file to generate a target page.

[0073] Step 306, generating an indication message indicating that the target page cannot be generated.

[0074] The descriptions of steps 301, 303-305 above can refer to the descriptions in the above Figure 1 The descriptions in the above

[0075] In step 302, as an embodiment, the legality verification on the target page structure template can include: verifying whether the format of the target page structure template is a set format, the set format can include a json format, an xml format, if the verification result indicates that the format of the target page structure template is the set format, it can be determined that the target page structure template is legal; otherwise, if the verification result indicates that the format of the target page structure template is not the set format, it can be determined that the target page structure template is illegal.

[0076] As another embodiment, the legality verification on the target page structure template can include: verifying whether the set attribute data is contained in each of the plurality of structure bodies defined by the target page structure template, if the verification result indicates that the set attribute data is contained in each of the plurality of structure bodies defined by the target page structure template, it can be determined that the target page structure template is legal; if the verification result indicates that one or more structure bodies defined by the target page structure template do not contain the set attribute data, it can be determined that the target page structure template is illegal.

[0077] The set attribute data includes but is not limited to: element name, arrangement order of page elements in a form, interaction mode of page elements, saving format of input data in page elements, whether to enable data legality / specification verification of page elements, whether to have an initialization default value in page elements, etc.

[0078] When the set attribute data includes multiple items, the above-mentioned not containing the set attribute data means not containing any one or more set attribute data.

[0079] In addition, as can be seen from the above description, if the verification result indicates that the target page structure template is illegal or the corresponding hypertext markup language file cannot be obtained by performing the format conversion on the plurality of structure bodies defined by the target page structure template, step 306 is executed, that is, an indication message indicating that the target page cannot be generated is generated. Further, the indication message can further indicate the reason why the target page cannot be generated. Specifically, if the verification result indicates that the target page structure template is illegal, the indication message can indicate that the target page cannot be generated due to the illegal target page structure template. Similarly, if the corresponding hypertext markup language file cannot be obtained by performing the format conversion on the plurality of structure bodies defined by the target page structure template, the indication message can indicate that the target page cannot be generated due to the format conversion failure, so as to improve the user experience.

[0080] By Figure 3The flow shown realizes that a user configures a page structure template to automatically generate a page, so that the user does not need to develop the page. Further, compared with page development, the page structure template uses a structured language to define data, so that the page structure template is easy to write and has good readability and scalability. Therefore, the technical solution provided by the embodiment of the application can improve the development efficiency in the page development scenario.

[0081] Referring to Figure 4 An embodiment block diagram of a page generation device provided by the embodiment of the application is shown in Figure 4 The device can include a template determination module 41, a template analysis module 42, a format conversion module 43, and a page rendering module 44.

[0082] The template determination module 41 is configured to determine a target page structure template.

[0083] The template analysis module 42 is configured to analyze the target page structure template to obtain a plurality of structure bodies defined in the target page structure template, each structure body corresponding to a page element and each structure body defining attribute data of the corresponding page element.

[0084] The format conversion module 43 is configured to convert the plurality of structure bodies to obtain a corresponding hypertext markup language file.

[0085] The page rendering module 44 is configured to render the hypertext markup language file to generate a target page.

[0086] In a possible implementation, the format conversion module 43 is specifically configured to analyze each structure body into a block-level element respectively, and the block-level element includes (not shown in Figure 4

[0087] The first conversion submodule is configured to generate a corresponding page element according to attribute data in the structure body for representing an interaction mode of the page element.

[0088] The second conversion submodule is configured to set a style of the corresponding page element according to other attribute data in the structure body, and the other attribute data at least includes an element name, attribute data for representing an arrangement order of the page element in a page, and attribute data for representing a saving format of input data in the page element.

[0089] In a possible implementation, the device further includes (not shown in Figure 4

[0090] The verification module is configured to perform legality verification on the target page structure template.

[0091] ​​The template parsing module is specifically configured to execute the step of parsing the target page structure template if the verification result indicates that the target page structure template is legal.

[0092] The termination module is configured to end the flow if the verification result indicates that the target page structure template is illegal.

[0093] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 5. Figure 5 The electronic device 500 shown in the figure includes at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together through a bus system 505. It can be understood that the bus system 505 is used to realize the connection communication between the components. The bus system 505 includes not only a data bus, but also a power supply bus, a control bus and a status signal bus. However, for the purpose of clear illustration, all the various buses are marked as the bus system 505 in the figure. Figure 5

[0094] The user interface 503 can include a display, a keyboard or a clicking device (for example, a mouse, a trackball, a touchpad or a touch screen, etc.).

[0095] ​It is to be appreciated that the memory 502 in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable Programmable ROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous Dynamic RAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 described herein is intended to include, among other things, these and any other suitable types of memory.

[0096] In some embodiments, the memory 502 stores the following elements, executable units or data structures, or a subset of them, or an extended set of them: an operating system 5021 and an application program 5022.

[0097] Among them, the operating system 5021 contains various system programs, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program 5022 contains various application programs, such as Media Player, Browser, etc., for implementing various application services. The program for implementing the method of the embodiments of the present application can be contained in the application program 5022.

[0098] In the embodiments of the present application, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application program 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:

[0099] determining a target page structure template;

[0100] parsing the target page structure template to obtain a plurality of structure bodies defined in the target page structure template, each of the structure bodies corresponding to a page element and each of the structure bodies defining attribute data of the corresponding page element;

[0101] performing format conversion on the plurality of structure bodies to obtain a corresponding hypertext markup language file;

[0102] rendering the hypertext markup language file to generate a target page.

[0103] The method disclosed in the embodiments of the present application can be applied to the processor 501 or implemented by the processor 501. The processor 501 can be an integrated circuit chip having a signal processing capability. In the implementation process, the steps of the above method can be completed by the integrated logic circuits or the software form instructions in the processor 501. The processor 501 can be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor to execute, or a combination of hardware and software units in the code processor to execute. The software unit can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and combines the hardware to complete the steps of the above method.

[0104] It can be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing units can be implemented within one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSP Devices), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.

[0105] For software implementation, the techniques described herein can be implemented with a processing unit that executes program code that includes functions described herein. The program code can be stored in a memory and executed by a processor. The memory can be implemented within the processor or external to the processor.

[0106] The electronic device provided by the embodiments can be an electronic device as shown in Figure 5 , can perform all steps of the page generation method as shown in Figure 1 and Figure 3 , and thus achieve the technical effects of the page generation method as shown in Figure 1 and Figure 3 . For details, refer to the related descriptions of Figure 1 and Figure 3 . For brevity, no further description is given here.

[0107] The embodiments of the present application further provide a storage medium (computer readable storage medium). The storage medium stores one or more programs. The storage medium can include a volatile memory, such as a random access memory, and can also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk, or a solid state disk. The storage medium can also include a combination of the above-mentioned types of memories.

[0108] When the one or more programs stored in the storage medium can be executed by one or more processors to implement the page generation method executed at the electronic device side.

[0109] The processor is configured to execute the page generation program stored in the memory to implement the following steps of the page generation method executed at the electronic device side:

[0110] determining a target page structure template;

[0111] The target page structure template is parsed to obtain a plurality of structure bodies defined in the target page structure template, each of the structure bodies corresponding to a page element and each of the structure bodies defining attribute data of the corresponding page element;

[0112] The plurality of structure bodies are format-converted to obtain a corresponding hypertext markup language file;

[0113] The hypertext markup language file is rendered to generate a target page.

[0114] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software, or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, each component and step of the examples has been described in a general manner in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0115] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, software executed by a processor, or a combination of both. The software modules can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.

[0116] The above specific embodiments further illustrate the purpose, technical solutions, and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A page generation method, characterized in that, The method includes: Determine the target page structure template; The target page structure template is parsed to obtain multiple structures defined in the target page structure template. Each structure corresponds to a page element and each structure defines the attribute data of the corresponding page element. The attribute data includes at least the storage format of the input data in the page element and the arrangement order of the page elements. The formats of the multiple structures are converted to obtain the corresponding Hypertext Markup Language files; The hypertext markup language file is rendered to generate the target page; The process of determining the target page structure template includes: The received page structure template is identified as the target page structure template. Alternatively, the selected page structure template in the page structure template library can be designated as the target page structure template. The method is applied in a plugin development scenario. The target page is a plugin parameter configuration page. Each page element on the target page corresponds to a job parameter, which is used for the user to input the job parameter in the page element.

2. The method according to claim 1, characterized in that, The target page structure template is in JSON format or Extensible Markup Language (XML) format.

3. The method according to claim 1, characterized in that, The process of converting the format of the multiple structures includes: Each of the aforementioned structures is parsed into a block-level element. The corresponding page element is generated based on the attribute data in the structure that represents the interaction mode of the page element, and the style of the corresponding page element is set based on other attribute data in the structure. The other attribute data includes at least: element name, attribute data that represents the arrangement order of the page element on the page, and attribute data that represents the storage format of the input data in the page element.

4. The method according to claim 1, characterized in that, Before parsing the target page structure template, the method further includes: Perform a validity check on the target page structure template; If the verification result indicates that the target page structure template is valid, then the step of parsing the target page structure template is executed; If the verification result indicates that the target page structure template is invalid, the process ends.

5. A page generation device, characterized in that, The device includes: The template determination module is used to determine the target page structure template; The template parsing module is used to parse the target page structure template to obtain multiple structures defined in the target page structure template. Each structure corresponds to a page element and each structure defines the attribute data of the corresponding page element. The attribute data includes at least the storage format of the input data in the page element and the arrangement order of the page elements. The format conversion module is used to convert the formats of multiple structures to obtain corresponding Hypertext Markup Language files; The page rendering module is used to render the hypertext markup language file and generate the target page; The process of determining the target page structure template includes: The received page structure template is identified as the target page structure template. Alternatively, the selected page structure template in the page structure template library can be designated as the target page structure template. The device is used in a plugin development scenario. The target page is a plugin parameter configuration page. Each page element on the target page corresponds to a job parameter, which is used for the user to input the job parameter in the page element.

6. The apparatus according to claim 5, characterized in that, The format conversion module is specifically used to: parse each of the structures into a block-level element; including: The first conversion submodule is used to generate corresponding page elements based on the attribute data in the structure that represents the interaction mode of page elements; The second conversion submodule is used to set the style of the corresponding page element according to other attribute data in the structure. The other attribute data includes at least: element name, attribute data indicating the arrangement order of page elements on the page, and attribute data indicating the storage format of input data in the page element.

7. The apparatus according to claim 5, characterized in that, Also includes: The verification module is used to verify the legality of the target page structure template; The template parsing module is specifically used to execute the step of parsing the target page structure template if the verification result indicates that the target page structure template is valid; The termination module is used to end the process if the verification result indicates that the target page structure template is invalid.

8. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a page generation method program stored in the memory to implement the page generation method according to any one of claims 1 to 4.

9. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the page generation method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • JSON self-described structure-based webpage interface generation method and apparatus

    CN108664245A

  • Page generation method and device

    CN110928540A

  • Client-side generation of preliminary version of network page

    US8706803B1