Page display method and device, computer device, and computer readable storage medium
By working together with cache nodes and event-driven servers to load and render page configuration data, the problem of slow page loading speed in existing technologies is solved, achieving more efficient page display.
Patent Information
- Application Number
- CN202111552952.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2041-12-17
AI Technical Summary
The existing page loading method relies on API calls to dynamically load data, resulting in slow page loading speed and low efficiency.
The system receives page request information through multiple cache nodes, determines whether the target page exists, and if not, loads the target configuration data from the content management server through the event-driven server, parses the target e-commerce data, obtains the JSON page data, and renders the target page based on static resources.
It improves page rendering efficiency, reduces the number of API calls, and increases page loading speed.
Smart Images

Figure CN114168876B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of big data technology, and in particular to a page display method, apparatus, computer device, and computer-readable storage medium. Background Technology
[0002] As business processes iterate, each page contains more and more modules. Users often need to make multiple API calls to access the front-end page, and the page loading efficiency on the client side is limited by these API calls. Retrieving dynamic data through API calls and rendering the page based on that data results in slow page loading speeds and low efficiency because additional API calls are required to retrieve dynamic data during page loading. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a page display method, apparatus, computer device and computer-readable storage medium to solve the problems of slow page loading speed and low efficiency caused by the existing method of relying on calling interfaces to obtain dynamic data for page loading on the client side.
[0004] One aspect of this invention provides a page display method, comprising:
[0005] The target cache node among multiple cache nodes receives page request information sent by the client, wherein the page request information is used to request the target page;
[0006] Determine whether any cache node contains the target page;
[0007] If the target page is not included in any cache node, the event-driven server receives the page request information and loads the target configuration data from the content management server according to the page request information.
[0008] The event-driven server parses the target configuration data and obtains the target e-commerce data from the target page's dynamic module data;
[0009] Based on the target e-commerce data, an event-driven server retrieves JSON page data related to the target e-commerce data from a network storage server. This JSON page data includes pre-processed static interface data from multiple sources.
[0010] The event-driven server renders the target page based on the static resources in the target configuration data and the JSON page data, and returns the target page to the client for page display.
[0011] Optionally, determining whether any cache node includes the target page further includes:
[0012] Based on the page request information, determine whether the target cache node includes the target page;
[0013] If the target cache node does not include the target page, then determine whether any of the remaining cache nodes among the plurality of cache nodes includes the target page;
[0014] If any of the remaining cache nodes among the plurality of cache nodes includes the target page, then the target page is obtained through the target cache node and returned to the client for page display.
[0015] Optionally, the method further includes:
[0016] If the JSON page data related to the target e-commerce data cannot be obtained from the network storage server through the event-driven server, then the event-driven server generates multiple target interface request information based on the page request information.
[0017] The event-driven server calls multiple target interfaces based on the request information of the multiple target interfaces, and receives the target page dynamic module data returned by the multiple target interfaces;
[0018] The event-driven server renders the target page based on the dynamic module data and static resources of the target page, and returns the target page to the client for page display.
[0019] Optionally, the method further includes:
[0020] The system receives page access information from various clients through the e-commerce access gateway. Each page access information includes page module identification data and access time data. The system then sends each page access information to the e-commerce offline processing server.
[0021] Perform the following operations through the offline processing server of the aforementioned e-commerce platform:
[0022] Update the access time and number of visits for each page based on the access information of each page.
[0023] The updated access time and access volume data for each page are compared with the preset access time threshold and preset access volume threshold for each page, respectively.
[0024] If the access time data after the page update is greater than the preset access time threshold for the page and the access volume data after the page update is greater than the preset access volume threshold for the page, then the frequency of preprocessing the page will be increased.
[0025] Optionally, the method further includes: preprocessing multiple interface data of multiple interfaces related to the page; the preprocessing steps include:
[0026] The dynamic module data of the page is transmitted to the offline processing server of the e-commerce platform through the content management server.
[0027] The offline processing server of the e-commerce platform receives the dynamic module data of the page and extracts key data from the dynamic module data of the page.
[0028] The key data is asynchronously parsed by the offline processing server of the mall to obtain product data and promotional data corresponding to the dynamic module data of the page.
[0029] The offline processing server of the e-commerce platform generates corresponding JSON page data based on the product data and the promotional data, and uploads the JSON page data to the network storage server for storage.
[0030] Optionally, the method further includes:
[0031] Perform the following operations through the offline processing server of the aforementioned e-commerce platform:
[0032] Receive updated product data and promotional data from the dynamic module data on the page;
[0033] Determine whether the updated product data and promotional data have been configured.
[0034] If it is determined that the updated product data and promotional data have been configured, then it is determined whether the updated product data and promotional data are consistent with the product data and promotional data already configured in the offline processing server of the mall.
[0035] If the updated product data is inconsistent with the product data already configured in the offline processing server and / or the updated promotional data is inconsistent with the promotional data already configured in the offline processing server, the data preprocessing logic is triggered to regenerate new JSON page data, and the new JSON page data is uploaded to the network storage server for storage.
[0036] Optionally, after uploading the new JSON page data to the network storage server for storage, the method further includes:
[0037] Get the cache node where the page is located;
[0038] The new page is rendered based on the new JSON page data and the page's static resources;
[0039] Replace the page with the new page to refresh the cache node where the page is located.
[0040] Another aspect of the present invention provides a page display device, comprising:
[0041] The receiving module is used to receive page request information sent by the client through a target cache node among multiple cache nodes, wherein the page request information is used to request a target page;
[0042] The determination module is used to determine whether any cache node contains the target page;
[0043] The loading module is used to receive the page request information through the event-driven server and load the target configuration data from the content management server according to the page request information if the target page is not included in any cache node.
[0044] The parsing module is used to parse the target configuration data through the event-driven server and obtain the target e-commerce data in the target page dynamic module data;
[0045] The acquisition module is used to retrieve JSON page data related to the target e-commerce data from a network storage server via an event-driven server, based on the target e-commerce data. The JSON page data includes preprocessed static interface data from multiple sources.
[0046] The rendering module is used to render the target page based on the static resources in the target configuration data and the JSON page data through the event-driven server, and return the target page to the client for page display.
[0047] Another aspect of the present invention provides a computer device, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the page display method described above.
[0048] Another aspect of the present invention provides a computer-readable storage medium storing a computer program that can be executed by at least one processor to cause the at least one processor to perform the steps of the page display method as described above.
[0049] The page display method, apparatus, computer device, and computer-readable storage medium provided in this invention load target configuration data from a content management server through page request information; parse the target configuration data to obtain target e-commerce data from the target page dynamic module data; obtain JSON page data related to the target e-commerce data based on the target e-commerce data, wherein the JSON page data includes preprocessed multiple static interface data; render the target page based on the static resources in the target configuration data and the JSON page data, and return the target page to the client for page display. This invention improves page rendering efficiency by preprocessing the page dynamic module data to obtain multiple static interface data and loading the target configuration data and JSON page data when responding to a page request.
[0050] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the present invention. Attached Figure Description
[0051] Figure 1 An example flowchart illustrating the page display method of the present invention is shown.
[0052] Figure 2 This schematically illustrates a flowchart of the steps in the page display method according to the present invention for determining whether a cached node contains a target page;
[0053] Figure 3 This schematically illustrates a flowchart of the steps in the page display method according to the present invention to render a target page when the JSON page data corresponding to the target page cannot be obtained;
[0054] Figure 4 This schematically illustrates a flowchart of the steps in the page display method according to the present invention to adjust the frequency of page preprocessing based on page access information;
[0055] Figure 5 This schematically illustrates a flowchart of the steps for preprocessing page data in the page display method according to the present invention;
[0056] Figure 6 This schematically illustrates a flowchart of the steps in the page display method according to the present invention to adjust the data of each server according to the updated product data and promotional data;
[0057] Figure 7 This schematically illustrates a flowchart of the steps for refreshing cache nodes in the page display method according to the present invention;
[0058] Figure 8A block diagram of a page display device according to Embodiment 2 of the present invention is shown schematically;
[0059] Figure 9 The diagram illustrates a hardware structure of a computer device suitable for implementing a page display method according to Embodiment 3 of the present invention. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0061] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of the present invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0062] In the description of this invention, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are performed, but are only used to facilitate the description of this invention and to distinguish each step, and therefore should not be construed as a limitation of this invention.
[0063] Example 1
[0064] Please see Figure 1 This document illustrates a flowchart of the page display method according to an embodiment of the present invention. It is understood that the flowchart in this method embodiment is not intended to limit the order of execution steps. The following description uses a computer device as the execution subject as an example:
[0065] In this embodiment of the invention, the page display method is applied to an e-commerce system, which includes multiple cache nodes, an event-driven server, a network storage server, an offline processing server for the e-commerce platform, and a content management server. The cache nodes can be CDN (Content Delivery Network) cache nodes; the event-driven server can be a Node.js server, a server designed for running the JavaScript programming language; the network storage server can be a NAS (Network Attached Storage) server; and the offline processing server for the e-commerce platform can be a searchfacade processing server.
[0066] like Figure 1 As shown, the page display method may include steps S100 to S110, including:
[0067] Step S100: Receive page request information sent by the client through the target cache node among multiple cache nodes, wherein the page request information is used to request the target page.
[0068] The page request information is used to request the event page of the e-commerce platform; that is, the target page requested is the target event page. The target CDN cache node can be the CDN cache node closest to the client. The distributed deployment of CDN cache nodes helps the e-commerce system respond quickly to client page requests, effectively reducing system traffic pressure during peak hours.
[0069] Step S102: Determine whether there is any cache node that includes the target page.
[0070] In this embodiment of the invention, based on the access status of each page, some rendered pages can be deployed and cached on multiple cache nodes as needed. When a cache node receives a page request, it can respond to the page request more quickly and directly.
[0071] To improve the efficiency of data response, please refer to Figure 2The step S102 of determining whether any cache node includes the target page can further include steps S200 to S204, wherein: step S200, based on the page request information, determines whether the target cache node includes the target page; step S202, if the target cache node does not include the target page, then determines whether any remaining cache node among the plurality of cache nodes includes the target page; and step S204, if any remaining cache node among the plurality of cache nodes includes the target page, then obtains the target page through the target cache node and returns the target page to the client for page display. In this embodiment, it is first determined whether the target cache node includes the target page; if not, it is then determined whether the remaining cache nodes include the target page; the orderly determination of whether the target page exists among multiple cache nodes in a distributed deployment effectively improves the efficiency of responding to page request information. If the target page can be directly queried in the cache node, the target page can be obtained and quickly returned to the client.
[0072] Step S104: If the target page is not included in any cache node, the event-driven server receives the page request information and loads the target configuration data from the content management server according to the page request information.
[0073] Specifically, the target configuration data refers to the configuration data related to the target page; the target configuration data includes dynamic module data and multiple static resources. The multiple static resources are page elements on the page that remain unchanged or change only slightly over a relatively long period; the dynamic module data is data on the page that frequently changes within a certain time period.
[0074] Step S106: The target configuration data is parsed by the event-driven server, and the target e-commerce data in the target page dynamic module data is obtained.
[0075] In an exemplary embodiment, corresponding target mall data is extracted from the target configuration data, wherein the target mall data includes multiple product data and multiple promotional data.
[0076] Step S108: Based on the target e-commerce data, obtain JSON page data related to the target e-commerce data from the network storage server through the event-driven server, wherein the JSON page data includes multiple pre-processed static interface data.
[0077] To reduce the interface complexity caused by multi-level caching and improve page rendering efficiency, please refer to [link / reference needed]. Figure 5The method further includes: preprocessing multiple dynamic module data of multiple interfaces related to the page; the preprocessing step may further include steps S500 to S506, wherein: step S500, the multiple dynamic module data of the page is transmitted to the offline processing server of the e-commerce platform through the content management server; step S502, the offline processing server of the e-commerce platform receives the dynamic module data of the page and extracts key data from the dynamic module data of the page; step S504, the offline processing server of the e-commerce platform asynchronously parses the key data to obtain the product data and activity discount data corresponding to the dynamic module data of the page; and step S506, the offline processing server of the e-commerce platform generates corresponding JSON page data according to the product data and the activity discount data, and uploads the JSON page data to the network storage server for storage. In this embodiment, the offline processing server of the e-commerce platform preprocesses the multiple dynamic module data of multiple pages into static JSON page data. When the e-commerce system receives a page request from a client and the target page cannot be found in multiple cache nodes, it can retrieve the target page configuration data related to the target page from the content management server. From this configuration data, it extracts the IDs corresponding to the dynamic modules of the target page. Based on these IDs, it retrieves the corresponding static JSON page data from the network storage server for rendering. This allows for a rapid response to the page request, rendering the target page, and returning it to the client. No additional API calls are needed to obtain the content corresponding to the dynamic module data required for rendering the target page, effectively improving page rendering efficiency and system performance.
[0078] To reduce the time interval for data consistency between the offline processor and the network storage server, and to enable pre-cached data to reach consistency between the offline processor and the network storage server in a shorter time; such as Figure 6As shown, the method further includes performing the following operations through the offline processing server of the e-commerce platform: Step S600, receiving updated product data and promotional data from the dynamic module data of the page; Step S602, determining whether the updated product data and promotional data have been configured; Step S604, if it is determined that the updated product data and promotional data have been configured, determining whether the updated product data and promotional data are consistent with the product data and promotional data already configured in the offline processing server of the e-commerce platform; and Step S606, if the updated product data is inconsistent with the product data already configured in the offline processing server of the e-commerce platform and / or the updated promotional data is inconsistent with the promotional data already configured in the offline processing server of the e-commerce platform, triggering data preprocessing logic to regenerate new JSON page data, and uploading the new JSON page data to the network storage server for storage. The updated product data and promotional data can be product data and promotional data added and modified by merchants and operations personnel. To avoid information loss and ensure timely data consistency, the method also includes: setting up a backup database to monitor binlog and Kafka messages as compensation for updates to dynamic page modules.
[0079] To further ensure data consistency, please refer to Figure 7 After uploading the new JSON page data to the network storage server for storage, the method further includes: refreshing the cache node where the page resides in a timely manner based on the page's traffic. Specifically, this can be achieved through the following operations: step S700, obtaining the cache node where the page resides; step S702, rendering a new page based on the new JSON page data and the page's static resources; and step S704, replacing the original page with the new page to refresh the cache node where the page resides. In this embodiment of the invention, timely refreshing of the cache node where the page resides helps to achieve data consistency.
[0080] To ensure the quality of the page displayed on the visualization component returned to the client and to reduce the display of blank pages; in an exemplary embodiment, please refer to Figure 3The method further includes: when JSON page data related to the target e-commerce data cannot be obtained, calling an interface to perform exception compensation page rendering; specifically implemented through the following operations, wherein: step S300, if JSON page data related to the target e-commerce data cannot be obtained from the network storage server through the event-driven server, then the event-driven server generates multiple target interface request information according to the page request information; step S302, the event-driven server calls multiple target interfaces according to the multiple target interface request information, and receives the target page dynamic module data returned by the multiple target interfaces; and step S304, the event-driven server renders the target page according to the target page dynamic module data and the static resources of the target page, and returns the target page to the client for page display. In this invention, page display also includes a backup scheme. When the target page cannot be directly obtained, nor can the static JSON page data related to the target page be obtained, multiple target interfaces related to the target page can be called to obtain content related to the target dynamic module data of the target page, thereby completing the rendering of the target page; effectively improving the performance of the system response to requests.
[0081] Step S110: The event-driven server renders the target page based on the static resources in the target configuration data and the JSON page data, and returns the target page to the client for page display.
[0082] To ensure efficient resource allocation and timely data updates, please refer to [link / reference needed]. Figure 4The method further includes: updating corresponding data based on the received page access information; specifically including the following steps S400 to S406, wherein: step S400, receiving page access information sent by each client through the e-commerce access gateway, wherein each page access information includes page module identification data and access time data; and sending each page access information to the e-commerce offline processing server; the e-commerce offline processing server performs the following operations: step S402, updating the access time data and access volume data of the corresponding page based on each page access information; step S404, comparing the updated access time data and access volume data of each page with the preset access time threshold and preset access volume threshold of each page respectively; and step S406, if the updated access time data of the page is greater than the preset access time threshold of the page and the updated access volume data of the page is greater than the preset access volume threshold of the page, then increasing the frequency of preprocessing the page. In this embodiment of the invention, when multiple users send corresponding page request information and the corresponding client receives the corresponding target page, each client returns page access information to the e-commerce access gateway based on the page content of the received target page. The page access information includes the module ID identifier and access time corresponding to the page content of the obtained target page. In this embodiment of the invention, by combining access time and access volume with distributed CDN cache nodes and e-commerce offline processing server, the loading of each page is effectively managed, and the traffic pressure brought by access to hot pages in a short period of time can be effectively dealt with.
[0083] This invention loads target configuration data from a content management server via page request information; parses the target configuration data to obtain target e-commerce data from the target page dynamic module data; based on the target e-commerce data, obtains JSON page data related to the target e-commerce data, wherein the JSON page data includes preprocessed static interface data from multiple interfaces; renders the target page based on the static resources in the target configuration data and the JSON page data, and returns the target page to the client for page display. This invention improves page rendering efficiency by preprocessing the page dynamic module data to obtain multiple static interface data; and by loading the target configuration data and JSON page data and rendering the target page when responding to a page request.
[0084] Example 2
[0085] Please continue reading. Figure 8The diagram illustrates a block diagram of the page display device of the present invention. In this embodiment, the page display device may include or be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the present invention and implement the above-described page display method. The program module referred to in this embodiment of the present invention refers to a series of computer program instruction segments capable of performing a specific function, which is more suitable than the program itself for describing the execution process of the page display device in the storage medium. The following description will specifically introduce the functions of each program module in this embodiment.
[0086] like Figure 8 As shown, the page display device may include a receiving module 800, a judging module 802, a loading module 804, a parsing module 806, an acquisition module 808, and a rendering module 810, wherein:
[0087] The receiving module 800 is used to receive page request information sent by the client through a target cache node among multiple cache nodes, wherein the page request information is used to request a target page;
[0088] The judgment module 802 is used to determine whether any cache node includes the target page;
[0089] The loading module 804 is used to receive the page request information through the event-driven server and load the target configuration data from the content management server according to the page request information if the target page is not included in any cache node.
[0090] The parsing module 806 is used to parse the target configuration data through the event-driven server and obtain the target e-commerce data in the target page dynamic module data;
[0091] The acquisition module 808 is used to acquire JSON page data related to the target e-commerce data from a network storage server via an event-driven server, based on the target e-commerce data. The JSON page data includes preprocessed static interface data from multiple sources.
[0092] The rendering module 810 is used to render the target page based on the static resources in the target configuration data and the JSON page data through the event-driven server, and return the target page to the client for page display.
[0093] In an exemplary embodiment, the determination module 802 is further configured to: determine whether the target cache node includes the target page based on the page request information; if the target cache node does not include the target page, determine whether any remaining cache node among the plurality of cache nodes includes the target page; and if any remaining cache node among the plurality of cache nodes includes the target page, obtain the target page through the target cache node and return the target page to the client for page display.
[0094] In an exemplary embodiment, the rendering module 810 is further configured to: if JSON page data related to the target e-commerce data cannot be obtained from the network storage server via the event-driven server, generate multiple target interface request information via the event-driven server based on the page request information; call multiple target interfaces via the event-driven server based on the multiple target interface request information, and receive target page dynamic module data returned by the multiple target interfaces; and render the target page via the event-driven server based on the target page dynamic module data and the static resources of the target page, and return the target page to the client for page display.
[0095] In an exemplary embodiment, the page display device further includes a comparison module (not identified). The comparison module is further configured to: receive page access information sent by each client through the e-commerce access gateway, wherein each page access information includes page module identification data and access time data; send each page access information to the e-commerce offline processing server; update the access time data and access volume data of the corresponding page based on each page access information through the e-commerce offline processing server; compare the updated access time data and access volume data of each page with a preset access time threshold and a preset access volume threshold for each page, respectively, through the e-commerce offline processing server; and increase the frequency of preprocessing the page if the updated access time data of a page is greater than the preset access time threshold and the updated access volume data of a page is greater than the preset access volume threshold.
[0096] In an exemplary embodiment, the page display device further includes an offline preprocessing module (unidentified), which is configured to: preprocess multiple interface data of multiple interfaces related to the page. The offline preprocessing module is also configured to: transmit dynamic page module data to the e-commerce offline processing server via a content management server; receive the dynamic page module data via the e-commerce offline processing server and extract key data from the dynamic page module data; asynchronously parse the key data via the e-commerce offline processing server to obtain product data and promotional data corresponding to the dynamic page module data; and generate corresponding JSON page data via the e-commerce offline processing server based on the product data and the promotional data, and upload the JSON page data to a network storage server for storage.
[0097] In an exemplary embodiment, the page display device further includes an update module (not identified), which is further configured to: receive updated product data and promotional data from the page dynamic module data via the offline processing server; determine via the offline processing server whether the updated product data and promotional data have been configured; if it is determined that the updated product data and promotional data have been configured, determine via the offline processing server whether the updated product data and promotional data are consistent with the configured product data and promotional data in the offline processing server; and if the updated product data is inconsistent with the configured product data and / or the updated promotional data is inconsistent with the configured promotional data in the offline processing server, trigger data preprocessing logic via the offline processing server to regenerate new JSON page data, and upload the new JSON page data to the network storage server for storage.
[0098] In an exemplary embodiment, the update module is further configured to: obtain the cache node where the page is located; render a new page based on the new JSON page data and the static resources of the page; and replace the page with the new page to refresh the cache node where the page is located.
[0099] Example 3
[0100] See Figure 9This is a schematic diagram of the hardware architecture of a computer device 10000 suitable for implementing a page display method according to Embodiment 3 of the present invention. In this embodiment, the computer device 10000 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. The computer device 10000 can be a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including independent servers or server clusters composed of multiple servers), gateway, etc. Figure 9 As shown, the computer device 10000 includes, but is not limited to, a memory 10010, a processor 10020, and a network interface 10030 that can be interconnected via a system bus. Wherein:
[0101] In this embodiment, the memory 10010 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 may be an internal storage unit of the computer device 10000, such as the hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the computer device 10000. Of course, the memory 10010 may also include both the internal storage unit and the external storage device of the computer device 10000. In this embodiment, the memory 10010 is typically used to store the operating system and various application software installed on the computer device 10000, such as the program code of the page display device in the above embodiment. Furthermore, the memory 10010 can also be used to temporarily store various types of data that have been output or will be output.
[0102] In some embodiments, processor 10020 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 10020 is typically used to control the overall operation of computer device 10000, such as performing control and processing related to data interaction or communication with computer device 10000. In this embodiment, processor 10020 is used to run program code stored in memory 10010 or process data, for example, to run a page display device to implement the page display method of the above embodiments.
[0103] The network interface 10030 may include a wireless network interface or a wired network interface. This network interface 10030 is typically used to establish communication connections between the computer device 10000 and other electronic devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal via a network, establishing a data transmission channel and communication connection between the computer device 10000 and the external terminal. The network may be an intranet, the Internet, GSM, WCDMA, 4G, 5G, Bluetooth, Wi-Fi, or other wireless or wired networks.
[0104] It should be pointed out that, Figure 9 Only a computer device 10000 with components 10010-10030 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0105] In this embodiment, the page display device stored in the memory 10010 can be further divided into one or more program modules. The one or more program modules are stored in the memory 10010 and executed by one or more processors (processor 10020 in this embodiment) to complete the present invention.
[0106] For example, Figure 8A schematic diagram of the program modules implementing the page display device is shown. In this embodiment, the page display device can be divided into a receiving module 800, a judging module 802, a loading module 804, a parsing module 806, an acquisition module 808, and a rendering module 810. The program module, as referred to in this invention, is a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the page display device in the computer device 10000. The specific functions of the program modules 800-810 have been described in detail in Embodiment Two and will not be repeated here.
[0107] Example 4
[0108] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by at least one processor, implements the steps of the xxx method in the embodiment.
[0109] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, app store, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the stuttering detection method in this embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
[0110] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.
[0111] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0112] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. 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 scope of patent protection of the present invention.
Claims
1. A page display method, characterized in that, include: The target cache node among multiple cache nodes receives page request information sent by the client, wherein the page request information is used to request the target page; Determine whether any cache node contains the target page; If the target page is not included in any cache node, the event-driven server receives the page request information and loads the target configuration data from the content management server according to the page request information; the target configuration data is configuration data related to the target page; the target configuration data includes page dynamic module data and multiple static resources; The event-driven server parses the target configuration data and obtains the target e-commerce data from the dynamic module data of the target page; Based on the target e-commerce data, an event-driven server retrieves JSON page data related to the target e-commerce data from a network storage server. This JSON page data includes pre-processed static interface data from multiple sources. The event-driven server renders the target page based on the static resources in the target configuration data and the JSON page data, and returns the target page to the client for page display. The system receives page access information from various clients through the e-commerce access gateway. Each page access information includes page module identification data and access time data. The system then sends each page access information to the e-commerce offline processing server. Perform the following operations through the offline processing server of the aforementioned e-commerce platform: Update the access time and number of visits for each page based on the access information of each page. If the access time data after the page update is greater than the preset access time threshold for the page and the access volume data after the page update is greater than the preset access volume threshold for the page, then the frequency of preprocessing the page will be increased. Preprocessing is performed on multiple interface data from multiple interfaces related to the page; the preprocessing steps include: The dynamic module data of the page is transmitted to the offline processing server of the e-commerce platform through the content management server. The offline processing server of the e-commerce platform receives the dynamic module data of the page and extracts key data from the dynamic module data of the page. The key data is asynchronously parsed by the offline processing server of the mall to obtain product data and promotional data corresponding to the dynamic module data of the page. The offline processing server of the e-commerce platform generates corresponding JSON page data based on the product data and the promotional data, and uploads the JSON page data to the network storage server for storage.
2. The page display method according to claim 1, characterized in that, The determination of whether any cache node includes the target page also includes: Based on the page request information, determine whether the target cache node includes the target page; If the target cache node does not include the target page, then determine whether any of the remaining cache nodes among the plurality of cache nodes includes the target page; If any of the remaining cache nodes among the plurality of cache nodes includes the target page, then the target page is obtained through the target cache node and returned to the client for page display.
3. The page display method according to claim 1, characterized in that, The method further includes: If the JSON page data related to the target e-commerce data cannot be obtained from the network storage server through the event-driven server, then the event-driven server generates multiple target interface request information based on the page request information. The event-driven server calls multiple target interfaces based on the request information of the multiple target interfaces, and receives the target page dynamic module data returned by the multiple target interfaces; The event-driven server renders the target page based on the dynamic module data and static resources of the target page, and returns the target page to the client for page display.
4. The page display method according to claim 1, characterized in that, The method further includes: Perform the following operations through the offline processing server of the aforementioned e-commerce platform: Receive updated product data and promotional data from the dynamic module data on the page; Determine whether the updated product data and promotional data have been configured. If it is determined that the updated product data and promotional data have been configured, then it is determined whether the updated product data and promotional data are consistent with the product data and promotional data already configured in the offline processing server of the mall. If the updated product data is inconsistent with the product data already configured in the offline processing server and / or the updated promotional data is inconsistent with the promotional data already configured in the offline processing server, the data preprocessing logic is triggered to regenerate new JSON page data, and the new JSON page data is uploaded to the network storage server for storage.
5. The page display method according to claim 4, characterized in that, After uploading the new JSON page data to the network storage server for storage, the method further includes: Get the cache node where the page is located; The new page is rendered based on the new JSON page data and the page's static resources; Replace the page with the new page to refresh the cache node where the page is located.
6. A page display device, characterized in that, include: The receiving module is used to receive page request information sent by the client through a target cache node among multiple cache nodes, wherein the page request information is used to request a target page; The determination module is used to determine whether any cache node contains the target page; A loading module is used to receive page request information from an event-driven server and load target configuration data from a content management server if the target page is not included in any cache node. The target configuration data is configuration data related to the target page and includes page dynamic module data and multiple static resources. The parsing module is used to parse the target configuration data through the event-driven server and obtain the target e-commerce data in the target page dynamic module data; The acquisition module is used to retrieve JSON page data related to the target e-commerce data from a network storage server via an event-driven server, based on the target e-commerce data. The JSON page data includes preprocessed static interface data from multiple sources. The rendering module is used to render the target page based on the static resources in the target configuration data and the JSON page data through the event-driven server, and return the target page to the client for page display; The comparison module is used to: receive page access information sent by each client through the e-commerce access gateway, wherein each page access information includes page module identification data and access time data; and send each page access information to the e-commerce offline processing server; Perform the following operations through the offline processing server of the aforementioned e-commerce platform: Update the access time and number of visits for each page based on the access information of each page. If the access time data after the page update is greater than the preset access time threshold for the page and the access volume data after the page update is greater than the preset access volume threshold for the page, then the frequency of preprocessing the page will be increased. An offline preprocessing module is used to preprocess data from multiple interfaces related to a page; the preprocessing steps include: The dynamic module data of the page is transmitted to the offline processing server of the e-commerce platform through the content management server. The offline processing server of the e-commerce platform receives the dynamic module data of the page and extracts key data from the dynamic module data of the page. The key data is asynchronously parsed by the offline processing server of the mall to obtain product data and promotional data corresponding to the dynamic module data of the page. The offline processing server of the e-commerce platform generates corresponding JSON page data based on the product data and the promotional data, and uploads the JSON page data to the network storage server for storage.
7. A computer device, the computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the page display method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by at least one processor to cause the at least one processor to perform the steps of the page display method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Page display method and device, electronic equipment and storage medium
CN113704654A