Page generation methods, apparatus, devices and storage media
By dynamically generating page and functional data on the server side, and combining it with the routing and component system of the Vue framework, the problem of low efficiency in creating simple pages in existing technologies is solved, enabling flexible and efficient page development and display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies are inefficient and lack flexibility when generating simple pages, resulting in high page creation costs.
Page and functional data are dynamically generated on the server side. By utilizing front-end routing and component rendering technologies, combined with the routing and component system of the Vue framework, page paths are dynamically constructed and displayed on terminal devices.
It simplifies the development process of simple pages, improves page creation efficiency, meets the personalized needs of different users, and expands the scope of application of pages.
Smart Images

Figure CN115828013B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a page generation method, apparatus, device, and storage medium. Background Technology
[0002] In single-page applications, the page does not refresh not only during page interactions but also during page navigation. To achieve single-page applications, front-end routing needs to be introduced, that is, matching different paths, parsing the paths, and then dynamically rendering the page content.
[0003] When generating pages, related technologies typically involve building the page on the front end and then calling the back end interface to render the data, thereby generating the page. However, this method is relatively complex and lacks flexibility. If you want to generate simpler pages, it suffers from low page creation efficiency. Summary of the Invention
[0004] This application provides a page generation method, apparatus, device, and storage medium to address the problem of low efficiency in page creation when generating relatively simple pages in related technologies.
[0005] In a first aspect, embodiments of this application provide a page generation method applied to a server. The page generation method includes: in response to detecting a creation request to create a target function in a target page, determining whether the target page exists; if the target page exists, calling a first interface to create the target function in the target page; configuring corresponding function data for the target function; storing the page data and function data corresponding to the target page in a database, the database being used to provide the page data and function data to a terminal device, and the terminal device being used to generate and display the target page based on the page data and function data.
[0006] In one possible implementation, the method further includes: if the target page does not exist, calling a second interface to create the target page.
[0007] In one possible implementation, calling the second interface to create a target page includes: calling the second interface to create routing information and page configuration data corresponding to the target page, wherein the page data includes routing information and page configuration data; and creating the target page based on the routing information and page configuration data.
[0008] In one possible implementation, after calling the second interface to create routing information and page configuration data corresponding to the target page, the method further includes: determining whether to create personalized functions for the target page; in response to creating personalized functions for the target page, creating personalized function parameters for the target page, wherein the page data includes personalized function parameters; and correspondingly, creating the target page based on the routing information and page configuration data includes: creating the target page based on the routing information, page configuration data, and personalized function parameters.
[0009] In one possible implementation, after creating the target page based on routing information and page configuration data, the method further includes: rendering the target page using a functional component, wherein the functional component is configured with a data source, the data source is used to provide preset display content for the functional component, and the data in the data source includes page data and functional data.
[0010] Secondly, embodiments of this application provide a page generation method applied to a terminal device. The page generation method includes: responding to a request to display a target page; obtaining page data and function data corresponding to the target page, wherein the page data and function data are data stored in a database by a server, and the function data are data configured for the target function when the server calls an interface to create the target function in the target page; generating a dynamic route based on the page data and function data; combining the dynamic route and the terminal route of the terminal device to obtain a target route; and redirecting to and displaying the target page according to the target route.
[0011] In one possible implementation, generating dynamic routes based on page data and function data includes: in response to determining that a target page has personalized functions, obtaining personalized function parameters of the target page; and generating dynamic routes based on page data, function data, and personalized function parameters.
[0012] In one possible implementation, in response to a request to display a target page, obtaining page data and function data corresponding to the target page includes: in response to a request to display a target page, determining whether routing information for the target page exists; if the routing information does not exist, calling a backend interface to obtain page data and function data; correspondingly, it also includes: if the routing information exists, displaying the target page according to the routing information.
[0013] Thirdly, embodiments of this application provide a page generation apparatus applied to a server. The page generation apparatus includes: a determining module, configured to determine whether a target page exists in response to a detected creation request for creating a target function on a target page; a creating module, configured to call a first interface to create a target function on the target page if the target page exists; a configuring module, configured to configure corresponding function data for the target function; and a storage module, configured to store page data and function data corresponding to the target page in a database, wherein the database is used to provide page data and function data to a terminal device, and the terminal device is used to generate and display the target page based on the page data and function data.
[0014] Fourthly, embodiments of this application provide a page generation apparatus applied to a terminal device. The page generation apparatus includes: an acquisition module, configured to display a target page in response to a request, and to acquire page data and function data corresponding to the target page, wherein the page data and function data are data stored in a database by a server, and the function data are data configured for the target function when the server calls an interface to create the target function on the target page; a generation module, configured to generate a dynamic route based on the page data and function data; a processing module, configured to combine the dynamic route and the terminal route of the terminal device to obtain a target route; and a display module, configured to jump to and display the target page according to the target route.
[0015] Fifthly, embodiments of this application provide a server, including: a processor, a memory, and an interaction interface; the memory is used to store executable instructions that can be executed by the processor, and the processor is configured to execute the page generation method of the first aspect by executing the executable instructions.
[0016] In a sixth aspect, embodiments of this application provide a terminal device, including: a processor, a memory, and an interaction interface; the memory is used to store executable instructions that can be executed by the processor, and the processor is configured to execute the page generation method of the second aspect by executing the executable instructions.
[0017] In a seventh aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the page generation method of either the first or second aspect.
[0018] Eighthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the page generation method of either the first or second aspect.
[0019] The page generation method, apparatus, device, and storage medium provided in this application embodiment can add new pages and functions to pages through a server, and generate corresponding page data and function data stored in a database. This page data and function data can be used to render corresponding components so that the page can be obtained through component rendering. When the page is displayed on the terminal device, the corresponding page data and function data can be obtained from the server's database to generate dynamic routes. The dynamic routes are then combined with the terminal routes of the terminal device to obtain new routes. Based on the new routes, the user can jump to the corresponding page and display the page. Since the routes and pages are combined, the process can be simplified and the efficiency of page creation can be improved, whether for complex or simple page design. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the structure of the page generation system provided in the embodiments of this application;
[0022] Figure 2 A flowchart of Embodiment 1 of the page generation method provided in this application;
[0023] Figure 3 A flowchart of Embodiment 2 of the page generation method provided in this application;
[0024] Figure 4 This is a schematic diagram of the structure of a page generation apparatus according to an embodiment of this application;
[0025] Figure 5 This is a schematic diagram of the structure of a second embodiment of the page generation apparatus provided in this application.
[0026] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;
[0027] Figure 7 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.
[0029] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] The following is a brief explanation of the terms used in this application.
[0031] Routing: In single-page applications (SPAs), not only are page interactions non-refreshing, but page transitions are also non-refreshing. To achieve this, front-end routing was developed. Similar to server-side routing, front-end routing matches different Uniform Resource Locator (URL) paths, parses the URL path, and dynamically renders the corresponding HTML content, ensuring that the page does not refresh even when the URL path changes.
[0032] The related technologies provided in the background section have at least the following technical problems:
[0033] With the development of web page creation, page functionality restructuring has become increasingly frequent. Componentizing numerous visible functions and separating visual page components from backend data allows for more flexible page construction. Currently, in related technologies, page generation typically involves the frontend writing a page and then calling backend APIs to render data and create the page. However, this method is costly to maintain, lacks flexibility, and has high development and deployment costs. Even for a simple page, the entire development process is required, resulting in low efficiency in page creation.
[0034] To address the aforementioned problems, the inventors conceived the following: When it is necessary to temporarily display simple or specialized pages, but these pages are not permanent, a solution is needed to generate temporary or specialized pages due to the different display needs of different users. In this process, rich components can be used to dynamically generate pages, and page and functional designs can be saved on the backend. The frontend can dynamically generate routes, or display completely different pages even when the same route already exists. Because a large number of components were refactored in the early stages, components and data were separated, and the input data was subsequently made constructible. Therefore, by adding data to be displayed and customizing the structure of the returned data, dynamic page construction can be achieved. Thus, this application can utilize the Vue framework as the underlying frontend technology, using Vue's route to dynamically generate page paths, then generating dynamic routes on the frontend, and combining the dynamic routes with the terminal routes to regenerate new routes, thus avoiding the inability to navigate to newly generated pages due to missing frontend routes. Furthermore, dynamic page components can be loaded to load the required page components, thereby rendering new pages. This allows for the editing or development of simple pages at any time, simplifying the development of simple pages and improving the efficiency of page creation.
[0035] In one embodiment, the page generation method can be applied in an application scenario. Figure 1 This is a schematic diagram of the structure of the page generation system provided in the embodiments of this application, such as... Figure 1 As shown, in this scenario, the page generation system may include a server and terminal devices, and the server may include a database.
[0036] In the above scenario, the server provides two functions: page generation management and page function generation management. When a new page needs to be generated, the server can use the page generation management function to add the page's route name and corresponding page data, and then save the route name and page data to the database. When adding a new page, personalized page configurations can be performed to meet the page display needs of different users. The server can render multiple functional components based on the page data saved in the database, and combine these components to render different pages. These functional components are configured with data sources, which allow the functional components to display corresponding content.
[0037] In the above scenario, when a new page function needs to be added, the server can add the function to the existing page through the page function generation and management function. The server can add the function name and the corresponding page jump address, so that the corresponding page can be accessed through the added function.
[0038] In the above scenario, when displaying a page, the terminal device can first listen to whether the route to the page to be accessed exists on the terminal device. If it exists, it can directly jump to that page and display it. If it does not exist, it can call the backend interface to obtain the page data and function data of the page to be accessed, and determine whether the page to be accessed exists on the server. If it does not exist, it will jump to a 404 page; if it exists, it will merge the route of the page to be accessed into the terminal device to form a new route, and then jump to that page according to the new route and display it. This allows for the editing or development of simple pages at any time, thereby simplifying the development of simple pages and improving the efficiency of page creation.
[0039] In light of the above scenarios, the technical solution of the page generation method provided in this application will be described in detail below through several specific embodiments.
[0040] This application provides a page generation method for use on a server. Figure 2 The flowchart of Embodiment 1 of the page generation method provided in this application is as follows: Figure 2 As shown, the method includes the following steps:
[0041] S201: In response to detecting a creation request for creating a target function on a target page, determine whether the target page exists.
[0042] In this step, the server can be a personal computer (PC) server, referred to simply as the PC client. The PC client can provide page generation management functions and page function generation management functions. The page generation management function can be used to generate pages, and the page function generation management function can be used to generate page functions.
[0043] Specifically, when the server detects a creation request that requires creating a target function on a target page, it can first determine whether the target page is an existing page on the server. If the target page is an existing page on the server, the server can directly create the function. If the target page is not an existing page on the server, the server needs to create the target page before it can create the function.
[0044] S202: If the target page exists, call the first interface to create the target function on the target page.
[0045] In this step, if the target page is an existing page on the server, the server can directly call the first interface to create the required target function on the target page, thereby adding page functionality.
[0046] S203: Configure the corresponding function data for the target function.
[0047] In this step, the function data may include the function name and redirect address corresponding to the target function. The redirect address can be the address of the page that exists on the server. After configuring the corresponding function data for the target function, the page corresponding to the redirect address can be accessed when using the target function.
[0048] S204: Store the page data and function data corresponding to the target page in the database.
[0049] In this step, the database is used to provide page data and function data to the terminal device, which in turn generates and displays the target page based on the page data and function data.
[0050] Specifically, after adding functions to the target page when it already exists, the page data and function data corresponding to the target page can be stored in the database. When the terminal device needs to display the target page, it can retrieve the page data and function data corresponding to the target page from the server's database, thereby rendering and displaying the target page.
[0051] The page generation method provided in this embodiment creates a target function for the target page by calling an interface when the target page exists, and configures corresponding function data for the target function, including the function name and jump address. The page data corresponding to the target page and the function data corresponding to the target function are stored in a database. When the terminal device displays the target page, it can render the target page based on the page data and function data. After displaying the target page, the user can jump to the corresponding jump page through the target function and display the jump page. This allows for the editing or development of simple pages at any time, simplifying the development of simple pages and improving the efficiency of page creation.
[0052] In one embodiment, the method further includes: if the target page does not exist, calling a second interface to create the target page.
[0053] In this scheme, when the server detects a request to create a target function on the target page, if the target page does not exist, it needs to call the second interface to create the target page. Only in this way can the target function be added to the target page. Thus, when using the target function, the page corresponding to the jump address configured for the target function can be accessed. This allows for the editing or development of simple pages at any time, simplifies the development of simple pages, and improves the efficiency of page creation.
[0054] In one embodiment, calling the second interface to create a target page includes: calling the second interface to create routing information and page configuration data corresponding to the target page, wherein the page data includes routing information and page configuration data; and creating the target page based on the routing information and page configuration data.
[0055] In this scheme, routing information can be used to determine the name of the target page, or it can be a route name. Page configuration data can be the configuration data corresponding to the page structure. When calling the second interface to create the target page, the routing information and page configuration data of the target page can be added first by calling the second interface, thereby realizing the creation of the target page.
[0056] Specifically, the page configuration data of the target page can be used to create rendering components for the target page, which can then be combined to form the target page. This allows for the editing or development of simple pages at any time, simplifying the development of basic pages and improving the efficiency of page creation.
[0057] In one embodiment, after calling the second interface to create routing information and page configuration data corresponding to the target page, the method further includes: determining whether to create personalized functions for the target page; in response to creating personalized functions for the target page, creating personalized function parameters for the target page, wherein the page data includes personalized function parameters; and correspondingly, creating the target page based on the routing information and page configuration data includes: creating the target page based on the routing information, page configuration data, and personalized function parameters.
[0058] In this solution, the server can provide personalization features when adding new pages. These features allow for the addition of specific page configurations, such as regional segmentation. That is, different pages can be generated for the same route name based on the different needs of different regions. Furthermore, configurable fields can be provided to enrich the page with more customized features. Therefore, personalized parameters can be created for the target page. By combining routing information, page configuration data, and personalized parameters, the target page can be created, thus meeting the diverse needs of different users, improving the user experience, and expanding the applicability of the generated pages.
[0059] Specifically, after creating the target page based on routing information, page configuration data, and personalized function parameters, all the data corresponding to the created target page can be used as the initial dynamic page data.
[0060] In one embodiment, after creating the target page based on routing information and page configuration data, the method further includes: rendering the target page using a functional component, wherein the functional component is configured with a data source, the data source is used to provide preset display content for the functional component, and the data in the data source includes page data and functional data.
[0061] In this solution, when generating a page, different functional components need to be combined to obtain the target page. Therefore, multiple functional components can be obtained by rendering the page data corresponding to the target page first, and then the target page can be rendered using the functional components. The result of the target page being displayed on the terminal device can be seen in real time on the server, which makes it easier to adjust the layout of the target page.
[0062] Specifically, the functional components are configured with a data source, which can be a default data source or a dynamically acquired data source. When configuring a dynamically acquired data source for a functional component, specific fields can be specified to allow the functional component to retrieve specific content from the data source. This allows users to view the corresponding content when interacting with the functional component. This simplifies the development of simple pages and improves the efficiency of page creation.
[0063] This application also provides a page generation method, which is applied to a terminal device. Figure 3 The flowchart of Embodiment 2 of the page generation method provided in this application is as follows: Figure 3 As shown, the method includes the following steps:
[0064] S301: In response to the request, display the target page and obtain the page data and function data corresponding to the target page.
[0065] In this step, page data and function data are data stored in the database by the server, while function data is the data configured for the target function when the server calls the interface to create the target function on the target page.
[0066] Specifically, the terminal device can act as the main body for displaying the page generated by the server. When a request to display the target page is detected, it can call the backend interface to query whether the target page exists. If the page data and function data of the target page are obtained, it is determined that the target page exists.
[0067] Specifically, after creating the target page, the server uses all the data corresponding to the target page as initial dynamic page data. Therefore, when the target page exists, the terminal device can determine whether the target page is a newly generated page based on the obtained page data and functional data. When the page data and functional data are initial dynamic page data, the target page is indeed a newly generated page.
[0068] Optionally, the terminal device can actively retrieve page data and function data from the server's database by calling the interface, or it can receive page data and function data sent by the server.
[0069] S302: Generate dynamic routes based on page data and function data.
[0070] In this step, the target page is a newly generated page, so the route corresponding to the target page can be generated based on the page data and function data, which is called dynamic routing.
[0071] Specifically, a terminal device can request the server to determine whether the target page is a newly generated page after the terminal device is initialized.
[0072] S303: Combine dynamic routes and terminal routes of terminal devices to obtain the target route.
[0073] In this step, if the target page is a newly generated page after the terminal device is initialized, the terminal device can combine the dynamic route and the terminal route of the terminal device itself to obtain the target route, so that the terminal device can jump to the page according to the target route.
[0074] S304: Based on the target route, redirect and display the target page.
[0075] In this step, after obtaining the target route, the terminal device can jump to and display the target page. The terminal device can display the target page by integrating component data, page data, and functional data, thereby achieving the effect of generating a new page.
[0076] The page generation method provided in this application determines the dynamic route corresponding to the target page by obtaining the page data corresponding to the target page and the function data corresponding to the target function. The terminal device can then combine the dynamic route with its own terminal route to obtain a new target route, and display the target page according to the target route. This allows for the editing or development of simple pages at any time, simplifying the development of simple pages and improving the efficiency of page creation.
[0077] In one embodiment, generating a dynamic route based on page data and function data includes: in response to determining that a target page has personalized functions, obtaining personalized function parameters of the target page; and generating a dynamic route based on the page data, function data, and personalized function parameters.
[0078] In this scheme, when generating dynamic routes based on page data and function data, due to the existence of personalized pages, the terminal device can request the server to determine whether the target page has personalized function parameters. If the target page has personalized function parameters, dynamic routes can be generated based on the page data, function data, and personalized function parameters. This allows the dynamic routes to be combined with the terminal device's original terminal routes, thus completing the terminal device initialization.
[0079] Optionally, after determining the dynamic route through routing information, page configuration data, and personalized function parameters, the target route is obtained by combining the dynamic route with the terminal route. After the terminal device jumps according to the target route, the displayed target page can meet the diverse needs of different users, thereby improving the user experience and expanding the applicability of the target page.
[0080] In one embodiment, in response to a request to display a target page, obtaining page data and function data corresponding to the target page includes: in response to a request to display a target page, determining whether routing information for the target page exists; if the routing information does not exist, calling a backend interface to obtain page data and function data; correspondingly, it also includes: if the routing information exists, displaying the target page according to the routing information.
[0081] In this solution, during the initialization of the terminal device, new pages may be added to functions or within existing pages. If a new page is added, the page to be navigated to after using the function, i.e., the target page, may not exist on the server. In this case, the user will be redirected directly to an error page, such as a 404 page. Therefore, during the redirection to the target page, the system can monitor whether the routing information corresponding to the target page exists on the terminal device. If the routing information for the target page does not exist on the terminal device, the terminal device can call the backend interface to request the server in real time to obtain page data and function data. If the page data and function data are obtained, it indicates that the target page is a newly added page on the server. Therefore, the target page can be reassembled and a new route can be generated. This newly generated route is the dynamic route. The dynamic route is then merged into the terminal device's terminal route to obtain the target route. Thus, the terminal device can navigate to and display the target page based on the target route.
[0082] Optionally, if the routing information corresponding to the target page does not exist on the terminal device, the user is redirected to a 404 page. Therefore, this allows for the editing or development of simple pages at any time, simplifying the development of simple pages and improving the efficiency of page creation.
[0083] The page generation method provided in this embodiment is based on the front-end framework Vue. Vue provides efficient data binding and a flexible component system through a concise Application Programming Interface (API). Furthermore, it utilizes Vue's two-way data binding, also known as reactive data binding. When generating the page, Vue dynamically imports components, adding page configuration data returned from the backend, and dynamically renders the required components. Additionally, based on the data binding logic designed and implemented in the components, it supports initial data configuration and can also dynamically set data binding fields using API data, flexibly binding data to components. Vue automatically responds synchronously to changes in certain data on the page. In other words, Vue automatically responds to data changes and modifies all bound data and view content according to the binding relationships pre-written by the user in the code. This approach allows for dynamic binding of data within components based on initializing local data, and importing these components into the terminal devices where they need to be displayed. When a page needs to be generated, these components can be imported into the page. Through dynamic component binding and data binding, different pages can be generated with a small amount of data. Furthermore, by leveraging Vue's routing system, dynamic routing can be added to dynamically import newly generated pages into the terminal devices. This ensures smooth page display on the terminal devices and allows for page updates even without going live.
[0084] This application also provides a page generation apparatus for use on a server. Figure 4 This is a schematic diagram of the structure of a page generation device according to an embodiment of this application, as shown in the diagram. Figure 4 As shown, the page generation device 400 includes:
[0085] The determination module 401 is used to determine whether the target page exists in response to detecting a creation request for creating the target function on the target page;
[0086] Create module 402, which is used to call the first interface to create the target function on the target page if the target page exists;
[0087] Configuration module 403 is used to configure the corresponding functional data for the target function;
[0088] Storage module 404 is used to store page data and function data corresponding to the target page in the database. The database is used to provide page data and function data to the terminal device. The terminal device is used to generate and display the target page based on the page data and function data.
[0089] Optionally, the creation module 402 is also used to call the second interface to create the target page if the target page does not exist.
[0090] Optionally, when creating the target page by calling the second interface, the creation module 402 is specifically used to: call the second interface to create the routing information and page configuration data corresponding to the target page, wherein the page data includes routing information and page configuration data; and create the target page based on the routing information and page configuration data.
[0091] Optionally, the page generation device 400 further includes a processing module (not shown), which is specifically used to: after calling the second interface to create routing information and page configuration data corresponding to the target page, determine whether to create personalized functions for the target page; in response to creating personalized functions for the target page, create personalized function parameters for the target page, and the page data includes personalized function parameters; correspondingly, when the creation module 402 creates the target page based on the routing information and page configuration data, it is specifically used to: create the target page based on the routing information, page configuration data and personalized function parameters.
[0092] Optionally, the processing module is also specifically used for: after creating the target page based on the routing information and page configuration data, rendering the target page using functional components. The functional components are configured with a data source, which is used to provide preset display content for the functional components. The data in the data source includes page data and functional data.
[0093] The page generation apparatus provided in this embodiment is used to execute the technical solution of the page generation method applied to the server in the aforementioned method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0094] This application also provides a page generation apparatus for use in terminal devices. Figure 5 This is a schematic diagram of the structure of a second embodiment of the page generation device provided in this application, as shown below. Figure 5 As shown, the page generation device 500 includes:
[0095] The acquisition module 501 is used to display the target page in response to a request, and to acquire the page data and function data corresponding to the target page. The page data and function data are data stored in the database by the server, and the function data are the data configured for the target function when the server calls the interface to create the target function in the target page.
[0096] The generation module 502 is used to generate dynamic routes based on page data and function data;
[0097] Processing module 503 is used to combine dynamic routing and terminal routing of terminal devices to obtain target routing;
[0098] Display module 504 is used to redirect to and display the target page based on the target route.
[0099] Optionally, when generating dynamic routes based on page data and function data, the generation module 502 is specifically used to: in response to determining that the target page has personalized functions, obtain the personalized function parameters of the target page; and generate dynamic routes based on page data, function data, and personalized function parameters.
[0100] Optionally, when the acquisition module 501 responds to a request to display the target page and acquires the page data and function data corresponding to the target page, it is specifically used to: determine whether the routing information of the target page exists in response to a request to display the target page; if the routing information does not exist, call the backend interface to acquire the page data and function data; correspondingly, the display module 504 is also used to: if the routing information exists, display the target page according to the routing information.
[0101] The page generation apparatus provided in this embodiment is used to execute the technical solution of the page generation method applied to the terminal device in the aforementioned method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0102] This application also provides a terminal device. Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.
[0103] like Figure 6 As shown, the terminal device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output interface 612, a sensor component 614, and a communication component 616. The input / output interface 612 may also be referred to as an I / O interface 612.
[0104] Processing component 602 typically controls the overall operation of terminal device 600, including operations related to display and data transmission. Processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the page generation method described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0105] Memory 604 is configured to store various types of data to support operation on terminal device 600. Examples of this data include instructions for any application or method operating on terminal device 600. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0106] Power supply component 606 provides power to various components of terminal device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to terminal device 600.
[0107] Multimedia component 608 includes a screen that provides an output interface between terminal device 600 and a user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.
[0108] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when terminal device 600 is in operating mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0109] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, start buttons and lock buttons.
[0110] Sensor assembly 614 includes one or more sensors for providing status detection of various aspects of terminal device 600. For example, sensor assembly 614 can detect the on / off state of terminal device 600, the presence or absence of user contact with terminal device 600, the orientation or acceleration / deceleration of terminal device 600, and temperature changes of terminal device 600. In some embodiments, sensor assembly 614 may further include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0111] Communication component 616 is configured to facilitate wired or wireless communication between terminal device 600 and other devices. Terminal device 600 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0112] This application also provides a server. Figure 7 This is a schematic diagram of a server structure provided for an embodiment of this application. Exemplarily, the server can be provided as a computer. (Refer to...) Figure 7 The server 700 includes a processing component 701, which further includes one or more processors, and memory resources represented by memory 702 for storing instructions, such as applications, that can be executed by the processing component 701. The applications stored in memory 702 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 701 is configured to execute instructions to perform embodiments of the page generation method applied to the server described above.
[0113] Server 700 may also include a power supply component 703 configured to perform power management of server 700, a wired or wireless network interface 704 configured to connect server 700 to a network, and an input / output interface 705, which may also be referred to as I / O interface 705. Server 700 can operate on an operating system stored in memory 702, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0114] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM). The memory stores programs, which are then executed by the processor upon receiving execution instructions. Furthermore, the software programs and modules within the memory may include an operating system, which can include various software components and / or drivers for managing system tasks (e.g., memory management, storage device control, power management), and can communicate with various hardware or software components to provide an operating environment for other software components.
[0115] A processor can be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.
[0116] This application also provides a computer-readable storage medium, which includes a computer program. When executed by a processor, the computer program is used to implement the technical solution of the page generation method provided in the method embodiment.
[0117] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solution of the page generation method provided in the method embodiment.
[0118] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A page generation method characterized by, The page generation method applied to a server comprises: In response to detecting a creation request for creating a target function in a target page, determining whether the target page exists; If the target page exists, calling a first interface to create the target function in the target page; Configuring corresponding function data for the target function; wherein the function data comprises a function name and a jump address corresponding to the target function; Storing the page data corresponding to the target page and the function data in a database, the database being configured to provide the page data and the function data to a terminal device, the terminal device being configured to generate and display the target page according to the page data and the function data, so that the terminal device acquires the page data and the function data; generating a dynamic route according to the page data and the function data; combining the dynamic route with a terminal route of the terminal device to obtain a target route; and jumping to and displaying the target page according to the target route.
2. The page generation method of claim 1, wherein, Further comprising: If the target page does not exist, calling a second interface to create the target page.
3. The page generation method of claim 2, wherein, The calling of the second interface to create the target page comprises: Calling the second interface to create route information and page configuration data corresponding to the target page, the page data comprising the route information and the page configuration data; Creating the target page according to the route information and the page configuration data.
4. The page generation method of claim 3, wherein, Further comprising, after the calling of the second interface to create the route information and the page configuration data corresponding to the target page: Determining whether to create a personalized function for the target page; In response to the creation of the personalized function for the target page, creating a personalized function parameter for the target page, the page data comprising the personalized function parameter; Correspondingly, the creating of the target page according to the route information and the page configuration data comprises: Creating the target page according to the route information, the page configuration data and the personalized function parameter.
5. The page generation method according to claim 3 or 4, characterized by, Further comprising, after the creating of the target page according to the route information and the page configuration data: Rendering the target page by using a function component, the function component being configured with a data source, the data source being configured to provide preset display content for the function component, data in the data source comprising the page data and the function data.
6. A page generation method characterized by comprising: The page generation method applied to a terminal device comprises: In response to a request to display a target page, acquiring page data and function data corresponding to the target page, the page data and the function data being data stored in a database by a server, the function data being data configured by the server for a target function when calling an interface to create the target function in the target page; wherein the function data comprises a function name and a jump address corresponding to the target function; Generating a dynamic route according to the page data and the function data; Combining the dynamic route with a terminal route of the terminal device to obtain a target route; Jumping to and displaying the target page according to the target route.
7. The page generation method of claim 6, wherein, The generating the dynamic route according to the page data and the function data comprises: In response to determining that the target page has personalized functions, obtaining personalized function parameters of the target page; Generating the dynamic route according to the page data, the function data and the personalized function parameters.
8. The page generation method according to claim 6 or 7, characterized by, The obtaining the page data and the function data corresponding to the target page in response to the request to display the target page comprises: In response to the request to display the target page, determining whether the route information of the target page exists; If the route information does not exist, calling a backend interface to obtain the page data and the function data; Correspondingly, the method further comprises: If the route information exists, displaying the target page according to the route information.
9. A page generation apparatus characterized by comprising: The page generation apparatus applied to a server comprises: A determining module configured to, in response to detecting a creation request to create a target function in a target page, determine whether the target page exists; A creating module configured to, if the target page exists, call a first interface to create the target function in the target page; A configuring module configured to configure corresponding function data for the target function; wherein the function data comprises a function name and a jump address corresponding to the target function; A storage module configured to store page data corresponding to the target page and the function data into a database, wherein the database is configured to provide the page data and the function data to a terminal device, the terminal device is configured to generate and display the target page according to the page data and the function data, so that the terminal device obtains the page data and the function data; generate a dynamic route according to the page data and the function data; combine the dynamic route with a terminal route of the terminal device to obtain a target route; and jump to and display the target page according to the target route.
10. A page generation apparatus characterized by comprising: The page generation apparatus applied to a terminal device comprises: An obtaining module configured to, in response to a request to display a target page, obtain page data and function data corresponding to the target page, wherein the page data and the function data are data stored in a database by a server, and the function data is data configured for a target function by the server when calling an interface to create the target function in the target page; wherein the function data comprises a function name and a jump address corresponding to the target function; A generating module configured to generate a dynamic route according to the page data and the function data; A processing module configured to combine the dynamic route with a terminal route of the terminal device to obtain a target route; A display module configured to jump to and display the target page according to the target route.
11. A server, characterized by The page generation apparatus comprises: A processor, a memory and an interactive interface; The memory is configured to store executable instructions executable by the processor, and the processor is configured to execute the page generation method of any one of claims 1 to 5 by executing the executable instructions.
12. A terminal device, comprising: The page generation apparatus comprises: A processor, a memory and an interactive interface; The memory is configured to store executable instructions executable by the processor, and the processor is configured to execute the page generation method according to any one of claims 6-8 by executing the executable instructions.
13. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the page generation method according to any one of claims 1-8.
14. A computer program product, characterised in that, The computer program, when executed by a processor, implements the page generation method according to any one of claims 1-8.
Citation Information
Patent Citations
Page generation method, page generation device, equipment and storage medium
CN114035793A
Micro-front-end page generation method and device based on modularization, equipment and medium
CN115268914A