Page generation method, system, equipment and medium
By building a third-party platform database and page template, the page is quickly modified and generated, and the problems of many versions and high bug risks in the existing technology are solved, and the page stability and user experience are improved.
Patent Information
- Application Number
- CN202311818182.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, there are too many versions when modifying the page, and it is prone to bugs, resulting in unstable pages and affecting customer experience.
By building a database of a third-party platform, obtaining the page to be displayed, and obtaining the target page template and component information from the database based on preset matching conditions, binding the page to be displayed with the target page template, determining the display location of the component, generating the target page code, and realizing the rapid modification and generation of the page.
It reduces the number of code writing and distribution times, reduces the risk of page bugs, improves page stability and user experience, and improves work efficiency.
Smart Images

Figure CN120215934A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of code modification, and in particular, to a page generation method, system, device, and medium. Background Art
[0002] Currently, for the pages that users view in browsers or applets, some older pages may not have been separated between the front end and the back end and were rendered through JSP (JavaServer Pages, a Java technology for building dynamic web pages). Generally, they are separated between the front end and the back end. The front end is responsible for page display, and the back end is responsible for providing services. Therefore, the front-end pages consist of static and dynamic content. For example, for a PLP (Product Listing Page) page, the product list is rendered after obtaining product data, while the header and footer content are static. When modifying the static content in the future, the front end needs to modify the code, and when modifying the product arrangement order, the back end also needs to modify the code; these modifications may not seem significant to users, but they all need to go through a release process, and it cannot be guaranteed that there are no bugs in the modified page, resulting in a risk of instability of the page and affecting the customer experience. Summary of the Invention
[0003] The technical problem to be solved by the present disclosure is to overcome the defects in the prior art that there are too many release times when modifying pages and bugs are likely to exist when modifying pages, and to provide a page generation method, system, device, and medium.
[0004] The present disclosure solves the above technical problems through the following technical solutions:
[0005] According to a first aspect of the present disclosure, there is provided a page generation method, the page generation method including:
[0006] Construct a first database and a second database corresponding to a third-party platform; wherein, the first database includes a number of page templates, the second database includes a number of component information corresponding to different components, and different said component information has corresponding component codes;
[0007] Obtain a page to be displayed;
[0008] Based on a preset matching condition, obtain a target page template and target component information of a number of target components that match the page to be displayed from the first database and the second database;
[0009] Bind the page to be displayed to the target page template, and determine the display positions corresponding to different said target components based on the target page template;
[0010] Obtain a target page code according to the display position corresponding to each of the target components and the corresponding target component codes.
[0011] Generate a target display page corresponding to the page to be displayed based on the target page code for display on a target platform.
[0012] Preferably, the page to be displayed is a page corresponding to a mini-program application or a web page.
[0013] Among them, the page to be displayed is in a preset data platform, the page to be displayed is to be displayed on a target platform, and the third-party platform is communicatively connected to the preset data platform and the target platform respectively.
[0014] Preferably, the preset data platform includes a number of stores, each store corresponding to a different page to be displayed, and each page to be displayed having a corresponding target display page.
[0015] Preferably, before the step of obtaining the page to be displayed, the following steps are further included:
[0016] Send a data acquisition request to the preset data platform where the page to be displayed is located, and after receiving the response information indicating authorization to acquire data, execute the steps of the page to be displayed.
[0017] Or,
[0018] After obtaining the authorization information for authorizing data acquisition sent by the preset data platform where the page to be displayed is located, execute the step of obtaining the page to be displayed.
[0019] Preferably, the step of determining the display positions corresponding to different target components based on the target page template includes:
[0020] Obtain the display positions corresponding to each target component in the target page template under a preset operation.
[0021] Preferably, the page template is editable; and / or, the component information is editable.
[0022] Preferably, after the step of obtaining the page to be displayed and before the step of binding the page to be displayed to the target page template and determining the display positions corresponding to different target components based on the target page template, the following steps are further included:
[0023] Create a corresponding target page template based on the page attribute information of the page to be displayed.
[0024] According to a second aspect of the present disclosure, there is provided a page generation system, the page generation system including:
[0025] A database construction unit for constructing a first database and a second database corresponding to a third-party platform, wherein the first database includes a number of page templates; the second database includes a number of component information corresponding to different components, and different component information has corresponding component codes;
[0026] A page acquisition unit for acquiring a page to be displayed;
[0027] A target data acquisition unit for acquiring a target page template and target component information of a number of target components that match the page to be displayed from the first database and the second database based on a preset matching condition;
[0028] A template binding unit for binding the page to be displayed with the target page template and determining the display positions corresponding to different target components based on the target page template;
[0029] A target code generation unit for obtaining target page code according to the display positions corresponding to each target component and the corresponding target component codes;
[0030] A target page generation unit for generating a target display page corresponding to the page to be displayed based on the target page code for display on a target platform.
[0031] Preferably, the page to be displayed is a page corresponding to a mini-program application or a web page;
[0032] Wherein, the page to be displayed is in a preset data platform, the page to be displayed is to be displayed on a target platform, and the third-party platform is respectively communicatively connected to the preset data platform and the target platform.
[0033] Preferably, the preset data platform includes a number of stores, each store corresponds to a different page to be displayed, and each page to be displayed has a corresponding target display page.
[0034] Preferably, the page acquisition unit is further configured to send a data acquisition request to the preset data platform where the page to be displayed is located, and execute the steps of the page to be displayed after receiving response information indicating authorization to acquire data;
[0035] Or,
[0036] After acquiring authorization information for authorizing data acquisition sent by the preset data platform where the page to be displayed is located, execute the step of acquiring the page to be displayed.
[0037] Preferably, the template binding unit is further configured to acquire the display positions corresponding to each target component in the target page template under a preset operation.
[0038] Preferably, the page template is editable; and / or, the component information is editable.
[0039] Preferably, the target code generation unit is further configured to create a corresponding target page template based on the page attribute information of the page to be displayed.
[0040] According to a third aspect of the present disclosure, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the computer program, the page generation method described in the first aspect of the present disclosure is implemented.
[0041] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the page generation method described in the first aspect of the present disclosure is implemented.
[0042] Based on common knowledge in the art, the above preferred conditions can be combined arbitrarily to obtain various preferred embodiments of the present disclosure.
[0043] The positive and progressive effects of the present disclosure are as follows:
[0044] By obtaining the target page template and target component information in the third-party platform, the binding of the page to be displayed and the target page template can be achieved, and the display positions corresponding to different target components can be obtained. Thus, the modification of the page to be displayed can be quickly realized by dragging the target components. Different components have corresponding component codes, realizing the modification of the page to be displayed without changing the code, thereby reducing the code writing and release times, reducing the risk of page bugs, improving the stability of the page. Further, by dragging the target components, the work efficiency and the user experience are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic flow chart of the page generation method in an embodiment of the present disclosure;
[0046] Figure 2 It is a schematic architecture diagram of the third-party platform in an embodiment of the present disclosure;
[0047] Figure 3 It is a schematic structural diagram of establishing a template in an embodiment of the present disclosure;
[0048] Figure 4 It is a schematic structural diagram of obtaining a template in an embodiment of the present disclosure;
[0049] Figure 5 It is a schematic structural diagram of binding a template in an embodiment of the present disclosure;
[0050] Figure 6 Schematic diagram of changing the page to be modified in an embodiment of the present disclosure;
[0051] Figure 7 Schematic diagram of a page generation system in an embodiment of the present disclosure;
[0052] Figure 8 Schematic diagram of an electronic device in an embodiment of the present disclosure. Detailed implementation manners
[0053] The present disclosure will be further described below by way of embodiments, but the present disclosure is not limited to the scope of the described embodiments.
[0054] Embodiment 1
[0055] As Figure 1 shown, in a specific embodiment of the present disclosure, a page generation method is provided. Among them, the page generation method includes:
[0056] S11: Construct a first database and a second database corresponding to the third-party platform.
[0057] Among them, the first database includes a number of page templates, the second database includes a number of component information corresponding to different components, and different component information has corresponding component codes.
[0058] S12: Obtain the page to be displayed.
[0059] S13: Based on a preset matching condition, obtain a target page template that matches the page to be displayed and target component information of a number of target components from the first database and the second database.
[0060] S14: Bind the page to be displayed to the target page template, and determine the display positions corresponding to different target components based on the target page template.
[0061] S15: Obtain a target page code according to the display position corresponding to each target component and the corresponding target component code.
[0062] S16: Generate a target display page corresponding to the page to be displayed based on the target page code for display on the target platform.
[0063] The page template in this embodiment includes attributes such as template name, template type, and global configuration, and the page template in this embodiment is editable; and the component information in this embodiment includes system components and custom components, and the configuration of the page to be displayed is implemented through system components and / or custom components, and the component information in this embodiment is editable. That is, the page template and / or component information in the first database and / or the second database can be adjusted according to preset requirements to meet the flexible settings under various scenario requirements.
[0064] The page to be displayed in this embodiment is the page corresponding to a mini-program application or a web page; wherein, the page to be displayed is in a preset data platform, the page to be displayed is to be displayed in a target platform, and the third-party platform is respectively communicatively connected to the preset data platform and the target platform.
[0065] Further, the preset data platform in this embodiment includes several stores, each store corresponds to a different page to be displayed, and each page to be displayed has a corresponding target display page.
[0066] Among them, after changing the page to be displayed of any store in this embodiment and generating the target display page, by using the global configuration of the template, the changes of multiple pages under the corresponding store are realized.
[0067] In a specific implementation manner, the preset data platform in this embodiment can be any e-commerce platform.
[0068] In this embodiment, before the step of obtaining the page to be displayed, it further includes: sending a data acquisition request to the preset data platform where the page to be displayed is located, and after receiving the response information indicating authorization to acquire data, executing the step of the page to be displayed; or, after obtaining the authorization information for authorizing the acquisition of data sent by the preset data platform where the page to be displayed is located, executing the step of obtaining the page to be displayed, through the authorization operation of the page to be displayed, thereby improving the security of the data.
[0069] In addition, in this embodiment, the step of determining the display positions of different target components based on the target page template includes: obtaining the display positions corresponding to each target component in the target page template under a preset operation.
[0070] The component information in this embodiment includes system components and custom components, and the preset operation is a drag operation.
[0071] In a specific implementation manner, by dragging the target component with the corresponding code, the operations of adding, deleting, modifying, etc. of the components in the corresponding page are quickly realized, and the preview of the components is correspondingly displayed, thereby forming the target display page, so as to quickly obtain the corresponding code of the corresponding target display page, reducing the risk of bugs occurring on the page.
[0072] In this embodiment, after the step of obtaining the page to be displayed and before the step of binding the page to be displayed with the target page template and determining the display positions corresponding to different target components based on the target page template, the following steps are further included: creating a corresponding target page template based on the page attribute information of the page to be displayed. Thus, corresponding target components can be dragged at the target page template to quickly generate a target display page.
[0073] The following combines examples to specifically illustrate the implementation principle of the page generation method of the present disclosure:
[0074] The page generation method provided by the present disclosure is applied to a third-party platform, such as Figure 2 As shown, the third-party platform in this embodiment can be the light system (an efficient design system). Among them, the architecture of the light system includes: SPA APPEditor (an application editor) for querying components in the component library and realizing low-code drag-and-drop, configuring data of components, and saving configuration items of components by dragging components; a background service for providing storage of component library data and storage of page configuration item data; among them, CDN (Content Delivery Network, a distributed network solution) is used to cache configuration data; a client for accessing the page to be displayed, such as a mini-program end or an official website, to obtain configuration item data of the page to be displayed by calling a back-end interface.
[0075] Among them, the specific implementation steps for accessing the page to be displayed are as follows:
[0076] As Figure 3 shown, a template is established on the light system; the specific operation steps for establishing the template include: PIONEER (a page to be configured) - site building management - store decoration - component management - template management; at this time, global configuration of the template can also be performed.
[0077] Among them, store decoration can be understood as changing the interface to be displayed to generate a target display page; global configuration can be understood as overall and default configuration of the page of the template.
[0078] As Figure 4 shown, after successfully establishing the template, the exclusive code of the corresponding template can be obtained.
[0079] Further, the light system starts to access the page to be displayed; the specific steps are: creating an application PIONEER page (which can be understood as the page after accessing the page to be displayed) - site building management - store decoration - application management.
[0080] As Figure 5As shown, after connecting the page to be displayed to the light system, the light system will bind the corresponding template to the page to be displayed.
[0081] Process the page to be displayed to generate the target display page. The specific steps are as follows: page decoration (which can be understood as processing the page to be displayed) - save draft - publish the application (the published application at this time can be understood as the target display page).
[0082] Specifically, as Figure 6 shown, after binding the page to be displayed with the template, the specific page information will be displayed on the operation page of the light system. The specific page information includes component information and the information of the bound page to be displayed. The operator can directly drag the components of the page on this operation page to form the target display page according to the preset conditions. Among them, the corresponding components can also be changed through the page renderer to better match the preset conditions; this operation page also includes global configuration, so that the change of the page to be displayed can be quickly realized.
[0083] The specific implementation steps are as follows: S21: First, construct a template; S22: Bind the newly created mini-program application to the template; S23: Write the js files of the newly added components according to certain rules and store them on the Alibaba Cloud server; S24: Decorate the store for the mini-program application, construct the page by dragging the components, and for each component, its appearance, content, and specific interaction data can be configured; S25: Save the draft; S26: Obtain the latest component configuration data through the interface of the light system and publish the corresponding target display page to the target platform.
[0084] In addition, the light system can also help the tenant submit code and review authorization after modifying the page, realizing the automatic update of the mini-program and official website page content without modifying the code, but by modifying the configuration in the background; helping the tenant submit code to WeChat and review authorization, etc.
[0085] The light system also includes a preset code submission program and a submission interface. Among them, the preset code submission program includes several robots; the submission interface is an interface for communicating with the target platform; the target display page is published to the target platform by calling the submission interface through several robots; and the preset code submission program in the light system can also be used for the review of the code corresponding to the target display page.
[0086] By obtaining the target page template and target component information in the third-party platform, the page to be displayed can be bound to the target page template, and the display positions corresponding to different target components can be obtained. Thus, the page to be displayed can be quickly modified by dragging the target components. Different components have corresponding component codes, enabling the modification of the page to be displayed without changing the code. This reduces the number of code writings and release times, reduces the risk of page bugs, improves the page stability. Further, by dragging the target components, the work efficiency and user experience are improved.
[0087] Embodiment 2
[0088] As Figure 7 shown, in this embodiment, a page generation system is provided. The page generation system includes:
[0089] A database construction unit 100 for constructing a first database and a second database corresponding to the third-party platform. The first database includes several page templates; the second database includes several component information corresponding to different components, and different component information has corresponding component codes. Among them, the page template is editable; and / or, the component information is editable.
[0090] A page acquisition unit 200 for acquiring the page to be displayed. The page to be displayed is a page corresponding to a mini-program application or a web page. The page to be displayed is in a preset data platform and is to be displayed on a target platform. The third-party platform is respectively communicatively connected to the preset data platform and the target platform. The preset data platform includes several stores, each store corresponding to a different page to be displayed, and each page to be displayed has a corresponding target display page.
[0091] A target data acquisition unit 300 for acquiring the target page template and the target component information of several target components that match the page to be displayed from the first database and the second database based on a preset matching condition;
[0092] A template binding unit 400 for binding the page to be displayed to the target page template and determining the display positions corresponding to different target components based on the target page template;
[0093] A target code generation unit 500 for obtaining the target page code according to the display position corresponding to each target component and the corresponding target component code;
[0094] A target page generation unit 600 for generating the target display page corresponding to the page to be displayed based on the target page code to be displayed on the target platform.
[0095] The page acquisition unit 200 in this embodiment is further configured to send a data acquisition request to a preset data platform where the page to be displayed is located, and execute the steps of the page to be displayed after receiving the response information indicating authorization to acquire data; or, execute the step of acquiring the page to be displayed after acquiring the authorization information for authorizing data acquisition sent by the preset data platform where the page to be displayed is located.
[0096] The template binding unit 400 in this embodiment is further configured to acquire the display positions corresponding to each target component in the target page template under a preset operation.
[0097] The target code generation unit 500 in this embodiment is further configured to create a corresponding target page template based on the page attribute information of the page to be displayed.
[0098] It should be noted that for the page generation system in this embodiment, it is based on the corresponding method embodiment 1, so the relevant parts can be referred to the description in method embodiment 1.
[0099] By acquiring the target page template and target component information in the third-party platform, the page to be displayed can be bound to the target page template, and the display positions corresponding to different target components can be obtained. Thus, the page to be displayed can be quickly modified by dragging the target components. And different components have corresponding component codes, realizing the modification of the page to be displayed without changing the code, thereby reducing the code writing and release times, reducing the risk of page bugs, improving the stability of the page. Further, by dragging the target components, the work efficiency and the user experience are improved.
[0100] Embodiment 3
[0101] Figure 8 The following is a schematic structural diagram of an electronic device provided for this embodiment 3. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method in the above embodiment is implemented. Figure 8 The displayed electronic device 30 is only an example and should not bring any limitation to the functions and usage scope of this embodiment.
[0102] As Figure 8 shown, the electronic device 30 can be presented in the form of a general-purpose computing device. For example, it can be a server device. The components of the electronic device 30 may include, but are not limited to: at least one of the above-mentioned processors 31, at least one of the above-mentioned memories 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).
[0103] The bus 33 includes a data bus, an address bus, and a control bus.
[0104] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.
[0105] The memory 32 may also include a program / utilities 325 having a set (at least one) of program modules 324. Such program modules 324 include but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0106] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the methods in the above embodiments of the present disclosure.
[0107] The electronic device 30 may also communicate with one or more external devices 34 (such as a keyboard, a pointing device, etc.). Such communication may be carried out through an input / output (I / O) interface 35. Moreover, the model generation device 30 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 36. As Figure 8 shown, the network adapter 36 communicates with other modules of the model generation device 30 through the bus 33. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in combination with the model generation device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0108] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described units / modules may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided and embodied by multiple units / modules.
[0109] Embodiment 4
[0110] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps in the methods in the above embodiments are implemented.
[0111] Among them, the more specific forms that the readable storage medium may adopt may include but are not limited to: portable disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0112] In a possible implementation, the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps in the methods in the above embodiments.
[0113] Among them, the program code for executing the present disclosure can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, executed as an independent software package, partially on the user device and partially on a remote device, or entirely on a remote device.
[0114] Although the specific implementation manners of the present disclosure have been described above, those skilled in the art should understand that this is only an example. The protection scope of the present disclosure is defined by the appended claims. Without departing from the principles and essence of the present disclosure, those skilled in the art can make various changes or modifications to these implementation manners, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. A page generation method, characterized in that, The page generation method includes: Constructing a first database and a second database corresponding to a third-party platform; wherein, the first database includes several page templates, the second database includes several component information corresponding to different components, and different component information has corresponding component codes; Obtaining the page to be displayed; Based on a preset matching condition, obtaining a target page template that matches the page to be displayed and target component information of several target components from the first database and the second database; Binding the page to be displayed with the target page template, and determining the display positions corresponding to different target components based on the target page template; Obtaining a target page code according to the display position corresponding to each target component and the corresponding target component code; Generating a target display page corresponding to the page to be displayed based on the target page code for display on a target platform.
2. The page generation method according to claim 1, wherein The page to be displayed is a page corresponding to a mini-program application or a web page; Wherein, the page to be displayed is in a preset data platform, the page to be displayed is to be displayed on a target platform, and the third-party platform is respectively communicatively connected to the preset data platform and the target platform.
3. The page generation method according to claim 2, wherein The preset data platform includes several stores, each store corresponds to a different page to be displayed, and each page to be displayed has a corresponding target display page.
4. The page generation method according to claim 1, wherein Before the step of obtaining the page to be displayed, it further includes: Sending a data acquisition request to the preset data platform where the page to be displayed is located, and after receiving response information indicating authorization to acquire data, executing the step of the page to be displayed; Or, After obtaining authorization information for authorizing data acquisition sent by the preset data platform where the page to be displayed is located, executing the step of obtaining the page to be displayed.
5. The page generation method according to claim 1, wherein The step of determining the display positions corresponding to different target components based on the target page template includes: Obtaining the display position corresponding to each target component in the target page template under a preset operation.
6. The page generation method according to any one of claims 1-5, characterized in that, The page template is editable; and / or, the component information is editable.
7. The page generation method according to any one of claims 1-5, characterized in that Before the step of binding the page to be displayed with the target page template and determining the display positions corresponding to different target components based on the target page template after the step of obtaining the page to be displayed, it further includes: Creating a corresponding target page template based on the page attribute information of the page to be displayed.
8. A page generation system, characterized in that, The page generation system includes: A database construction unit for constructing a first database and a second database corresponding to a third-party platform, wherein the first database includes several page templates; the second database includes several component information corresponding to different components, and different component information has corresponding component codes; A page acquisition unit for acquiring the page to be displayed; A target data acquisition unit for obtaining a target page template that matches the page to be displayed and target component information of several target components from the first database and the second database based on a preset matching condition; A template binding unit, configured to bind the page to be displayed with the target page template, and determine the display positions corresponding to different target components based on the target page template; A target code generation unit, configured to obtain target page code according to the display positions corresponding to each target component and the corresponding target component code; A target page generation unit, configured to generate a target display page corresponding to the page to be displayed based on the target page code for display on a target platform.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, the page generation method according to any one of claims 1-7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the page generation method according to any one of claims 1-7 is implemented.