Page generation method, device, apparatus and storage medium
By pre-constructing initial elements to generate target page styles and building front-end page components, the problem of low page generation efficiency in existing technologies is solved, and efficient automatic page generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING 360 INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2024-12-04
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, when developers build new pages that are similar to previous pages, they need to develop each element from the initial stage, resulting in a lot of repetitive work and low page generation efficiency.
The target page style is generated by pre-constructing initial elements, and front-end page components are built based on the target page style, automatically generating the target page and avoiding repeated development from the initial stage.
It improves page generation efficiency, reduces development time and manpower investment, and avoids repetitive work.
Smart Images

Figure CN122153191A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a page generation method, apparatus, device and storage medium. Background Technology
[0002] With the development of internet businesses, in order to meet the customized needs of different businesses, developers need to generate and display corresponding pages according to different business requirements.
[0003] Currently, when developers build the pages required by users, if the required pages are similar to previous pages, they still need to develop each element of the page from the initial stage, resulting in a lot of repetitive work, which leads to a lot of development time and manpower consumption and low page generation efficiency.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this application is to provide a page generation method, apparatus, device, and storage medium, which aims to solve the technical problems of low page generation efficiency due to a large amount of repetitive work in the prior art.
[0006] To achieve the above objectives, this application provides a page generation method, the method comprising:
[0007] Receive page generation request;
[0008] Based on the page generation request, at least one pre-built initial element is obtained to generate the target page style;
[0009] Construct the front-end page component corresponding to the initial element based on the target page style;
[0010] Generate the target page composed of the aforementioned front-end page components.
[0011] In one embodiment, the step of constructing the front-end page component corresponding to the initial element based on the target page style includes:
[0012] Generate data to be rendered based on the target page style;
[0013] When the target page style is constructed by combining multiple initial elements, front-end basic components corresponding to each initial element are generated according to the data to be rendered;
[0014] The aforementioned basic front-end components are combined to obtain front-end page components.
[0015] In one embodiment, the step of combining the various front-end basic components to obtain a front-end page component includes:
[0016] Determine whether there is location information associated with each of the aforementioned front-end basic components, wherein the location information represents the display position of different front-end basic components on the front-end page;
[0017] If so, the various basic front-end components are combined at the positions corresponding to the location information in the front-end page to obtain the front-end page components.
[0018] In one embodiment, after the step of determining whether location information associated with each of the aforementioned front-end basic components exists, the method further includes:
[0019] If not, then determine the first combination of the reference templates constituting each of the initial elements;
[0020] Determine a second combination of the initial elements that constitute the target page style;
[0021] The front-end basic components are combined according to the first combination method to obtain the component blocks corresponding to each initial element;
[0022] The component blocks are combined according to the second combination method to obtain the front-end page components.
[0023] In one embodiment, after the step of generating the target page composed of the front-end page components, the method further includes:
[0024] Receive a tagging instruction triggered based on the target page;
[0025] The target location information of the front-end page component in the target page is determined according to the marking instruction;
[0026] The target location information is associated with each of the aforementioned front-end basic components.
[0027] In one embodiment, the step of obtaining at least one pre-built initial element to generate the target page style based on the page generation request includes:
[0028] Obtain a preset database, which contains at least one pre-constructed preset element;
[0029] Determine whether the initial element corresponding to the page generation request exists in each of the preset elements in the preset database;
[0030] If so, then generate the target page style based on the initial element.
[0031] In one embodiment, after determining whether the initial element corresponding to the page generation request exists among the preset elements in the preset database, the method further includes:
[0032] If not, obtain the template page associated with the page generation request;
[0033] Generate corresponding placeholders based on the front-end page components of the template page;
[0034] Receive padding data based on the placeholder input;
[0035] The data to be filled is added to the placeholder to generate a preset element, and the process returns to the step of determining whether the initial element corresponding to the page generation request exists in each of the preset elements in the preset database.
[0036] In one embodiment, the step of obtaining the template page associated with the page generation request if not included:
[0037] If not, obtain the webpage address carried in the page generation request;
[0038] Determine the corresponding template page based on the webpage address; and / or,
[0039] If not, retrieve the user's historical data;
[0040] Retrieve the template page generated by the page generation request from the user's historical data.
[0041] In one embodiment, prior to the step of obtaining the preset database, the method further includes:
[0042] Construct multiple baseline templates based on the input template data;
[0043] Generate preset elements based on each of the aforementioned benchmark templates;
[0044] Add the preset element to the preset database.
[0045] In one embodiment, the step of generating preset elements based on each of the reference templates includes:
[0046] Fill different module data into any baseline template to generate corresponding preset elements; and / or,
[0047] Different baseline templates can be combined to generate corresponding preset elements; and / or,
[0048] Different content from different baseline templates can be combined to generate corresponding preset elements.
[0049] Furthermore, to achieve the above objectives, this application also proposes a page generation apparatus, the apparatus comprising:
[0050] The request triggering module 10 is used to receive the triggered page generation request;
[0051] Style building module 20 is used to obtain at least one initial element based on the page generation request to build the target page style;
[0052] Component building module 30 is used to build front-end page components corresponding to the initial elements according to the target page style;
[0053] Page generation module 40 is used to generate a target page composed of the front-end page components.
[0054] In one embodiment, the component building module is further configured to generate data to be rendered based on the target page style;
[0055] The component building module is further configured to generate front-end basic components corresponding to each of the initial elements based on the data to be rendered when the target page style is constructed by combining multiple initial elements;
[0056] The component building module is also used to combine the various front-end basic components to obtain front-end page components.
[0057] In one embodiment, the component building module is further configured to determine whether there is location information associated with each of the front-end basic components, wherein the location information represents the display position of different front-end basic components on the front-end page;
[0058] The component building module is further configured to, if so, combine each of the aforementioned basic front-end components at the positions corresponding to the location information in the front-end page to obtain a front-end page component.
[0059] In one embodiment, the component building module is further configured to, if not, determine a first combination of the reference templates constituting each of the initial elements;
[0060] The component building module is further configured to determine a second combination of the initial elements constituting the target page style;
[0061] The component building module is further configured to combine each of the front-end basic components according to the first combination method to obtain the component block corresponding to each of the initial elements;
[0062] The component building module is further configured to combine the component blocks according to the second combination method to obtain a front-end page component.
[0063] In one embodiment, the style building module is further configured to obtain a preset database, wherein the preset database stores at least one preset element;
[0064] The style construction module is also used to determine whether there is an initial element corresponding to the page generation request among the preset elements in the preset database;
[0065] The style building module is further configured to, if so, build a target page style based on the initial element.
[0066] In one embodiment, the style building module is further configured to, if not, obtain the template page associated with the page generation request;
[0067] The style building module is also used to generate corresponding placeholders based on the front-end page components of the template page;
[0068] The style construction module is also used to receive fill data based on the placeholder input;
[0069] The style construction module is further configured to add the fill data to the placeholder, generate a preset element, and return to the step of determining whether the initial element corresponding to the page generation request exists in each of the preset elements in the preset database.
[0070] In one embodiment, the style building module is further configured to build multiple baseline templates based on the input template data;
[0071] The style construction module is also used to generate preset elements based on each of the baseline templates;
[0072] The style building module is also used to add the preset elements to the preset database.
[0073] In addition, to achieve the above objectives, this application also proposes a page generation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the page generation method as described above.
[0074] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the page generation method described above.
[0075] In addition, to achieve the above objectives, this application also proposes a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the page generation method described above.
[0076] One or more technical solutions proposed in this application have at least the following technical effects:
[0077] This application involves receiving a page generation request; obtaining at least one pre-built initial element based on the page generation request to generate a target page style; constructing front-end page components corresponding to the initial element based on the target page style; and generating a target page composed of the front-end page components. Compared to existing technologies, this application automatically generates the target page based on pre-built initial elements, eliminating the need to develop each element from the initial stage, avoiding a large amount of repetitive work, and thus saving considerable development time and manpower, effectively improving page generation efficiency. Attached Figure Description
[0078] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0079] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0080] Figure 1 This is a flowchart illustrating the first embodiment of the page generation method of this application;
[0081] Figure 2 This is a flowchart illustrating the second embodiment of the page generation method of this application;
[0082] Figure 3 This is a schematic diagram illustrating the structure of a front-end page component according to the second embodiment of this application;
[0083] Figure 4 This is a flowchart illustrating the third embodiment of the page generation method of this application;
[0084] Figure 5 This is a schematic diagram of the module structure of the page generation device for this application;
[0085] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the page generation method in this application embodiment.
[0086] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0087] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0088] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0089] The main solution of this application embodiment is: receiving a page generation request; obtaining at least one pre-built initial element according to the page generation request to generate a target page style; constructing a front-end page component corresponding to the initial element according to the target page style; and generating a target page composed of the front-end page component.
[0090] Because existing technology developers need to develop each element of the page from the initial stage when building a new page that is similar to the previous page, there is a lot of repetitive work, which results in a lot of development time and manpower being consumed and page generation efficiency being low.
[0091] This application provides a solution that generates a target page style by pre-constructing initial elements, and then further constructs corresponding front-end page components based on the target page style to generate the target page. Compared with the prior art, since this application can automatically generate the target page based on pre-constructed initial elements, it is not necessary to develop each element from the initial stage, avoiding a lot of repetitive work, and thus saving a lot of development time and manpower, effectively improving the page generation efficiency.
[0092] It should be noted that the execution subject of each embodiment of this application can be a computing service device with page generation, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or page generation device capable of realizing the above functions. The following description uses a page generation device as an example to illustrate each embodiment of this application.
[0093] Based on this, the embodiments of this application provide a page generation method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the page generation method of this application.
[0094] In this embodiment, the page generation method includes steps S10 to S40:
[0095] Step S10: Receive the page generation request.
[0096] It should be noted that the above page generation request can be an instruction to request the generation of a page.
[0097] In practice, users can input the page generation request through the interface provided by the page generation device, or trigger the page generation request through a button on the interface. The page generation device can receive the page generation request and respond on the backend.
[0098] The aforementioned page may be a webpage written in Hyper Text Markup Language (HTML), i.e., an HTML page, or it may be a webpage written in HTML and Java, i.e., a Java server page, or it may be a webpage written in other languages. This embodiment does not limit this.
[0099] Step S20: Obtain at least one pre-built initial element according to the page generation request to generate the target page style.
[0100] It should be noted that the aforementioned initial element can be a basic module that constitutes the page. This initial element is pre-populated with corresponding data, has certain functions and content, and can exist independently of other modules.
[0101] In practical implementation, modules adapted to different business types can be pre-created and populated with corresponding data, such as text, colors, and layouts, to form initial elements corresponding to the business. The aforementioned page generation device can display each pre-built initial element to the user. The user can select an initial element according to business needs, triggering the page generation request. The page generation device can respond to the page generation request, determine the initial element selected by the user, and use the selected initial element as the target page style when the user selects one. When the user selects multiple initial elements, the initial elements can be combined to generate the target page style.
[0102] Step S30: Construct the front-end page component corresponding to the initial element according to the target page style.
[0103] It should be noted that the aforementioned front-end page components can be independent, self-contained code units used to build pages. These components can be buttons, forms, navigation menus, image carousels, data charts, etc.
[0104] In practice, the aforementioned page generation device can generate JSON data corresponding to the initial elements based on the target page style. This JSON data may include, but is not limited to, text content, image links, video resources, and user interaction elements. Then, the JSON data is parsed to dynamically construct the front-end page components corresponding to the initial elements.
[0105] Step S40: Generate the target page composed of the front-end page components.
[0106] In practice, the aforementioned page generation device can combine and splice together the generated front-end page components to form the target page required by the user.
[0107] This embodiment receives a page generation request; obtains at least one pre-built initial element based on the page generation request to generate a target page style; constructs front-end page components corresponding to the initial elements based on the target page style; and generates a target page composed of the front-end page components. This embodiment generates a target page style based on pre-built initial elements, and then further constructs corresponding front-end page components based on the target page style to generate the target page. Compared to existing technologies, because this embodiment can automatically generate the target page based on pre-built initial elements, it eliminates the need to develop each element from the initial stage, avoiding a large amount of repetitive work, and thus saving development time and manpower, effectively improving page generation efficiency.
[0108] Based on the first embodiment of this application, a second embodiment of this application is proposed. In the second embodiment, content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the page generation method of this application.
[0109] In this embodiment, step S30 may include steps S301 to S303:
[0110] Step S301: Generate data to be rendered based on the target page style.
[0111] It should be noted that the data to be rendered mentioned above can be JSON data used for subsequent rendering and can be used as raw materials for page rendering, including but not limited to text content, image links, video resources, and user interaction elements.
[0112] In its implementation, the aforementioned page generation device can identify all front-end components that make up the page, such as header, navigation bar, content area, sidebar, and footer, in the target page style on the backend. It can then extract the data types and formats required to generate each component from the initial elements of the target page style, and finally assemble the extracted data into JSON format to form the data to be rendered.
[0113] Step S302: When the target page style is constructed by combining multiple initial elements, generate the front-end basic components corresponding to each initial element according to the data to be rendered.
[0114] It should be noted that the aforementioned basic front-end components may be individual components that cannot be split.
[0115] In its implementation, when the target page style is constructed from a combination of multiple initial elements, the aforementioned page generation device can request data to be rendered from the backend via an Application Programming Interface (API) on the front end. Then, it parses the data to be rendered, extracts the data types and formats required to generate each component, and dynamically constructs the front-end basic page components corresponding to the initial elements based on the extracted data.
[0116] Step S303: Combine the aforementioned front-end basic components to obtain front-end page components.
[0117] In practical implementation, the aforementioned page generation device can combine or splice the obtained front-end basic components to obtain the front-end page components that constitute the page. Specifically, any front-end basic component obtained can be considered a front-end page component.
[0118] In one feasible implementation, step S303 may include steps S3031 to S3032:
[0119] Step S3031: Determine whether there is location information associated with each of the aforementioned front-end basic components, wherein the location information represents the display position of different front-end basic components on the front-end page.
[0120] In practical implementation, for a generated front-end page, its basic front-end components can be extracted, and their position information within the page can be recorded. This position information is then associated with the corresponding basic front-end component. Subsequent occurrences of the same basic front-end components can then utilize this position information for combination. Users or developers can manually adjust the position information after obtaining it. Furthermore, users or developers can manually build front-end detection components and configure them with corresponding position information. Based on this, the aforementioned front-end page generation device, upon obtaining the current basic front-end components, can detect whether local position information associated with each basic front-end component exists.
[0121] Step S3032, if yes, then combine each of the aforementioned basic front-end components at the positions corresponding to the location information in the front-end page to obtain the front-end page components.
[0122] In the specific implementation, when the page generation device detects the existence of location information associated with each front-end basic component locally, it can parse the location information, determine the display position of each front-end basic component in the subsequently generated front-end page, and combine each front-end basic component based on the parsed content, that is, combine each front-end basic component at the position corresponding to the location information to obtain the front-end page component.
[0123] Accordingly, steps S3031 may be followed by steps S3033 to S3036:
[0124] Step S3033: If not, determine the first combination of the reference templates constituting each of the initial elements.
[0125] It should be noted that the aforementioned benchmark templates can be templates created by users manually inputting corresponding data. Any initial element can be obtained by combining at least one benchmark template, or by combining different contents from at least one benchmark template.
[0126] In a specific implementation, when the page generation device detects that there is no location information associated with each front-end basic component locally, it parses the target page template, determines each initial element in the target page template, and determines the combination method of the basic templates that constitute each initial element. The combination method of the basic templates that constitute each initial element can be the first combination method mentioned above.
[0127] Step S3034: Determine a second combination of the initial elements that constitute the target page style.
[0128] In a specific implementation, the page generation device can further determine the combination method of the initial elements constituting the target page style when determining the initial elements constituting the target page style. The combination method of the initial elements constituting the target page style can be the second combination method mentioned above.
[0129] Step S3035: Combine each of the front-end basic components according to the first combination method to obtain the component block corresponding to each of the initial elements.
[0130] In the specific implementation, the front-end basic components can correspond to the back-end baseline template. Based on this, the aforementioned page generation device can use the first combination method corresponding to each baseline template to combine each front-end basic component to obtain multiple component blocks, and each component block corresponds to each initial element.
[0131] Step S3036: Combine the component blocks according to the second combination method to obtain the front-end page components.
[0132] In a specific implementation, the target page style is composed of at least one initial element. Based on this, the page generation device can combine the component blocks using the second combination method corresponding to each initial element to obtain the front-end page components.
[0133] For example, assume that a target page style exists in the backend consisting of initial element 1 and initial element 2, where initial element 1 is composed of base template 1 and base template 2, and initial element 2 is composed of base template 3 and base template 4. (Refer to...) Figure 3 , Figure 3This is a schematic diagram illustrating the structure of a front-end page component according to the second embodiment of this application. Figure 3 In the example, the front-end contains basic component 1 corresponding to baseline template 1, basic component 2 corresponding to baseline template 2, basic component 3 corresponding to baseline template 3, and basic component 4 corresponding to baseline template 4. Based on the first combination method corresponding to baseline templates 1 and 2, basic component 1 and basic component 2 are combined to obtain component block 1. Similarly, based on the first combination method corresponding to baseline templates 3 and 4, basic component 3 and basic component 4 are combined to obtain component block 2. Then, according to the second combination method corresponding to initial element 1 and initial element 2, component block 1 and component block 2 are combined to obtain the front-end page components. Figure 3 The reference components and component blocks shown are for illustrative purposes only and do not limit the scope of this solution.
[0134] In this embodiment, steps S40 may be followed by steps S50 to S70:
[0135] Step S50: Receive a tagging instruction triggered based on the target page.
[0136] It should be noted that the above marking instructions can be used to identify the front-end page components of the target page.
[0137] In a specific implementation, after the aforementioned page generation device generates the target page required by the user on the front end, the user can perform identification operations on the front end page components of the target page and trigger marking instructions.
[0138] Step S60: Determine the target position information of the front-end page component in the target page according to the marking instruction.
[0139] In a specific implementation, the aforementioned page generation device can respond to the marking instruction to determine the target position information of the front-end page component in the target page. The target position information may include the position information of each front-end basic component constituting the front-end page component in the target page.
[0140] Step S70: Associate the target location information with each of the aforementioned front-end basic components.
[0141] In practice, after obtaining the target location information, the page generation device can associate the target location information with each front-end basic component. Subsequently, when the same front-end basic component is obtained, the corresponding target location information can be called for combination to improve the combination efficiency.
[0142] In this embodiment, when the target page style is constructed from multiple initial elements, front-end basic components corresponding to each initial element are generated based on the data to be rendered. By combining these front-end basic components, the front-end page components are accurately obtained, thereby improving the page generation accuracy. Furthermore, when location information associated with each front-end basic component exists, it is used to combine the components. When no location information is associated with any of the components, the first combination method of the base template constituting each initial element and the second combination method of the initial elements constituting the target page style are used to combine the components, effectively improving the accuracy of the front-end page components and thus improving the page generation accuracy.
[0143] Based on the first and second embodiments of this application, a third embodiment of this application is proposed. In this third embodiment, content that is the same as or similar to the first and second embodiments described above can be referred to the above description and will not be repeated hereafter. Based on this, please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the page generation method of this application.
[0144] In this embodiment, step S20 may include steps S201 to S203:
[0145] Step S201: Obtain a preset database, wherein the preset database contains at least one pre-built preset element.
[0146] It should be noted that the aforementioned preset elements can be pre-built to form the basic modules of the page. These preset elements are pre-populated with relevant data, possess certain functions and content, and can exist independently of other modules.
[0147] In practice, multiple preset elements can be pre-built and added to a list in a preset database. The page generation device can then access this preset database after responding to a page generation request.
[0148] In one feasible implementation, steps S21 to S23 may be included before step S201:
[0149] Step S21: Construct multiple baseline templates based on the input template data.
[0150] It should be noted that the above template data can be user-specified custom data, including but not limited to required fields, titles, and template IDs.
[0151] In a specific implementation, the aforementioned page generation device can receive template data manually entered by the user, or respond to the access address entered by the user, obtain template data from the location corresponding to the access address, and after obtaining the template data, create a new template and add the obtained template data to the template to form a base template.
[0152] Step S22: Generate preset elements based on each of the aforementioned reference templates.
[0153] In a practical implementation, the aforementioned page generation device can generate preset elements based on the content of at least one baseline template.
[0154] In a first feasible implementation, step S22 may include:
[0155] Step S221: Fill different module data into any baseline template to generate corresponding preset elements.
[0156] It should be noted that the data in the above modules can be user-inputted custom data, such as text, images, and links.
[0157] In specific implementation, the aforementioned page generation device can fill in the module data input by the user on any base template to generate the preset elements corresponding to the module data; or, it can replace the content of any base template with the module data of the user data for personalized adjustment to generate the preset elements corresponding to the module data.
[0158] In a second feasible implementation, step S22 may include:
[0159] Step S222: Select different baseline templates and combine them to generate corresponding preset elements.
[0160] In a specific implementation, the aforementioned page generation device can obtain the first combination information input by the user. This first combination information represents the combination method of the reference templates. Based on this combination information, several corresponding reference templates are selected from each reference template. Then, the selected reference templates are combined according to the combination method corresponding to the combination information to generate the corresponding preset elements.
[0161] In a third possible implementation, step S22 may include:
[0162] Step S223: Select different content from different baseline templates and combine them to generate corresponding preset elements.
[0163] In a specific implementation, the aforementioned page generation device can obtain the second combination information input by the user. This second combination information represents the combination method of the content of the reference template. By using the second combination information, several corresponding reference templates are selected from each reference template, the content in the selected reference template is determined, and then the content selected in the reference template is combined according to the combination method corresponding to the combination information to generate the corresponding preset element.
[0164] It should be understood that the different implementations of the above-mentioned preset elements can be triggered by the user through corresponding instructions. If no corresponding instructions are received from the user, the implementation can be selected randomly or the implementation that the user has selected the most times in the past can be selected.
[0165] It should be noted that the three feasible implementation methods of step S22 provided above—namely, filling different module data into any base template to generate corresponding preset elements; and / or, selecting different base templates for combination to generate corresponding preset elements; and / or, selecting different content in different base templates for combination to generate corresponding preset elements—effectively improve the flexibility of preset element generation, thereby making the target page generation method more flexible.
[0166] Step S23: Add the preset element to the preset database.
[0167] In practice, the aforementioned page generation device can create a new template and add the obtained template data to the template to form a baseline template.
[0168] Step S202: Determine whether there is an initial element corresponding to the page generation request among the preset elements in the preset database.
[0169] In a specific implementation, after calling the preset database, the page generation device can traverse each preset element in the preset database and determine whether there is an initial element corresponding to the page generation request in each preset element.
[0170] Step S203: If yes, then generate the target page style based on the initial element.
[0171] In a specific implementation, when the page generation device determines that there is an initial element corresponding to the page generation request among the preset elements, if the initial element corresponding to the page generation request is a single element, then the initial element is used as the target page style; if the initial element corresponding to the page generation request is a single element, then the initial elements are combined to generate the target page style.
[0172] Accordingly, steps S204 to S207 may also be included after step S202:
[0173] Step S204: If not, obtain the template page associated with the page generation request.
[0174] It should be noted that the above template page can be an existing front-end page.
[0175] In a specific implementation, when the page generation device determines that there is no initial element corresponding to the page generation request among the preset elements, it can obtain the page specified by the page generation request. The specified page can be the template page associated with the page generation request.
[0176] In one feasible implementation, step S204 may include steps S2041 to S2044:
[0177] Step S2041: If not, obtain the webpage address carried in the page generation request.
[0178] It should be noted that the above web address can be an address for locating and accessing web pages on the Internet, such as a Uniform Resource Locator (URL).
[0179] In practice, users can include a webpage address in the page generation request. When the page generation device determines that there is no initial element corresponding to the page generation request among the preset elements, it can extract the webpage address carried in the page generation request.
[0180] Step S2042: Determine the corresponding template page based on the webpage address.
[0181] In practice, the aforementioned page generation device can locate and access the corresponding webpage on the Internet based on the webpage address, and use the content of the accessed webpage as a template page.
[0182] In another feasible implementation, step S204 may include steps S2043 to S2044:
[0183] Step S2043: If not, then obtain the user's historical data.
[0184] It should be noted that the aforementioned user history data can be data from previous page generation experiences, including at least the page generation requests entered by the user and the corresponding pages.
[0185] In practice, the aforementioned page generation device can record user historical data. When it is determined that there is no initial element corresponding to the page generation request among the preset elements and there is no web page address in the page generation request, the user historical data can be extracted.
[0186] Step S2044: Obtain the template page generated by the page generation request from the user's historical data.
[0187] In a specific implementation, the aforementioned page generation device can determine the historical request corresponding to the current page generation request from the user's historical data, identify the page generated by that historical request, and use it as a template page.
[0188] Furthermore, if the aforementioned page generation device does not detect a historical request consistent with the current page generation request in the user's historical data, it can provide feedback to the user that the page cannot be generated. The user can manually enter the web address based on this information, or specify a preset element in the preset database, or manually construct a new preset element in the preset database. This embodiment does not limit this.
[0189] Step S205: Generate corresponding placeholders based on the front-end page components of the template page.
[0190] It should be noted that the placeholders mentioned above can be temporary interface elements, used to display a position on the page before the final content is determined.
[0191] In its implementation, the aforementioned page generation device can identify front-end page components of the template page, such as titles, paragraphs, images, videos, and forms. Then, it creates a corresponding placeholder for any identified front-end page component. For example, text content is replaced with a text placeholder, images are replaced with image upload placeholders, videos are replaced with video embedding placeholders, and form elements are replaced with form placeholders.
[0192] Step S206: Receive the filling data based on the placeholder input.
[0193] In its implementation, the aforementioned page generation device can use the generated placeholders to construct a new editable template. This template is similar to the template page in structure and layout, except that all the content of the template consists of editable placeholders. The page generation device can then display the template, composed of placeholders, to the user. The user can input their custom data into each placeholder in the template; for example, the user can upload relevant images, enter new text, or embed different videos according to business needs.
[0194] Step S207: Add the filling data to the placeholder to generate a preset element, and return to the step of determining whether the initial element corresponding to the page generation request exists in each of the preset elements in the preset database.
[0195] In a specific implementation, the aforementioned page generation device can add the user-input fill data to the corresponding placeholders. Any placeholder filled with data can constitute a new preset element, and the preset element is added to the preset database. Then, the process returns to the step of determining whether there is an initial element corresponding to the page generation request in each of the preset elements in the preset database, and repeats the above process to generate the target page. At this time, the preset elements constructed by the placeholders in the preset database can be the initial elements corresponding to the page generation request.
[0196] In this embodiment, when the initial element corresponding to the page generation request exists in the preset database, the target page style is generated using the initial element; when the initial element corresponding to the page generation request does not exist in the preset database, a placeholder is generated through the template page, and a new preset element is generated using the placeholder, so that the preset database can contain the initial element corresponding to the page generation request, thereby accurately generating the target page style and improving the generation accuracy of the target page.
[0197] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the long screenshot method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0198] This application also provides a page generation apparatus, please refer to... Figure 5 , Figure 5 This is a schematic diagram of the module structure of the page generation device for this application.
[0199] In this embodiment, the page generation device includes:
[0200] Request triggering module 10 is used to receive page generation requests;
[0201] Style building module 20 is used to obtain at least one initial element based on the page generation request to build the target page style;
[0202] Component building module 30 is used to build front-end page components corresponding to the initial elements according to the target page style;
[0203] Page generation module 40 is used to generate a target page composed of the front-end page components.
[0204] The page generation apparatus provided in this application, employing the page generation method described in the above embodiments, can solve the technical problems of low page generation efficiency and a large amount of repetitive work in the prior art. Compared with the prior art, the beneficial effects of the page generation apparatus provided in this application are the same as those of the page generation method provided in the above embodiments, and other technical features in the page generation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0205] In one implementation, the component building module 30 is further configured to generate data to be rendered based on the target page style; when the target page style is constructed by combining multiple initial elements, generate front-end basic components corresponding to each initial element based on the data to be rendered; and combine the front-end basic components to obtain a front-end page component.
[0206] In one implementation, the component building module 30 is further configured to determine whether there is location information associated with each of the front-end basic components, wherein the location information represents the display position of different front-end basic components on the front-end page; if so, the front-end basic components are combined at the positions corresponding to the location information on the front-end page to obtain a front-end page component.
[0207] In one implementation, the component construction module 30 is further configured to: if not, determine a first combination method of the base template constituting each of the initial elements; determine a second combination method of each of the initial elements constituting the target page style; combine each of the front-end basic components according to the first combination method to obtain a component block corresponding to each of the initial elements; and combine each of the component blocks according to the second combination method to obtain a front-end page component.
[0208] In one implementation, the page generation module 40 is further configured to receive a marking instruction triggered based on the target page; determine the target position information of the front-end page component in the target page according to the marking instruction; and associate the target position information with each of the front-end basic components.
[0209] In one implementation, the style construction module 20 is further configured to obtain a preset database containing at least one pre-built preset element; determine whether an initial element corresponding to the page generation request exists among the preset elements in the preset database; and if so, generate a target page style based on the initial element.
[0210] In one implementation, the style construction module 20 is further configured to: if not, obtain the template page associated with the page generation request; generate corresponding placeholders based on the front-end page components of the template page; receive fill data input based on the placeholders; add the fill data to the placeholders to generate preset elements, and perform the operation of determining whether the initial element corresponding to the page generation request exists in each of the preset elements in the preset database.
[0211] In one implementation, the style construction module 20 is further configured to, if not, obtain the webpage address carried in the page generation request; determine the corresponding template page based on the webpage address; and / or, if not, obtain user history data; and obtain the template page generated by the page generation request from the user history data.
[0212] In one implementation, the style construction module 20 is further configured to construct multiple baseline templates based on the input template data; generate preset elements based on each baseline template; and add the preset elements to the preset database.
[0213] In one implementation, the style construction module 20 is also used to fill different module data into any base template to generate corresponding preset elements; and / or to select different base templates for combination to generate corresponding preset elements; and / or to select different contents in different base templates for combination to generate corresponding preset elements.
[0214] This application provides a page generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the page generation method in Embodiment 1 above.
[0215] The following is for reference. Figure 6 , Figure 6 This is a schematic diagram of the hardware operating environment involved in the page generation method in the embodiments of this application, showing a structural diagram of a page generation device suitable for implementing the embodiments of this application. The page generation device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The page generation device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0216] like Figure 6As shown, the page generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the page generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the page generation device to communicate wirelessly or wiredly with other devices to exchange data. Although page generation devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0217] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0218] The page generation device provided in this application, employing the page generation method described in the above embodiments, can solve the technical problems of low page generation efficiency and a large amount of repetitive work in the prior art. Compared with the prior art, the beneficial effects of the page generation device provided in this application are the same as those of the page generation method provided in the above embodiments, and other technical features of this page generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0219] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0220] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0221] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the page generation method in the above embodiments.
[0222] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0223] The aforementioned computer-readable storage medium may be included in the page generating device; or it may exist independently and not be assembled into the page generating device.
[0224] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a page generation device, cause the page generation device to: receive a triggered page generation request; obtain at least one pre-built initial element according to the page generation request and generate a target page style; construct a front-end page component corresponding to the initial element according to the target page style; and generate a target page composed of the front-end page component.
[0225] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0226] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0227] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0228] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described page generation method. This solves the technical problem of low page generation efficiency due to a large amount of repetitive work in the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the page generation method provided in the above embodiments, and will not be repeated here.
[0229] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the page generation method described above.
[0230] The computer program product provided in this application can solve the technical problems of low page generation efficiency due to a large amount of repetitive work in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the page generation method provided in the above embodiments, and will not be repeated here.
[0231] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A page generation method, characterized in that, The method includes: Receive page generation request; Based on the page generation request, at least one pre-built initial element is obtained to generate the target page style; Construct the front-end page component corresponding to the initial element based on the target page style; Generate the target page composed of the aforementioned front-end page components.
2. The page generation method as described in claim 1, characterized in that, The step of constructing the front-end page component corresponding to the initial element based on the target page style includes: Generate data to be rendered based on the target page style; When the target page style is constructed by combining multiple initial elements, front-end basic components corresponding to each initial element are generated according to the data to be rendered; The aforementioned basic front-end components are combined to obtain front-end page components.
3. The page generation method as described in claim 2, characterized in that, The step of combining the aforementioned basic front-end components to obtain front-end page components includes: Determine whether there is location information associated with each of the aforementioned front-end basic components, wherein the location information represents the display position of different front-end basic components on the front-end page; If so, the various basic front-end components are combined at the positions corresponding to the location information in the front-end page to obtain the front-end page components.
4. The page generation method as described in claim 3, characterized in that, After the step of determining whether location information associated with each of the aforementioned front-end basic components exists, the method further includes: If not, then determine the first combination of the reference templates constituting each of the initial elements; Determine a second combination of the initial elements that constitute the target page style; The front-end basic components are combined according to the first combination method to obtain the component blocks corresponding to each initial element; The component blocks are combined according to the second combination method to obtain the front-end page components.
5. The page generation method according to any one of claims 1 to 4, characterized in that, The step of obtaining at least one pre-built initial element to generate the target page style according to the page generation request includes: Obtain a preset database, which contains at least one pre-constructed preset element; Determine whether the initial element corresponding to the page generation request exists in each of the preset elements in the preset database; If so, then generate the target page style based on the initial element.
6. The page generation method as described in claim 5, characterized in that, After the step of determining whether the initial element corresponding to the page generation request exists among the preset elements in the preset database, the method further includes: If not, obtain the template page associated with the page generation request; Generate corresponding placeholders based on the front-end page components of the template page; Receive padding data based on the placeholder input; The data to be filled is added to the placeholder to generate a preset element, and the process returns to the step of determining whether the initial element corresponding to the page generation request exists in each of the preset elements in the preset database.
7. The page generation method as described in claim 5, characterized in that, Before the step of obtaining the preset database, the method further includes: Construct multiple baseline templates based on the input template data; Generate preset elements based on each of the aforementioned benchmark templates; Add the preset element to the preset database.
8. A page generation apparatus, characterized in that, The device includes: The request triggering module is used to receive page generation requests; The style building module is used to obtain at least one initial element based on the page generation request and build the style of the target page. The component building module is used to build the front-end page components corresponding to the initial elements according to the target page style; The page generation module is used to generate a target page composed of the aforementioned front-end page components.
9. A page generation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the page generation method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the page generation method as described in any one of claims 1 to 7.