A front-end page rendering control method and device, electronic equipment and storage medium

By using a master-slave server architecture and a synchronization mechanism for configuration components, the front-end page is rendered quickly, solving the problem of long rendering time and supporting real-time business operations.

CN115543308BActive Publication Date: 2026-07-21CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA PING AN PROPERTY INSURANCE CO LTD
Filing Date
2022-09-23
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, front-end page rendering takes a long time, which affects the real-time operation of online business.

Method used

A master-slave server architecture is adopted. The master configuration component listens for page element updates on the master server, and the slave configuration component synchronizes page element updates on multiple slave servers to achieve synchronous rendering of the front-end page between the master and slave servers.

Benefits of technology

It reduces the front-end page rendering time, supports real-time online business operations, and reduces the impact of rendering time on business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543308B_ABST
    Figure CN115543308B_ABST
Patent Text Reader

Abstract

The application provides a front-end page rendering control method and device, electronic equipment and a computer readable storage medium. The front-end page rendering control method provided by the application comprises the following steps: registering a plurality of slave servers on a master server; setting a master configuration component for the master server, and setting a plurality of slave configuration components for the plurality of slave servers respectively, and introducing the master configuration component and the plurality of slave configuration components into a pre-deployed front-end project; introducing page elements of the master server into the master configuration component, and introducing page elements of the plurality of slave servers into the master configuration component through the plurality of slave configuration components respectively; making the master configuration component listen to the page elements of the master server, and if the page elements of the master server are updated, synchronizing the updates of the page elements of the plurality of slave servers and the page elements of the master server through the plurality of slave configuration components. The front-end page rendering control method can reduce the time consumption of front-end page rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer data processing technology, and in particular to a front-end page rendering control method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the continuous development of internet technology, the development of corresponding applications is also increasing. Application development can include the development of trading systems or financial systems; and the rendering and configuration of application pages are the core tasks in application development. Generally speaking, the rendering and configuration of application pages are implemented in two parts: one is the front-end system responsible for handling interactive operations and rendering logic, and the other is the back-end system responsible for maintaining and managing operational data and various templates.

[0003] Some application platforms in the industry can configure the backend or data online without backend deployment. However, if the frontend pages of these application platforms need to be rendered according to relevant conditions, they must be compiled and deployed. This takes a long time and affects the real-time operation of online business, thus affecting business revenue. Summary of the Invention

[0004] The purpose of this invention is to provide a front-end page rendering control method, device, electronic device, and computer-readable storage medium to solve the technical problem of long rendering time of front-end pages in the prior art.

[0005] The technical solution of the present invention is as follows: a front-end page rendering control method is provided, including:

[0006] One network server is used as the master server, and multiple network servers are used as multiple slave servers, and the multiple slave servers are registered to the master server;

[0007] Configure a master configuration component for the master server and configure multiple slave configuration components for each of the multiple slave servers. Import the master configuration component and the multiple slave configuration components into the pre-deployed front-end project.

[0008] The page elements of the master server are imported into the master configuration component, and the page elements of the multiple slave servers are imported into the master configuration component through the multiple slave configuration components respectively.

[0009] The main configuration component listens to the page elements of the main server. If an update to the page elements of the main server is detected, the page elements of the multiple slave configuration components are synchronized with the page elements of the main server.

[0010] Further, registering the plurality of slave servers to the master server includes: obtaining the IP addresses of the plurality of slave servers, and registering the plurality of slave servers to the master server based on the IP addresses of the plurality of slave servers.

[0011] Furthermore, importing the page elements of the multiple slave servers into the main configuration component through the multiple slave configuration components includes importing the page elements of the multiple slave servers into the main service of the main configuration component through the slave service of the multiple slave configuration components, and importing them into the management center of the main configuration component through the main service of the main configuration component.

[0012] Accordingly, the main configuration component is configured to listen to the page elements of the main server, including the management center in the main configuration component is configured to listen to the page elements of the main server.

[0013] Furthermore, before importing the page elements of the multiple slave servers into the main service of the main configuration component through the slave services of the multiple slave configuration components, and into the management center of the main configuration component through the main service of the main configuration component, the method further includes: setting corresponding primary keys for the page elements of the main server and the page elements of the multiple slave servers respectively, and configuring the ID of the primary key in the management center.

[0014] Furthermore, before importing the page elements of the multiple slave servers into the main service of the main configuration component through the slave services of the multiple slave configuration components, and into the management center of the main configuration component through the main service of the main configuration component, the method further includes: setting configuration information in the management center, wherein the configuration information includes configuration conditions, whether to add a slot boolean value, and configuration details description.

[0015] Furthermore, if an update to a page element is detected on the master server, then the page elements on the multiple slave servers are synchronized with the page elements on the master server through the multiple slave configuration components, including:

[0016] If an update to a page element is detected on the master server, the corresponding update content is obtained. Based on the corresponding update content, the increment of the configuration information is obtained, and the increment of the configuration information is synchronized to the slave configuration component. This enables the slave configuration component to control the update synchronization of the page elements on the slave server based on the increment of the configuration information.

[0017] Furthermore, if an update to a page element is detected on the master server, then the page elements on the multiple slave servers are synchronized with the page elements on the master server through the multiple slave configuration components, including:

[0018] If an update to a page element is detected on the master server, the corresponding update content is obtained. Based on the update content, the increment of the configuration information and the primary key of the corresponding page element are obtained. The increment of the configuration information and the primary key of the corresponding page element are synchronized to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements on the slave server based on the increment of the configuration information and the primary key of the corresponding page element.

[0019] Another technical solution of the present invention is as follows: a front-end page rendering control device is also provided, including a server registration module, a configuration component deployment module, a page element import module, and a page update module;

[0020] The server registration module is used to register the multiple network servers as the master server and the multiple network servers as the slave servers to the master server.

[0021] The configuration component deployment module is used to set a main configuration component for the master server and set multiple slave configuration components for the multiple slave servers respectively, and to import the main configuration component and the multiple slave configuration components into the pre-deployed front-end project;

[0022] The page element import module is used to import the page elements of the master server into the master configuration component, and to import the page elements of the multiple slave servers into the master configuration component through the multiple slave configuration components respectively;

[0023] The page update module is used to enable the main configuration component to listen to the page elements of the main server. If an update of the page elements of the main server is detected, the page elements of the multiple slave configuration components are synchronized with the page elements of the main server.

[0024] Another technical solution of the present invention is as follows: an electronic device is also provided, including a memory and a processor. The memory stores a computer program that can be executed by the processor. When the processor executes the computer program, it implements the front-end page rendering control method as described in any of the above technical solutions.

[0025] Another technical solution of the present invention is as follows: a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the front-end page rendering control method as described in any of the above technical solutions.

[0026] The beneficial effects of this invention are as follows: A network server is used as the master server, and multiple network servers are used as slave servers, which are then registered to the master server. A master configuration component is set for the master server, and multiple slave configuration components are set for each of the slave servers. The master configuration component and the multiple slave configuration components are then introduced into a pre-deployed front-end project. Page elements from the master server are imported into the master configuration component, and page elements from the multiple slave servers are imported into the master configuration component through the multiple slave configuration components. The master configuration component listens for updates to the page elements of the master server; if an update to a page element is detected, the page elements of the multiple slave servers are synchronized with the page elements of the master server through the multiple slave configuration components. Through the above technical solution, synchronous rendering of the front-end pages of the master server and the slave servers is achieved, which reduces the time consumption of front-end page rendering, facilitates the real-time operation of related online services, and reduces the impact of long front-end page rendering times on related online services. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating the front-end page rendering control method according to an embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram of the functional architecture of the slave server according to an embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of the functional architecture of the main server in an embodiment of the present invention;

[0030] Figure 4 This is a schematic diagram of the front-end page rendering control device according to an embodiment of the present invention;

[0031] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0033] In the description of this application, the terms "first," "second," etc., are used only for distinguishing purposes and should not be construed as indicating or implying relative importance or order. In this specification, the terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0034] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0035] Figure 1 This is a flowchart illustrating the front-end page rendering control method according to an embodiment of the present invention. It should be noted that if substantially the same result is achieved, the front-end page rendering control method of the present invention does not necessarily follow the same approach. Figure 1 The illustrated process sequence is limited. For example... Figure 1 As shown, this front-end page rendering control method mainly includes the following steps:

[0036] S1, using one network server as the master server and multiple network servers as multiple slave servers, registering the multiple slave servers to the master server; wherein, the ratio of domain names to the number of network servers is 1:N, and N is the total number of master servers and all slave servers;

[0037] S2, set a main configuration component for the master server and set multiple slave configuration components for each of the multiple slave servers, and import the main configuration component and the multiple slave configuration components into the pre-deployed front-end project; wherein, the front-end project is pre-deployed on the web server, and the master server and each slave server have a front-end project deployed respectively;

[0038] S3, the page elements of the master server are imported into the master configuration component, and the page elements of the multiple slave servers are imported into the master configuration component through the multiple slave configuration components respectively;

[0039] S4, the main configuration component listens to the page elements of the main server. If an update of the page elements of the main server is detected, the page elements of the multiple slave configuration components are synchronized with the update of the page elements of the main server.

[0040] This invention uses a single network server as the master server and multiple network servers as slave servers, registering the slave servers with the master server. A master configuration component is set for the master server, and multiple slave configuration components are set for each slave server. The master and slave configuration components are then integrated into a pre-deployed front-end project. Page elements from the master server are imported into the master configuration component, and page elements from the slave servers are imported into the master configuration component through the slave configuration components. The master configuration component listens for updates to the page elements of the master server; if an update is detected, the slave configuration components synchronize the updates of the page elements on the slave servers with those on the master server. This achieves synchronized rendering of the front-end pages on the master and slave servers, reducing rendering time and facilitating real-time online business operations, thus mitigating the impact of long rendering times on online services.

[0041] In one optional implementation, registering the plurality of slave servers to the master server includes: obtaining the IP addresses of the plurality of slave servers, and registering the plurality of slave servers to the master server based on the IP addresses of the plurality of slave servers.

[0042] It should be noted that after setting one network server as the master server and the other N-1 network servers as slave servers, each slave server needs to be registered with the master server. The code for registering slave servers with the master server is as follows:

[0043] varAdminService={IP:'hostIP',ClientService:[IP1,IP2,...],};

[0044] In the code above, IP:'hostIP' represents the IP address of the master server, and ClientService:[IP1,IP2,……] represents the IP address of the slave server.

[0045] In an optional implementation, the page elements of the plurality of slave servers are respectively introduced to the main configuration component through the plurality of slave configuration components. This includes introducing the page elements of the plurality of slave servers to the main service of the main configuration component through the slave services of the plurality of slave configuration components, and then introducing them to the management center of the main configuration component through the main service of the main configuration component.

[0046] Accordingly, the main configuration component is configured to listen to the page elements of the main server, including the management center in the main configuration component is configured to listen to the page elements of the main server.

[0047] It should be noted that before importing the page elements from the multiple slave servers onto the main configuration component through the multiple slave configuration components, the main configuration component and the multiple slave configuration components need to be imported into the pre-deployed front-end project; the corresponding code for importing the main configuration component and the multiple slave configuration components into the pre-deployed front-end project is as follows:

[0048] import{confComponent}from "confComponent";

[0049] In one specific embodiment, the master server has a master service in its master configuration component, and the slave server has a slave service in its slave configuration component. The master service and the slave service represent different functional modules. The master configuration component and the slave configuration component represent different configuration components.

[0050] In an optional implementation, before importing the page elements of the plurality of slave servers into the main service of the main configuration component through the slave services of the plurality of slave configuration components, and into the management center of the main configuration component through the main service of the main configuration component, the method further includes: setting corresponding primary keys for the page elements of the main server and the page elements of the plurality of slave servers, and configuring the ID of the primary key in the management center.

[0051] In one specific embodiment, the page element can be a page HTML element. Then, corresponding primary keys are set for the page elements of the master server and the page elements of the multiple slave servers, and the IDs of the primary keys are configured on the management center. This includes setting corresponding primary keys for the page HTML elements of the master server and the page HTML elements of the multiple slave servers, and configuring the IDs of the primary keys on the management center. The HTML element begins with a start tag and ends with an end tag. The content of the HTML element is the content between the start and end tags. Some HTML elements have empty content, and empty elements are closed within the start tag (ending with the end of the start tag). Most HTML meta-elements can have attributes.

[0052] It should be noted that in practical applications, it is not necessary to set corresponding primary keys for all HTML elements of all pages. Instead, only the HTML elements of pages with important functions need to be set with corresponding primary keys. After setting the corresponding primary keys, the corresponding primary keys are registered with the management center through the main configuration component (confComponent) or the secondary configuration component. When the web server corresponding to the page HTML element is the main server, the corresponding primary key is registered (imported) to the management center through the main configuration component. When the web server corresponding to the page HTML element is the secondary server, the corresponding primary key is imported into the main service of the main configuration component through the secondary configuration component, and then registered to the management center in the main configuration component through the main service of the main configuration component.

[0053] In another specific embodiment, from the functional architecture diagram of the server, such as... Figure 2 As shown, Figure 2 The slave server includes the front-end project, page HTML elements, and configuration components (slave configuration components). These configuration components also include slave service function modules. A functional architecture diagram of the master server is shown below. Figure 3 As shown, Figure 3 In this context, the main server includes a front-end project, page HTML elements, and a configuration component (main configuration component). The configuration component also includes a main service function module and a management center, and the management center also contains configuration information.

[0054] In an optional implementation, before importing the page elements of the plurality of slave servers to the management center of the main configuration component through the slave services of the plurality of slave configuration components, the method further includes: setting configuration information in the management center, wherein the configuration information includes configuration conditions, whether to add a slot boolean value, and configuration details description.

[0055] In one specific embodiment, the configuration information (confInfo) includes configuration constraints (condition), a boolean value for whether to add a slot (ifRenderSlot), and a description of the configuration details (confDetail). The corresponding code for the settings configuration information in the management center under the main configuration component is as follows:

[0056]

[0057]

[0058] In the code above, the first line represents the configuration information list, the second line represents setting the primary key ID, the fourth line represents setting the configuration conditions, the fifth line represents setting whether to add a slot boolean value, and the sixth line represents setting the configuration details description.

[0059] In an optional implementation, the step of synchronizing the page elements of the multiple slave servers with the page elements of the master server through the multiple slave configuration components if an update of the page elements of the master server is detected includes:

[0060] If an update to a page element is detected on the master server, the corresponding update content is obtained. Based on the corresponding update content, the increment of the configuration information is obtained, and the increment of the configuration information is synchronized to the slave configuration component. This enables the slave configuration component to control the update synchronization of the page elements on the slave server based on the increment of the configuration information.

[0061] In one specific embodiment, when the page elements of the master server are updated, the configuration information of the management center is updated accordingly. The master configuration component listens to the page elements of the master server by listening to the configuration information of the management center. By listening to the configuration information of the management center, the corresponding update content is obtained, thereby obtaining the increment of the configuration information. The increment of the configuration information is synchronized to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements of the slave server according to the increment of the configuration information, responding to the configuration control of the management center in real time, so as to realize the synchronous rendering of the master server page and the slave server page.

[0062] In an optional implementation, the step of synchronizing the page elements of the multiple slave servers with the page elements of the master server through the multiple slave configuration components if an update of the page elements of the master server is detected includes:

[0063] If an update to a page element is detected on the master server, the corresponding update content is obtained. Based on the update content, the increment of the configuration information and the primary key of the corresponding page element are obtained. The increment of the configuration information and the primary key of the corresponding page element are synchronized to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements on the slave server based on the increment of the configuration information and the primary key of the corresponding page element.

[0064] Specifically, after obtaining the increment of the configuration information and the primary key of the corresponding page element, the configuration component can control the update synchronization of the page elements of the slave server based on the increment of the configuration information and the primary key of the corresponding page element, so as to reduce the rendering time of the page on the slave server.

[0065] In one specific embodiment, the code controlling the update synchronization of page elements from the server is as follows:

[0066]

[0067] The code above is used to check whether the configuration is effective when processing update messages. If it is effective, it retrieves the corresponding primary key, configures the constraints, and processes the rendering.

[0068] This invention provides a front-end page rendering control method. It uses one web server as the master server and multiple web servers as slave servers, registering the slave servers with the master server. A master configuration component is set for the master server, and multiple slave configuration components are set for each slave server. The master and slave configuration components are then imported into a pre-deployed front-end project. Page elements from the master server are imported into the master configuration component, and page elements from the slave servers are imported into the master configuration component through the slave configuration components. The master configuration component listens for updates to the page elements on the master server. If an update is detected, the slave configuration components synchronize the updates of the page elements on the slave servers with those on the master server. This achieves synchronized rendering of the front-end pages on the master and slave servers, reducing rendering time and facilitating real-time online business operations, thereby mitigating the impact of long rendering times on online services.

[0069] Based on the front-end page rendering control method provided in this embodiment of the invention, if the original component is open for access and a new role control is added, role judgment can be added to the configuration details description in the configuration information to avoid unauthorized access to the component. Furthermore, if the backend of a component cannot be accessed in a timely manner due to changes in a third-party URL, a new slot can be configured to render a new responsive component, hiding the old component to resolve the inaccessibility issue. Importantly, the front-end page rendering control method disclosed in this invention can solve the real-time business loss caused by deployment time. If the front-end page rendering control method provided in this embodiment of the invention is combined with cloud server traffic switching and containerized deployment, it can respond to page changes even faster, further reducing the time consumption of front-end page rendering.

[0070] The front-end page rendering control method provided in this invention can be built on artificial intelligence. It acquires and processes relevant data using AI technology to achieve unattended AI-based front-end page rendering control. Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0071] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0072] Figure 4 This is a schematic diagram of the front-end page rendering control device according to an embodiment of the present invention, as shown below. Figure 4 As shown, the front-end page rendering control device 20 includes a server registration module 21, a configuration component deployment module 22, a page element import module 23, and a page update module 24.

[0073] The server registration module 21 is used to register the multiple slave servers to the master server, with one network server as the master server and multiple network servers as multiple slave servers respectively.

[0074] The configuration component deployment module 22 is used to set a main configuration component for the master server and set multiple slave configuration components for the multiple slave servers respectively, and to import the main configuration component and the multiple slave configuration components into the pre-deployed front-end project;

[0075] The page element import module 23 is used to import the page elements of the master server into the master configuration component, and to import the page elements of the multiple slave servers into the master configuration component through the multiple slave configuration components respectively;

[0076] The page update module 24 is used to enable the main configuration component to listen to the page elements of the main server. If an update of the page elements of the main server is detected, the page elements of the multiple slave configuration components are synchronized with the update of the page elements of the main server.

[0077] Furthermore, the server registration module 21 registers the plurality of slave servers to the master server by: obtaining the IP addresses of the plurality of slave servers and registering the plurality of slave servers to the master server based on the IP addresses of the plurality of slave servers.

[0078] In this process, after setting one network server as the master server and the other N-1 network servers as slave servers, each slave server needs to be registered with the master server.

[0079] Furthermore, the page element import module 23 imports the page elements of the plurality of slave servers to the main configuration component through the plurality of slave configuration components, including importing the page elements of the plurality of slave servers to the main service of the main configuration component through the slave service of the plurality of slave configuration components, and importing them to the management center of the main configuration component through the main service of the main configuration component; the page update module 24 enables the main configuration component to listen to the page elements of the main server, including enabling the management center of the main configuration component to listen to the page elements of the main server.

[0080] Before importing the page elements from the multiple slave servers onto the main configuration component through the multiple slave configuration components, the main configuration component and the multiple slave configuration components need to be imported into the pre-deployed front-end project.

[0081] In one specific embodiment, the master server has a master service in its master configuration component, and the slave server has a slave service in its slave configuration component. The master service and the slave service represent different functional modules. The master configuration component and the slave configuration component represent different configuration components.

[0082] Furthermore, before the page element import module 23 imports the page elements of the multiple slave servers into the main service of the main configuration component through the slave services of the multiple slave configuration components, and into the management center of the main configuration component through the main service of the main configuration component, it is also used to set corresponding primary keys for the page elements of the main server and the page elements of the multiple slave servers respectively, and configure the ID of the primary key on the management center.

[0083] In practical applications, it's not necessary to set primary keys for all HTML elements on all pages. Instead, only the HTML elements of pages with important functions need primary keys. After setting the primary keys, they are registered with the management center (manageCenter) through either the main configuration component (confComponent) or the secondary configuration component. When the web server corresponding to the page's HTML element is the main server, the primary key is registered (imported) to the management center through the main configuration component. When the web server corresponding to the page's HTML element is the secondary server, the primary key is imported into the main service of the main configuration component through the secondary configuration component, and then registered to the management center within the main configuration component through the main service of the main configuration component.

[0084] Furthermore, before the page element import module 23 imports the page elements of the plurality of slave servers into the main service of the main configuration component through the slave services of the plurality of slave configuration components, and into the management center of the main configuration component through the main service of the main configuration component, the page element import module 23 is further configured to set configuration information in the management center, wherein the configuration information includes configuration conditions, whether to add a slot boolean value, and configuration details description.

[0085] Furthermore, the page update module 24 is also used to, when listening to the page element update of the master server, obtain the corresponding update content, obtain the increment of the configuration information according to the corresponding update content, synchronize the increment of the configuration information to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements of the slave server according to the increment of the configuration information.

[0086] In one specific embodiment, when the page elements of the master server are updated, the configuration information of the management center is updated accordingly. The master configuration component listens to the page elements of the master server by listening to the configuration information of the management center. By listening to the configuration information of the management center, the corresponding update content is obtained, thereby obtaining the increment of the configuration information. The increment of the configuration information is synchronized to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements of the slave server according to the increment of the configuration information, responding to the configuration control of the management center in real time, so as to realize the synchronous rendering of the master server page and the slave server page.

[0087] Furthermore, the page update module 24 is also used to, when detecting an update of page elements on the master server, obtain the corresponding update content, obtain the increment of configuration information and the primary key of the corresponding page element based on the corresponding update content, and synchronize the increment of configuration information and the primary key of the corresponding page element to the slave configuration component, so that the slave configuration component controls the update synchronization of page elements on the slave server based on the increment of configuration information and the primary key of the corresponding page element.

[0088] Specifically, after obtaining the increment of the configuration information and the primary key of the corresponding page element, the configuration component can control the update synchronization of the page elements of the slave server based on the increment of the configuration information and the primary key of the corresponding page element, so as to reduce the rendering time of the page on the slave server.

[0089] This invention provides a front-end page rendering control device. A server registration module 21 registers a network server as the master server and multiple network servers as slave servers to the master server. A configuration component deployment module 22 sets a master configuration component for the master server and multiple slave configuration components for each slave server, importing the master and slave configuration components into a pre-deployed front-end project. A page element import module 23 imports page elements from the master server into the master configuration component and imports page elements from the slave servers into the master configuration component through the slave configuration components. A page update module 24 enables the master configuration component to monitor page elements on the master server; if an update is detected, the slave configuration components synchronize the updates of the page elements on the slave servers with those on the master server. This achieves synchronized rendering of the front-end pages on the master and slave servers, reducing rendering time and facilitating real-time online business operations, thus mitigating the impact of long rendering times on online services.

[0090] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 5 As shown, the electronic device 30 includes a processor 31 and a memory 32 communicatively connected to the processor 31.

[0091] The memory 32 stores program instructions for implementing the front-end page rendering control method of any of the above embodiments.

[0092] The processor 31 is used to execute program instructions stored in the memory 32 for code testing.

[0093] The processor 31 can also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip with signal processing capabilities. The processor 31 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0094] This invention provides a storage medium that stores program instructions capable of implementing all the methods described above. The storage medium can be non-volatile or volatile. These program instructions can be stored in the storage medium as a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0095] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0096] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

[0097] The above description is merely an embodiment of the present invention. It should be noted that those skilled in the art can make improvements without departing from the inventive concept of the present invention, but these improvements all fall within the protection scope of the present invention.

Claims

1. A front-end page rendering control method, characterized in that, Includes the following steps: One network server is used as the master server, and multiple network servers are used as multiple slave servers, and the multiple slave servers are registered to the master server; Configure a master configuration component for the master server and configure multiple slave configuration components for each of the multiple slave servers. Import the master configuration component and the multiple slave configuration components into the pre-deployed front-end project. The page elements of the master server are imported into the master configuration component. The master configuration component has a management center, and configuration information is set in the management center. The page elements of the multiple slave servers are imported into the master configuration component through the multiple slave configuration components respectively. The configuration information includes configuration conditions, whether to add a slot boolean value, and configuration details description. The main configuration component listens for updates to the page elements of the main server. If an update to a page element on the main server is detected, the multiple slave configuration components synchronize the page elements of the slave servers with the updates of the page elements on the main server. This includes... The main configuration component listens to the page elements of the main server. If an update to the page elements of the main server is detected, the configuration information of the management center is updated accordingly. By listening to the configuration information of the management center, the corresponding update content is obtained to obtain the increment of the configuration information. The increment of the configuration information is synchronized to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements of the slave server according to the increment of the configuration information.

2. The front-end page rendering control method according to claim 1, characterized in that, Registering the plurality of slave servers to the master server includes: obtaining the IP addresses of the plurality of slave servers, and registering the plurality of slave servers to the master server based on the IP addresses of the plurality of slave servers.

3. The front-end page rendering control method according to claim 1, characterized in that, The page elements of the multiple slave servers are respectively introduced to the main configuration component through the multiple slave configuration components. This includes introducing the page elements of the multiple slave servers to the main service of the main configuration component through the slave service of the multiple slave configuration components, and then introducing them to the management center of the main configuration component through the main service of the main configuration component. Accordingly, the main configuration component is configured to listen to the page elements of the main server, including the management center in the main configuration component is configured to listen to the page elements of the main server.

4. The front-end page rendering control method according to claim 3, characterized in that, Before importing the page elements of the multiple slave servers into the main service of the main configuration component through the slave services of the multiple slave configuration components, and into the management center of the main configuration component through the main service of the main configuration component, the method further includes: setting corresponding primary keys for the page elements of the main server and the page elements of the multiple slave servers respectively, and configuring the ID of the primary key in the management center.

5. The front-end page rendering control method according to claim 1, characterized in that, If an update to page elements is detected on the master server, the page elements on the multiple slave servers are synchronized with the page elements on the master server through the multiple slave configuration components, including: If an update to a page element is detected on the master server, the corresponding update content is obtained. Based on the update content, the increment of the configuration information and the primary key of the corresponding page element are obtained. The increment of the configuration information and the primary key of the corresponding page element are synchronized to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements on the slave server based on the increment of the configuration information and the primary key of the corresponding page element.

6. A front-end page rendering control device, characterized in that, It includes a server registration module, a configuration component deployment module, a page element import module, and a page update module; The server registration module is used to register the multiple network servers as the master server and the multiple network servers as the slave servers to the master server. The configuration component deployment module is used to set a main configuration component for the master server and set multiple slave configuration components for the multiple slave servers respectively, and to import the main configuration component and the multiple slave configuration components into the pre-deployed front-end project; The page element import module is used to import the page elements of the master server to the master configuration component. The master configuration component has a management center, configuration information is set in the management center, and the page elements of the multiple slave servers are imported to the master configuration component through the multiple slave configuration components respectively. The configuration information includes configuration conditions, whether to add a slot boolean value, and configuration details description. The page update module is used to enable the main configuration component to listen for page elements on the main server. If an update to a page element on the main server is detected, the multiple slave configuration components are used to synchronize the page elements on the multiple slave servers with the update of the page elements on the main server, including... The main configuration component listens to the page elements of the main server. If an update to the page elements of the main server is detected, the configuration information of the management center is updated accordingly. By listening to the configuration information of the management center, the corresponding update content is obtained to obtain the increment of the configuration information. The increment of the configuration information is synchronized to the slave configuration component, so that the slave configuration component controls the update synchronization of the page elements of the slave server according to the increment of the configuration information.

7. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, characterized in that, When the processor executes the computer program, it implements the front-end page rendering control method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the front-end page rendering control method as described in any one of claims 1 to 5.