Page construction method, device, computer equipment and storage medium

By generating protocol chains and component libraries, the front-end page of the software platform is automatically built, which solves the problems of low construction efficiency and difficult maintenance in the existing technology, and realizes diversified construction and efficient maintenance of the page.

CN117873471BActive Publication Date: 2024-12-03DAWNING CLOUD COMPUTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311797093.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2024-12-03
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

In the construction of front-end pages of software platforms, the existing technology is low in construction efficiency and difficult to maintain, and the CMS components lack scalability and cannot meet diversified needs.

Method used

By obtaining page requirements data, generating protocol chains and component libraries, and automatically building pages, implementing diversified page construction, reducing maintenance difficulties, and improving construction efficiency.

Benefits of technology

It realizes flexible and diverse construction of pages, reduces maintenance difficulty and construction time, and improves construction efficiency without human coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117873471B_ABST
    Figure CN117873471B_ABST
Patent Text Reader

Abstract

The present application relates to a page construction method, device, computer equipment and storage medium, and relates to the field of Internet technology. The method includes: obtaining page requirement data for a page to be constructed; generating a protocol chain corresponding to the page to be constructed based on the page requirement data; wherein the protocol chain includes at least two layers of protocols; generating a component library corresponding to the page to be constructed based on the protocol chain; and constructing the page to be constructed based on the protocol chain and the component library. By using this method to associate protocols with components and to customize the component library in the page by generating a protocol chain, it is possible to flexibly modify and expand the various components that constitute the page, realize diversified construction of the page, and automatically construct the page, which can improve construction efficiency and reduce the difficulty of maintaining the constructed page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a page construction method, apparatus, computer equipment and storage medium. Background Art

[0002] With the continuous development of the Internet, enterprises in different fields all operate and maintain their own independent software platforms. Due to the increasing demand for online services, the front-end page construction of software platforms is becoming more and more complex.

[0003] At present, the front-end page construction of the software platform is generally achieved by developers manually writing page codes or using CMS (Content Management System). Among these two methods, the former has low construction efficiency and is difficult to maintain, while the latter is prone to page compatibility issues. In addition, due to the lack of scalability of components in CMS, the constructed pages cannot match the diverse needs of different software platforms well. Summary of the invention

[0004] Based on this, it is necessary to provide a page construction method, device, computer equipment and storage medium that can improve construction efficiency, reduce maintenance difficulty, and realize diversified page construction in response to the above technical problems.

[0005] In a first aspect, the present application provides a page construction method, the method comprising:

[0006] Obtain page requirement data for the page to be built;

[0007] Generate a protocol chain corresponding to the page to be constructed according to the page demand data; wherein the protocol chain includes at least two layers of protocols;

[0008] Generate the component library corresponding to the page to be built according to the protocol chain;

[0009] Build the page to be built according to the protocol chain and component library.

[0010] In the technical solution of the embodiment of the present application, a protocol chain is customized according to page demand data, so that a component library uniquely corresponding to the page to be created is configured through a protocol. This not only enables diversified construction of each component in the page to be constructed, but also helps to reduce the difficulty of subsequent maintenance. The automated construction process has the characteristics of high construction efficiency and does not require manual coding.

[0011] In one embodiment, the page to be constructed includes at least one of a header area, a content area, and a footer area. According to the page requirement data, a protocol chain corresponding to the page to be constructed is generated, including:

[0012] Generate the first layer protocol in the protocol chain according to the basic regional demand data of each region in the page demand data;

[0013] Generate a sub-protocol under the first-layer protocol according to the key area demand data of each area in the page demand data; wherein the sub-protocol includes at least one layer of protocol;

[0014] According to the first-layer protocol and the sub-protocols under the first-layer protocol, a protocol chain corresponding to the page to be built is generated.

[0015] In the technical solution of the embodiment of the present application, by defining the protocols of each layer of the protocol chain, the protocol of the page to be constructed is constructed in different regions, and the protocol chain is generated in a standardized manner. The generated protocol chain has a clear hierarchy, which is conducive to reducing the difficulty of maintaining the protocol chain.

[0016] In one embodiment, a component library corresponding to a page to be constructed is generated according to the protocol chain, including:

[0017] Generate parent components corresponding to each area in the page to be built according to the first-layer protocol in the protocol chain;

[0018] Generate subcomponents in the parent component according to the sub-protocol under the first-layer protocol;

[0019] Generate the component library corresponding to the page to be built based on the parent component and the child components in the parent component.

[0020] In the technical solution of the embodiment of the present application, a matching component library is generated according to the protocol chain, the parent component corresponds to the first-layer protocol, the child components in the parent component correspond to the child protocols under the first-layer protocol, and the component library is generated in a standardized manner. The generated component library has a clear hierarchy, which is conducive to reducing the difficulty of maintaining the component library. Compared with conventional component libraries, the custom-generated component library can better match different page requirements.

[0021] In one embodiment, building a page to be built according to the protocol chain and the component library includes:

[0022] Generate protocol configuration information of the protocol chain according to the protocol chain and component library;

[0023] According to the protocol configuration information of the protocol chain, the component library is rendered to construct the page to be constructed.

[0024] In the technical solution of the embodiment of the present application, the protocol configuration information required to construct the page to be constructed is generated through matching protocol chains and component libraries, and then the component library is rendered based on the protocol configuration information to construct the page to be constructed. This construction method can realize real-time viewing of the page effect of the page to be constructed. If it is necessary to modify a certain content in the page, it can be completed by reconfiguring the corresponding protocol and component based on the protocol configuration information without the need for manual coding.

[0025] In one embodiment, according to the protocol chain and the component library, the protocol configuration information of the protocol chain is generated, including:

[0026] Determine at least two pairs of matching groups according to the protocol chain and the component library; wherein each pair of matching groups includes a layer of protocol and a component corresponding to the layer of protocol;

[0027] According to the uniform resource locator URL address information of the page media data of the components in each matching group, the protocol configuration information corresponding to the protocol in each matching group is updated;

[0028] The protocol configuration information of the protocol chain is generated according to the updated protocol configuration information corresponding to each protocol.

[0029] In the technical solution of the embodiment of the present application, the matching protocol chains and component libraries are divided into multiple matching groups, and the protocol configuration information is generated based on the matching groups respectively to ensure the accuracy of the generated protocol configuration information.

[0030] In one embodiment, according to the uniform resource locator URL address information of the page media data of the components in each matching group, the protocol configuration information corresponding to the protocol in each matching group is updated, including:

[0031] For each pair of matching groups, the URL address information of the page media data of the components in the matching group is written into the protocol configuration information corresponding to the protocol in the matching group.

[0032] In the technical solution of the embodiment of the present application, the URL address information of the page media data of each component is written into the protocol configuration information, so that when the component library is subsequently rendered, the page media data can be obtained based on the URL address information, and the component can be rendered using the page media data.

[0033] In one embodiment, rendering processing is performed on the component library according to the protocol configuration information of the protocol chain to construct a page to be constructed, including:

[0034] According to the URL address information in the protocol configuration information of the protocol chain, the page media data is obtained from the data sharing warehouse;

[0035] According to the page media data, the component library is rendered to construct the page to be constructed.

[0036] In the technical solution of the embodiment of the present application, page media data sharing of each component is achieved through a data sharing warehouse, and there is no need for high-level components to pass page media data to low-level components one by one, thereby achieving decoupling between protocols, components and the foreground construction of the page, and improving page construction efficiency.

[0037] In a second aspect, the present application further provides a page construction device, the device comprising:

[0038] A demand acquisition module is used to obtain page demand data for the page to be built;

[0039] The protocol generation module is used to generate a protocol chain corresponding to the page to be constructed according to the page requirement data; wherein the protocol chain includes at least two layers of protocols;

[0040] The component generation module is used to generate the component library corresponding to the page to be built according to the protocol chain;

[0041] The page construction module is used to construct the page to be constructed according to the protocol chain and component library.

[0042] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect when executing the computer program.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method of the first aspect when the computer program is executed by a processor.

[0044] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the method of the first aspect when executed by a processor.

[0045] The above-mentioned page construction method, device, computer equipment and storage medium obtain page requirement data for the page to be constructed; generate a protocol chain corresponding to the page to be constructed according to the page requirement data; wherein the protocol chain includes at least two layers of protocols; generate a component library corresponding to the page to be constructed according to the protocol chain; and construct the page to be constructed according to the protocol chain and the component library. This application associates protocols with components, and customizes the component library in the page by generating a protocol chain, so as to realize flexible modification and expansion of the various components constituting the page, realize diversified construction of the page, and automatically construct the page, which can improve construction efficiency and reduce the difficulty of maintaining the constructed page. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] FIG1 is an application scenario diagram of a page construction method in one embodiment;

[0047] FIG2 is a schematic diagram of a flow chart of a page construction method in one embodiment;

[0048] FIG3 is a schematic diagram of a process for generating a protocol chain in one embodiment;

[0049] FIG4 is a schematic diagram of a process for generating a component library in one embodiment;

[0050] FIG5 is a schematic diagram of a process of rendering a component library in one embodiment;

[0051] FIG6 is a schematic diagram of a process for generating protocol configuration information in one embodiment;

[0052] FIG7 is a schematic diagram of a process of rendering a component library in another embodiment;

[0053] FIG8 is a schematic diagram of a flow chart of a page construction method in another embodiment;

[0054] FIG9 is a structural block diagram of a page construction device in one embodiment;

[0055] FIG10 is a structural block diagram of a page construction device in another embodiment;

[0056] FIG11 is a structural block diagram of a page construction device in yet another embodiment;

[0057] FIG12 is a structural block diagram of a page construction device in yet another embodiment;

[0058] FIG. 13 is a structural block diagram of a computer device for implementing a page building method in one embodiment. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] The page construction method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store data that the server 104 needs to process, such as page demand data. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the page demand data for the page to be constructed, generates a protocol chain corresponding to the page to be constructed according to the page demand data, and generates a component library corresponding to the page to be constructed according to the protocol chain, and then constructs the page to be constructed according to the protocol chain and the component library; wherein the protocol chain includes at least two layers of protocol. Further, the constructed page can be displayed on the terminal 102. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0061] At present, the method of manually writing code to implement front-end page construction is inefficient, and the constructed pages are difficult to maintain. Using conventional CMS to construct front-end pages will result in low compatibility of the constructed pages. Since the component templates provided by CMS are relatively simple, the final page effect does not match the expected page effect and cannot meet the diverse needs of different users for page construction.

[0062] In order to solve the above problem, in one embodiment, as shown in FIG2 , a page construction method is provided, comprising the following steps:

[0063] S201, obtaining page requirement data for a page to be constructed.

[0064] The page to be built is a network page that needs to be built currently, such as a page in a web (World Wide Web) website. The page requirement data of the page to be built is used to indicate the page requirements in terms of the overall function and structural design of the page to be built. For example, the page requirement data of the page to be built includes the page requirement data in terms of overall functions such as page attributes, page routing and jump links, and also includes the page requirement data in terms of structural design such as global styles.

[0065] Optionally, the user builds a page configuration project under the Vue framework through the code compilation tool webpack, and then configures the front page entry and back page entry of the constructed page configuration project through webpack. The user can access the back page configuration page of the page configuration project through the back page entry, and then upload the page requirement data for the page to be built on the back page configuration page, so that the server obtains the page requirement data for the page to be built.

[0066] Optionally, the server directly obtains the page requirement data for the page to be constructed that is pre-stored by the user from the associated database.

[0067] S202, generating a protocol chain corresponding to the page to be constructed according to the page requirement data.

[0068] The protocol chain includes at least two layers of protocols, and the page to be constructed is decomposed into corresponding different levels by means of protocol layering.

[0069] Optionally, the server analyzes the page demand data, decomposes the page demand data into different levels, and then generates protocol chains corresponding to the pages to be constructed in sequence according to the different levels of the page demand data.

[0070] For example, according to the page demand data, the first layer protocol in the protocol chain is generated first, and then several sub-protocols under the first layer protocol are generated, and for each sub-protocol, several corresponding sub-protocols can be further generated under the sub-protocol. Among them, the first layer protocol can be used to define page descriptions such as the name, version and attributes of the page to be built, and the second layer protocol under the first layer protocol can be used to define area descriptions such as the name, title, route and link of different areas in the page to be built. Furthermore, the third layer protocol can be used to define media descriptions such as pictures, videos, audio and text displayed in a specific area. This embodiment does not limit the specific definition of each layer of protocol.

[0071] Optionally, the page configuration project is configured with a functional module for automatically generating a protocol chain. The server responds to a protocol chain generation request triggered by a user configuring the page in the background, automatically obtains page requirement data, and generates a protocol chain based on the page requirement data.

[0072] S203: Generate a component library corresponding to the page to be constructed according to the protocol chain.

[0073] The component library contains all the components required to build the page to be built. It should be noted that the component library is a new component library generated in real time according to the protocol chain, not a conventional component library directly obtained from the network. Associating the protocol chain with the component library and generating the component library according to the protocol chain can improve the flexibility of generating the component library and ensure that the generated component library has the characteristics of diversity.

[0074] Specifically, the server identifies each layer of the protocol in the protocol chain, and generates a component library containing multiple layers of components according to the level of each layer of the protocol. The component library includes at least two layers of components, and each layer of components corresponds to a layer of protocol.

[0075] For example, according to the first-layer protocol, a parent component corresponding to the page to be built is generated, and then according to the second-layer protocol under the first-layer protocol, sub-components in the parent component are generated. Furthermore, according to the third-layer protocol, sub-components are continued to be generated until each protocol in the protocol chain has a corresponding component, and all components together constitute a component library corresponding to the page to be built.

[0076] Optionally, the page configuration project is also configured with a functional module for automatically generating a component library. The server responds to the component library generation request triggered by the user in the background configuration page, automatically generates the component library based on the protocol chain, or directly obtains the page requirement data, generates a protocol chain based on the page requirement data, and generates the component library based on the generated protocol chain.

[0077] S204, construct the page to be constructed according to the protocol chain and the component library.

[0078] Each layer of protocol in the protocol chain corresponds to each layer of component in the component library. The page to be built is composed of large and small components in the component library. By rendering the component library according to the protocol chain, the large and small components in the component library can be displayed, thereby building the page to be built.

[0079] Optionally, the page configuration project is also configured with a functional module for automatically building pages. The server responds to a page building request triggered by the user configuring the page in the foreground, and automatically builds the page to be built according to the protocol chain and component library.

[0080] Optionally, the generated protocol chain is stored in an associated database, which can be accessed through both the foreground configuration page and the background configuration page. Specifically, the server responds to a protocol chain generation request triggered by the background configuration page, generates a protocol chain and stores the generated protocol chain in the database, so that when the server responds to a page construction request triggered by the foreground configuration page, it can directly obtain the protocol chain from the database to construct the page to be constructed.

[0081] The above scheme obtains page requirement data for the page to be constructed; generates a protocol chain corresponding to the page to be constructed based on the page requirement data; wherein the protocol chain includes at least two layers of protocols; generates a component library corresponding to the page to be constructed based on the protocol chain; and constructs the page to be constructed based on the protocol chain and the component library. This embodiment associates protocols with components, and customizes the component library in the page by generating a protocol chain, so as to realize flexible modification and expansion of the various components constituting the page, and realize diversified construction of the page. If the page needs to be added, modified or deleted, then only the protocol and components need to be configured in the background, and the page can be refreshed in the foreground to realize automatic page construction, improve construction efficiency, and reduce the difficulty of maintaining the constructed page.

[0082] In order to automatically generate a standardized protocol chain and ensure that the generated protocol chain has a low maintenance difficulty, based on the above embodiment, in one embodiment, the page to be constructed includes at least one of the header area, the content area and the footer area, and the protocol or protocol chain corresponding to each area can be generated respectively to form a total protocol chain corresponding to the page to be constructed. As shown in FIG. 3, the above S202 includes:

[0083] S301, generating a first layer protocol in a protocol chain according to basic region demand data of each region in the page demand data.

[0084] The basic area requirement data of each area is used to indicate the basic area requirement of each area in the page to be constructed. For example, the basic area requirement data of each area includes area requirement data such as font size and table width in the header area, content area and footer area.

[0085] Based on the basic page requirement data of the page to be constructed in the page requirement data and the basic area requirement data of each area, a first-level protocol is generated to define the name, version and attributes of the page to be constructed, as well as the font size and table width in each area.

[0086] S302, generating a sub-protocol under the first-layer protocol according to the key area demand data of each area in the page demand data.

[0087] The sub-protocol includes at least one layer of protocol.

[0088] The key area requirement data of each area is used to indicate the key area requirements of the overall function and structural design of each area in the page to be built. For example, the key area requirement data of the header area includes the name, attributes, title, description, whether to display pictures, address information of displayed pictures, address information of background, links, routing and background height of the header area.

[0089] According to the key area demand data of each area in the page demand data, a sub-protocol under the first-layer protocol is generated to define the overall function and structural design of each area.

[0090] Optionally, more than one layer of sub-protocols are generated based on the key area demand data of each area in the page demand data. For example, the second layer protocol corresponding to the header area is used to define the name, attributes, title, description, whether to display pictures, address information of displayed pictures, address information of background, links, routing and background height of the header area, and the third layer protocol under the second layer protocol corresponding to the header area is generated, and the third layer protocol is used to define the size and playback mode of the pictures displayed in the header area.

[0091] S303, generating a protocol chain corresponding to the page to be constructed according to the first-layer protocol and the sub-protocols under the first-layer protocol.

[0092] The first-layer protocol and the sub-protocols under the first-layer protocol are spliced ​​in layers to form a total protocol chain corresponding to the page to be built.

[0093] For example, the page to be constructed includes a header area, a content area and a footer area. The first-layer protocol includes a sub-protocol corresponding to the header area, a sub-protocol corresponding to the content area, and a sub-protocol corresponding to the footer area. Furthermore, the above three sub-protocols can also include sub-protocols of a lower layer, and all protocols together constitute a protocol chain.

[0094] This embodiment can generate different protocol chains for different page requirement data. Since the protocol is associated with the component, diversified design of the components in the page can be achieved by configuring the protocol, and the standardized generated protocol chain has a clear hierarchy, which can not only reduce the difficulty of subsequent maintenance, but also ensure the generation of a more accurate component library.

[0095] In order to associate protocols with components and generate a component library with flexibility and scalability, based on the above embodiment, in one embodiment, corresponding components can be generated according to the protocols at each layer in the protocol chain, as shown in FIG. 4 , the above S203 includes:

[0096] S401, generating a parent component corresponding to each area in the page to be constructed according to the first-layer protocol in the protocol chain.

[0097] Among them, the parent component is the page component in the page to be built, and each area corresponds to a parent component.

[0098] The first-layer protocol and the parent component belong to the same level. The server obtains the name, version and attributes of the page to be built, as well as specific protocol information such as the font size and table width in each area from the first-layer protocol, and uses it as the component information of the parent component to generate the parent component corresponding to each area.

[0099] S402, generating a subcomponent in a parent component according to a subprotocol under the first-layer protocol.

[0100] Among them, the subcomponent is the functional component contained in the page component in the page to be built. Each parent component contains multiple subcomponents, and each subcomponent can also contain a lower-level subcomponent.

[0101] The sub-protocol and sub-component belong to the same level. The server obtains specific protocol information such as the name, attributes, title, description, whether to display pictures, address information of displayed pictures, address information of background, links, routes and background height of each area from the sub-protocol, and uses it as the component information of each sub-component to generate sub-components in each parent component.

[0102] Optionally, the server obtains specific protocol information such as the size and playback mode of the displayed image in each area from a sub-protocol of a lower layer, and uses it as component information of a sub-component of a lower layer to generate a sub-component of a lower layer.

[0103] S403: Generate a component library corresponding to the page to be constructed based on the parent component and the child components in the parent component.

[0104] Configure the parent component and the child components in the parent component in a hierarchical manner to form a component library corresponding to the page to be built.

[0105] For example, the page to be constructed includes a header area, a content area, and a footer area. These three areas correspond to a parent component respectively, and each parent component contains at least one child component. Each child component can also contain at least one child component. All components together constitute a component library.

[0106] This embodiment can generate different component libraries for different protocol chains to achieve diversified design of components in the page. Compared with the conventional component library directly obtained from the network, the component library generated in this embodiment can better match the actual needs of different users for page design, and the server automatically generates the component library according to the protocol chain without manual coding, which is conducive to improving the efficiency of constructing the page to be constructed.

[0107] In order to view the page effect of the page to be constructed in real time, based on the above embodiment, in one embodiment, the protocol configuration information can be generated in real time, so that the components in the page to be constructed are rendered according to the protocol configuration information. As shown in FIG. 5 , the above S204 includes:

[0108] S501, generating protocol configuration information of the protocol chain according to the protocol chain and the component library.

[0109] The protocol configuration information is the configuration information corresponding to all protocols in the protocol chain, and the protocol configuration information can associate the protocol chain with the component library.

[0110] For example, a subprotocol in the protocol chain is used to define a display image in the header area, and correspondingly, a subcomponent in the component library is a picture component in the header area. According to the subprotocol and the subcomponent, the protocol configuration information of the subprotocol is generated. For example, the protocol configuration information of the subprotocol is configured with the size, storage method, and address information of the display image.

[0111] According to the protocol chain and the component library, protocol configuration information of all protocols in the protocol chain is generated to obtain the protocol configuration information of the protocol chain.

[0112] Optionally, the server stores the generated protocol configuration information in an associated database, which can be accessed through both the foreground configuration page and the background configuration page. Specifically, the server generates the protocol configuration information of the protocol chain in response to a configuration information generation request triggered by the background configuration page, and stores it in the database, so that when the server responds to a page building request triggered by the foreground configuration page, it can directly obtain the protocol configuration information of the protocol chain from the database, thereby constructing the page to be built.

[0113] S502: Render the component library according to the protocol configuration information of the protocol chain to construct a page to be constructed.

[0114] According to the protocol configuration information of the protocol chain, the corresponding page media data required for rendering the component library can be determined. The component library is rendered using the page media data to display the page to be built, thus completing the page building process.

[0115] For example, a sub-protocol in the protocol chain is used to define the display image in the header area. Correspondingly, a sub-component in the component library is the image component in the header area. According to the protocol configuration information of the sub-protocol in the protocol chain, the page media data such as the size, storage method, and address information of the display image in the corresponding sub-component is determined, and the corresponding sub-component is rendered using the corresponding page media data to display the image content in the header area of ​​the page to be built. All components in the component library are rendered and refreshed to display the entire content of the page to be built, completing the page building process.

[0116] This embodiment renders the component library according to the protocol configuration information, and completes the dynamic construction of the page to be constructed, so that the user can view the page effect of the page to be constructed in real time. If it is necessary to modify a certain content in the page, the protocol and component corresponding to the content are queried in the background, and the protocol and component are reconfigured, which can be completed by refreshing the page in the foreground, reducing the difficulty of maintenance and eliminating the need for manual coding.

[0117] In order to improve the accuracy of generating protocol configuration information, based on the above embodiment, in one embodiment, the protocols in the protocol chain and the components in the component library can be divided into one-to-one matching groups, and then the protocol configuration information is generated based on the matching groups. As shown in FIG. 6, the above S501 includes:

[0118] S601, determining at least two pairs of matching groups according to the protocol chain and the component library.

[0119] Each pair of matching groups includes a layer of protocol and a component corresponding to the layer of protocol.

[0120] It can be understood that the component library is generated based on the protocol chain, and the protocol chain corresponds to each level in the component library one by one. Each protocol in the protocol chain is matched with each component in the component library to obtain at least two pairs of matching groups.

[0121] S602: Update the protocol configuration information corresponding to the protocol in each matching group according to the uniform resource locator URL address information of the page media data of the component in each matching group.

[0122] The components in each matching group may have corresponding page media data, or may not have corresponding page media data and exist only as functional components. The page media data refers to media data such as pictures, videos, audios, and texts.

[0123] For a component having corresponding page media data, the URL (Uniform Resource Locator) address information of the corresponding page media data is obtained, and according to the URL address information, the protocol configuration information of the protocol of the component in the same matching group is updated.

[0124] In an optional embodiment, for each pair of matching groups, the URL address information of the page media data of the components in the matching group is written into the protocol configuration information corresponding to the protocol in the matching group, so that when the foreground subsequently calls the protocol configuration information of the protocol, the corresponding page media data can be determined, and it can be determined how to obtain the corresponding page media data.

[0125] Optionally, for a component that does not have corresponding page media data, the protocol configuration information of the protocol of the component in the same matching group may not be updated.

[0126] S603: Generate protocol configuration information of the protocol chain according to the updated protocol configuration information corresponding to each protocol.

[0127] The updated protocol configuration information corresponding to each protocol is stored according to the protocol hierarchy to form the protocol configuration information of the protocol chain.

[0128] Optionally, the protocol configuration information of the protocol chain is generated according to the updated protocol configuration information and the unupdated protocol configuration information. Since the protocol chain corresponds to each level in the component library, the protocol configuration information corresponding to each level in the protocol chain and the component library can be generated.

[0129] This embodiment writes the URL address information of the page media data into the protocol configuration information to ensure that when the page to be constructed is subsequently constructed, the page media data can be obtained based on the URL address information of the page media data in the protocol configuration information, so as to render the component and construct the page to be constructed.

[0130] In order to decouple the protocol, components and pages and avoid code redundancy caused by too many levels, based on the above embodiment, in one embodiment, the page media data can be stored in a data sharing warehouse shared by all components, as shown in FIG. 7 , the above S502 includes:

[0131] S701, obtaining page media data from a data sharing repository according to URL address information in the protocol configuration information of the protocol chain.

[0132] The storage method of page media data is object storage, which uses content addressable technology to support multi-level path access and partition management. Specifically, the media content of all page media data in the page to be built is stored in a data sharing warehouse, which can be implemented based on Vuex under the Vue framework.

[0133] Correspondingly, when the component library is rendered to construct the page to be constructed, the URL address information of the page media data of each component in the component library is obtained from the protocol configuration information of the protocol chain, and the data sharing warehouse is accessed based on the URL address information to obtain the corresponding page media data.

[0134] It should be noted that in conventional componentized page construction, the page media data corresponding to the subcomponent is passed by the parent component of the upper layer of the subcomponent, while in this embodiment, a data sharing warehouse is introduced, and all components in the component library can be directly associated with the page media data without the need to pass them one by one according to the component level, thereby achieving decoupling between components and page media data.

[0135] S702: Render the component library according to the page media data to construct the page to be constructed.

[0136] The component rendering method is called under the Vue framework, the component library is rendered using the page media data, and inserted into the page to form a page to be constructed. This embodiment does not limit the component rendering method.

[0137] In this embodiment, when rendering components at each layer, the page media data required by each component can be directly obtained from the data sharing warehouse. There is no need for high-level components to pass the page media data to low-level components one by one. All components can be directly associated with the page media data in the data sharing warehouse, thereby realizing the decoupling between protocols, components and the front-end construction of the page, improving the efficiency of page construction, and reducing the difficulty of subsequent page maintenance. When an error occurs in any component, it will not affect the page media data of other components.

[0138] In one embodiment, an optional example of a page construction method is provided, as shown in FIG8 , including the following steps:

[0139] S801, obtaining page requirement data for a page to be constructed.

[0140] S802, generating a first layer protocol in a protocol chain according to basic region demand data of each region in the page demand data.

[0141] S803, generating a sub-protocol under the first-layer protocol according to the key area demand data of each area in the page demand data.

[0142] The page to be constructed includes at least one of a header area, a content area and a footer area, and the sub-protocol includes at least one layer of protocol.

[0143] S804: Generate a protocol chain corresponding to the page to be constructed according to the first-layer protocol and the sub-protocols under the first-layer protocol.

[0144] The protocol chain includes at least two layers of protocols.

[0145] S805, generating a parent component corresponding to each area in the page to be constructed according to the first-layer protocol in the protocol chain.

[0146] S806, generating a subcomponent in the parent component according to the subprotocol under the first-layer protocol.

[0147] S807, generating a component library corresponding to the page to be constructed according to the parent component and the child components in the parent component.

[0148] S808: Determine at least two pairs of matching groups according to the protocol chain and the component library.

[0149] Each pair of matching groups includes a layer of protocol and a component corresponding to the layer of protocol.

[0150] S809: Update the protocol configuration information corresponding to the protocol in each matching group according to the URL address information of the page media data of the component in each matching group.

[0151] For each pair of matching groups, the URL address information of the page media data of the components in the matching group is written into the protocol configuration information corresponding to the protocol in the matching group.

[0152] S810, generating protocol configuration information of the protocol chain according to the updated protocol configuration information corresponding to each protocol.

[0153] S811, obtaining page media data from a data sharing repository according to the URL address information in the protocol configuration information of the protocol chain.

[0154] S812: Render the component library according to the page media data to construct the page to be constructed.

[0155] The specific process of the above steps can be found in the description of the above method embodiment. The implementation principles and technical effects are similar and will not be repeated here.

[0156] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0157] Based on the same inventive concept, the embodiment of the present application also provides a page construction device for implementing the page construction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the page construction device provided below can refer to the limitations of the page construction method above, and will not be repeated here.

[0158] In one embodiment, as shown in FIG. 9 , a page construction device 1 is provided, comprising a demand acquisition module 10, a protocol generation module 20, a component generation module 30 and a page construction module 40, wherein:

[0159] The requirement acquisition module 10 is used to acquire page requirement data for the page to be constructed.

[0160] The protocol generation module 20 is used to generate a protocol chain corresponding to the page to be constructed according to the page requirement data.

[0161] The protocol chain includes at least two layers of protocols.

[0162] The component generation module 30 is used to generate a component library corresponding to the page to be constructed according to the protocol chain.

[0163] The page construction module 40 is used to construct the page to be constructed according to the protocol chain and the component library.

[0164] In one embodiment, based on FIG. 9 , as shown in FIG. 10 , the page to be constructed includes at least one of a header area, a content area, and a footer area, and the protocol generation module 20 may include:

[0165] The first layer protocol generating unit 21 is used to generate the first layer protocol in the protocol chain according to the basic area demand data of each area in the page demand data.

[0166] The sub-protocol generating unit 22 generates a sub-protocol under the first-layer protocol according to the key area demand data of each area in the page demand data.

[0167] The sub-protocol includes at least one layer of protocol.

[0168] The protocol chain generating unit 23 is used to generate a protocol chain corresponding to the page to be constructed according to the first-layer protocol and the sub-protocols under the first-layer protocol.

[0169] In one embodiment, based on FIG. 9 , as shown in FIG. 11 , the component generation module 30 may include:

[0170] The parent component generation unit 31 is used to generate the parent component corresponding to each area in the page to be constructed according to the first layer protocol in the protocol chain.

[0171] The sub-component generating unit 32 is used to generate the sub-component in the parent component according to the sub-protocol under the first-layer protocol.

[0172] The component library generating unit 33 is used to generate a component library corresponding to the page to be constructed according to the parent component and the child components in the parent component.

[0173] In one embodiment, based on FIG. 9 , as shown in FIG. 12 , the page construction module 40 may include:

[0174] The configuration information generating unit 41 is used to generate the protocol configuration information of the protocol chain according to the protocol chain and the component library.

[0175] The page construction unit 42 is used to render the component library according to the protocol configuration information of the protocol chain to construct the page to be constructed.

[0176] In one embodiment, the configuration information generating unit 41 may include:

[0177] The matching group determination subunit is used to determine at least two pairs of matching groups according to the protocol chain and the component library.

[0178] Each pair of matching groups includes a layer of protocol and a component corresponding to the layer of protocol.

[0179] The configuration information updating subunit is used to update the protocol configuration information corresponding to the protocol in each matching group according to the uniform resource locator URL address information of the page media data of the components in each matching group.

[0180] The configuration information generating subunit is used to generate the protocol configuration information of the protocol chain according to the updated protocol configuration information corresponding to each protocol.

[0181] In one embodiment, the configuration information updating subunit may also be used to write, for each pair of matching groups, the URL address information of the page media data of the components in the matching group into the protocol configuration information corresponding to the protocol in the matching group.

[0182] In one embodiment, the page construction unit 42 may include:

[0183] The media data acquisition subunit is used to obtain page media data from the data sharing warehouse according to the URL address information in the protocol configuration information of the protocol chain.

[0184] The page construction subunit is used to render the component library according to the page media data to construct the page to be constructed.

[0185] Each module in the above-mentioned page construction device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0186] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG13. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as page demand data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a page construction method is implemented.

[0187] Those skilled in the art will understand that the structure shown in FIG. 13 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0188] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned page construction method when executing the computer program.

[0189] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned page construction method are implemented.

[0190] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned page construction method when executed by a processor.

[0191] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0192] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0193] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A page construction method, characterized in that: The method comprises: Acquire page requirement data for a page to be constructed; wherein the page to be constructed includes at least one of a header area, a content area, and a footer area; Generate a first-layer protocol in a protocol chain according to the basic region demand data of each region in the page demand data; generate a sub-protocol under the first-layer protocol according to the key region demand data of each region in the page demand data; generate a protocol chain corresponding to the page to be constructed according to the first-layer protocol and the sub-protocol under the first-layer protocol; wherein the protocol chain includes at least two layers of protocols; the sub-protocol includes at least one layer of protocol; the basic region demand data includes font size and table width, and the key region demand data includes name, attribute, title and link; Generate a parent component corresponding to each area in the page to be constructed according to the first-layer protocol in the protocol chain; generate a subcomponent in the parent component according to the subprotocol under the first-layer protocol; generate a component library corresponding to the page to be constructed according to the parent component and the subcomponent in the parent component; Generate protocol configuration information of the protocol chain according to the protocol chain and the component library; Acquire page media data from a data sharing repository according to URL address information in the protocol configuration information of the protocol chain; The component library is rendered according to the page media data to construct the page to be constructed.

2. The method according to claim 1, characterized in that The generating, according to the protocol chain and the component library, the protocol configuration information of the protocol chain comprises: Determine at least two pairs of matching groups according to the protocol chain and the component library; wherein each pair of matching groups includes a layer of protocol and a component corresponding to the layer of protocol; According to the uniform resource locator URL address information of the page media data of the components in each matching group, the protocol configuration information corresponding to the protocol in each matching group is updated; The protocol configuration information of the protocol chain is generated according to the updated protocol configuration information corresponding to each protocol.

3. The method according to claim 2, characterized in that The updating of the protocol configuration information corresponding to the protocol in each matching group according to the uniform resource locator URL address information of the page media data of the component in each matching group includes: For each pair of matching groups, the URL address information of the page media data of the components in the matching group is written into the protocol configuration information corresponding to the protocol in the matching group.

4. The method according to claim 1, characterized in that: The page media data includes page attributes, page routing, jump links and global styles.

5. The method according to claim 1, characterized in that The page demand data is stored in an object storage manner.

6. A page construction device, characterized in that: The device comprises: A requirement acquisition module, used to acquire page requirement data for a page to be constructed; wherein the page to be constructed includes at least one of a header area, a content area, and a footer area; A protocol generation module, used to generate a first-layer protocol in a protocol chain according to basic region demand data of each region in the page demand data; generate a sub-protocol under the first-layer protocol according to key region demand data of each region in the page demand data; generate a protocol chain corresponding to the page to be constructed according to the first-layer protocol and the sub-protocol under the first-layer protocol; wherein the protocol chain includes at least two layers of protocols; the sub-protocol includes at least one layer of protocol; the basic region demand data includes font size and table width, and the key region demand data includes name, attribute, title and link; A component generation module, used to generate a parent component corresponding to each area in the page to be constructed according to the first-layer protocol in the protocol chain; generate a subcomponent in the parent component according to the subprotocol under the first-layer protocol; generate a component library corresponding to the page to be constructed according to the parent component and the subcomponent in the parent component; The page construction module is used to generate the protocol configuration information of the protocol chain according to the protocol chain and the component library; obtain the page media data from the data sharing warehouse according to the URL address information in the protocol configuration information of the protocol chain; and render the component library according to the page media data to construct the page to be constructed.

7. The device according to claim 6, characterized in that The protocol generation module comprises: A first-layer protocol generation unit, used to generate a first-layer protocol in a protocol chain according to basic area demand data of each area in the page demand data; A sub-protocol generating unit, configured to generate a sub-protocol under the first-layer protocol according to the key area demand data of each area in the page demand data; wherein the sub-protocol includes at least one layer of protocol; The protocol chain generation unit is used to generate a protocol chain corresponding to the page to be constructed according to the first-layer protocol and the sub-protocols under the first-layer protocol.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.