Page data acquisition method and device, communication equipment, storage medium and program product
The geo-cache pre-request system addresses slow page loading for first-time users in instant retail applications by retrieving cached data from nearby locations, enhancing loading speed and user experience.
Patent Information
- Application Number
- CN202411253468.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-31
AI Technical Summary
Existing optimization solutions for instant page opening in consumer-oriented applications, such as instant retail applications, are ineffective for first-time users, leading to slow page loading and reduced user experience due to reliance on local cache mechanisms.
A geo-cache pre-request system is employed to determine a target cache location matching the client's location within a specified query radius, allowing retrieval of cached page data from other clients, which is then returned to the client for immediate page display.
Improves page loading speed for first-time users, reduces white screen bounce rates, and enhances user experience by ensuring pages are opened in seconds.
Smart Images

Figure CN119226639A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, communication equipment, storage medium and program product for acquiring page data. Background Art
[0002] At present, most optimization solutions for achieving instant page opening in consumer-oriented pages of instant retail applications are loading solutions based on local cache. However, loading solutions based on local cache are usually for non-first-time users. Therefore, the above-mentioned optimization solutions for opening in seconds cannot be applied to first-time users, resulting in slow page loading for first-time users, and the page cannot be opened in seconds, which reduces the user experience. Summary of the invention
[0003] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a page data acquisition method, apparatus, communication device, storage medium and program product.
[0004] In a first aspect of an embodiment of the present disclosure, a page data acquisition method is provided, which is applied to a server, and the method includes: receiving a geo-cache pre-request sent by a client, the geo-cache pre-request being used to request page cache data of a target page of a target application; in response to the geo-cache pre-request, determining a target cache location matching a location of the client and target page cache data corresponding to the target cache location from the geo-cache data based on a target query strategy; the target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geo-cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geo-cache pre-request; and the target page cache data is returned to the client.
[0005] According to a second aspect of an embodiment of the present disclosure, a page data acquisition method is provided, which is applied to a client, and the method includes: sending a geo-cache pre-request to a server, the geo-cache pre-request being used to request page cache data of a target page of a target application; receiving target page cache data returned by the server, the target page cache data being a target cache location matching a location of a client determined by the server from the geo-cache data based on a target query strategy in response to the geo-cache pre-request, and target page cache data corresponding to the target cache location; the target query strategy including a target query radius, the distance between the target cache location and the location of the client being less than or equal to the target query radius; the geo-cache data including multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data being real page data of the target page displayed by a client at the corresponding cache location before the geo-cache pre-request; and displaying the target page based on the target page cache data.
[0006] According to a third aspect of an embodiment of the present disclosure, a page data acquisition device is provided, the device comprising: a receiving module, for receiving a geo-cache pre-request sent by a client, the geo-cache pre-request being used to request page cache data of a target page of a target application; a determining module, for determining, in response to the geo-cache pre-request, a target cache location matching the location of the client and target page cache data corresponding to the target cache location from the geo-cache data based on a target query strategy; the target query strategy comprising a target query radius, the distance between the target cache location and the location of the client being less than or equal to the target query radius; the geo-cache data comprising a plurality of cache locations and a plurality of page cache data respectively corresponding to the plurality of cache locations; the page cache data being real page data of the target page displayed by the client at the corresponding cache location before the geo-cache pre-request; and a sending module, for returning the target page cache data to the client.
[0007] According to a fourth aspect of an embodiment of the present disclosure, a page data acquisition device is provided, the device comprising: a sending module, used to send a geo-cache pre-request to a server, the geo-cache pre-request being used to request page cache data of a target page of a target application; a receiving module, used to receive target page cache data returned by the server, the target page cache data being a target cache location matching a location of a client determined by the server from the geo-cache data based on a target query strategy in response to the geo-cache pre-request, and target page cache data corresponding to the target cache location; the target query strategy comprising a target query radius, the distance between the target cache location and the location of the client being less than or equal to the target query radius; the geo-cache data comprising a plurality of cache locations, and a plurality of page cache data respectively corresponding to the plurality of cache locations; the page cache data being real page data of the target page displayed by a client at a corresponding cache location before the geo-cache pre-request; and a display module, used to display the target page based on the target page cache data.
[0008] According to a fifth aspect of an embodiment of the present disclosure, a communication device is provided, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the page data acquisition method as described in the first aspect.
[0009] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the page data acquisition method as described in the first aspect or the second aspect is implemented.
[0010] According to a seventh aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product includes a computer program. When the computer program product runs on a processor, the processor executes the computer program to implement the page data acquisition method as described in the first aspect or the second aspect.
[0011] According to an eighth aspect of an embodiment of the present disclosure, a chip is provided, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run program instructions to implement the page data acquisition method as described in the first aspect or the second aspect.
[0012] The technical solution provided by the disclosed embodiment has the following advantages over the prior art: receiving a geo-cache pre-request sent by a client, the geo-cache pre-request being used to request page cache data of a target page of a target application; in response to the geo-cache pre-request, determining a target cache location matching the location of the client and target page cache data corresponding to the target cache location from the geo-cache data based on a target query strategy; the target query strategy includes a target query radius, the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geo-cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geo-cache pre-request; the target page cache data is returned to the client, so that the client displays the target page based on the target page cache data. In the disclosed embodiment, for the target page of the target application, in response to the geographic cache pre-request, the target page cache data that meets certain location conditions with the client's location is queried from the page cache data of other clients stored based on the geographic location, and the target page cache data is returned to the client for target page display. In this way, for first-time users, the page loading speed is improved, the page is opened in seconds, the white screen bounce rate is effectively reduced, the perceived second opening rate is increased, and the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0015] Figure 1 One of the flow charts of the method for obtaining page data provided in the embodiment of the present disclosure;
[0016] Figure 2 The second flowchart of the method for obtaining page data provided by the embodiment of the present disclosure;
[0017] Figure 3 One of the structural block diagrams of the page data acquisition device provided in the embodiment of the present disclosure;
[0018] Figure 4 The second structural block diagram of the page data acquisition device provided in the embodiment of the present disclosure;
[0019] Figure 5 A structural block diagram of a communication device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0022] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0023] First, some nouns or terms involved in the claims and description of the present invention are explained below.
[0024] LBS is the abbreviation of Location Based Service, which means location-based service; the LBS fulfillment scope usually refers to the area within which orders can be fulfilled or services can be provided based on location-based services.
[0025] The white screen bounce rate refers to the proportion of users who leave a web page or application when they encounter a white screen (i.e., a page that is blank for a long time with no content displayed) while accessing the web page or application.
[0026] The real opening rate in seconds is calculated based on the rendering time triggered after the real interface returns as the time required for the web page or application to load and the time when the user can interact with it (Time to Interactive, TTI).
[0027] The somatosensory opening rate is calculated based on the time when the user sees the data (including cached data) and can interact with it as TTI.
[0028] A channel page usually refers to a specific page on a website or application that is divided by topic, content type, or function.
[0029] The essence of geocaching is to retrieve a set of locations visited by all previous users within a specified range, including the user's location address (location point, such as longitude and latitude).
[0030] Currently, optimization solutions for the instant opening of consumer-oriented pages of instant retail applications also include skeleton screen solutions (i.e., solutions for the framework structure of each module of the display page). However, the skeleton screen solution cannot display products in real time, so users still cannot interact, which reduces the user experience.
[0031] Instant retail applications are different from far-field e-commerce applications. The services they provide (the displayed content of the target page) are limited by the LBS fulfillment scope. Users in different regions and ranges cannot use the same cached data. Otherwise, the cached data seen by users may not be fulfillable.
[0032] The server end in the embodiment of the present disclosure may be one or more servers capable of implementing the page data acquisition method, or one or more server clusters, which is not specifically limited in the embodiment of the present disclosure.
[0033] The client in the disclosed embodiment may be an electronic device capable of implementing the page data acquisition method, and may be a mobile electronic device or a non-mobile electronic device. The mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA); the non-mobile electronic device may be a personal computer (PC), a television (TV), a teller machine, or a self-service machine; the disclosed embodiment does not specifically limit this.
[0034] The execution subject of the page data acquisition method provided in the embodiment of the present disclosure may be the above-mentioned server or client, or may be a functional module and / or functional entity in the server or client that can implement the page data acquisition method. The specific execution subject may be determined according to actual usage requirements, and the embodiment of the present disclosure does not limit it.
[0035] The following describes in detail the page data acquisition method provided by the embodiment of the present disclosure through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0036] like Figure 1 As shown, an embodiment of the present disclosure provides a method for obtaining page data, which is applied to a server. The method may include the following steps 101 to 103.
[0037] 101. Receive a geo-caching pre-request sent by a client.
[0038] The geo-cache pre-request is used to request page cache data of a target page of a target application, and the content displayed by the target page of the target application is limited by the fulfillment scope of the location service.
[0039] The client sends a geo-caching pre-request to the server in response to a received trigger operation of displaying a target page from a user.
[0040] Among them, the target pages include channel pages, home pages, and other pages whose display content is restricted by the fulfillment scope of location services.
[0041] In some embodiments of the present disclosure, the client sends a geo-cache pre-request to the server while initializing the page.
[0042] The page initialization may include starting the container of the target application and initializing the js (JavaScript) environment.
[0043] In some embodiments of the present disclosure, the client sends a real data pre-request to the server while initializing the page, and the real data pre-request is used to request the real page data of the target page.
[0044] In some embodiments of the present disclosure, the client may send a geographic cache pre-request to the server through a cache interface, and send a real data pre-request to the server through a real data interface.
[0045] In some embodiments of the present disclosure, while the client is initializing the page, it also determines whether the client stores local page cache data locally.
[0046] In some embodiments of the present application, the client performs page initialization, sends a geographic cache pre-request, sends a real data pre-request, and determines whether to store local page cache data in parallel.
[0047] 102. In response to the geo-cache pre-request, based on a target query strategy, determine from the geo-cache data a target cache location that matches the location of the client, and target page cache data corresponding to the target cache location.
[0048] The target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius. Therefore, the target cache location meets the constraints of the target query strategy.
[0049] The geographic cache data includes multiple cache locations and multiple page cache data corresponding to the multiple cache locations. The page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geographic cache pre-request.
[0050] The location of the client and the cache location are both represented by location information. The location information may be longitude and latitude coordinates or other information representing the location, which is not limited here.
[0051] Among them, the geographic cache data can be a mapping relationship between multiple stored cache locations and multiple page cache data. You can first traverse multiple cache locations to determine the target cache location that matches the location of the client, and then determine the target page cache data corresponding to the target cache location.
[0052] The geographic cache data may also store multiple cache locations and multiple page cache data separately.
[0053] The multiple cache locations may be stored in a geographic database based on a point of interest (POI), or in a geographic grid database based on a geographic grid, etc., which is not limited here. Multiple page cache data are stored in a memory database for fast access.
[0054] The grid division scheme of the geographic grid may be a Geohash algorithm or an S2 algorithm, etc., which is not limited here.
[0055] The target query strategy includes a target query radius, and the target query strategy may also include a cache validity period, and may also include other feasible query strategies, which are not limited here.
[0056] Among them, the target query radius and cache validity period can be determined according to actual conditions and are not limited here.
[0057] 103. Return the target page cache data to the client.
[0058] The target page cache data is returned to the client, so that the client displays the target page based on the target page cache data.
[0059] In some embodiments of the present disclosure, when the client receives target page cache data and no local page cache data is stored locally and no real page data of the target page is received, the client displays the target page based on the target page cache data.
[0060] In some embodiments of the present disclosure, before the client receives the target page cache data and before receiving the real page data of the target page, if it is determined that local page cache data is stored locally, the client displays the target page based on the local page cache data.
[0061] In some embodiments of the present disclosure, after the client receives the target page cache data and before receiving the real page data of the target page, if it is determined that local page cache data is stored locally, the client can display the target page based on the local page cache data, or it can display the target page based on the local page cache data, which is not limited here.
[0062] In some embodiments of the present disclosure, before the client receives the target page cache data and determines that local page cache data is stored locally, if the client receives the real page data of the target page, the client can display the target page based on the real page data of the target page, which is not limited here.
[0063] For the sake of brevity, the real page data of the target page will be referred to as page real data below.
[0064] In the disclosed embodiment, for the target page of the target application, in response to the geographic cache pre-request, the target page cache data that meets certain location conditions with the client's location is queried from the page cache data of other clients stored based on the geographic location, and the target page cache data is returned to the client for target page display. In this way, for first-time users, the page loading speed is improved, the page is opened in seconds, the white screen bounce rate is effectively reduced, and the perceived second opening rate is increased, thereby improving the user experience.
[0065] In some embodiments of the present disclosure, the target query strategy also includes a target cache validity period, the multiple cache locations are stored in a geographic grid database, and the multiple page cache data are stored in a memory database; the above step 102 can be specifically implemented through the following steps 102a to 102e.
[0066] 102a. In response to the geographic cache pre-request, determine a grid code of a geographic grid corresponding to the location of the client.
[0067] The grid code may be determined based on the grid code rule by changing the longitude and latitude coordinates of the location of the client.
[0068] 102b. Based on the grid code, determine the minimum grid set in the geographic grid database that covers the target screening range.
[0069] Among them, the center of the target screening range is the location of the client, and the radius of the target screening range is the target query radius, that is, the target screening range is a circular area with the location of the client as the center and the target query radius as the radius.
[0070] The minimum grid set includes at least one geographical grid, and the minimum grid set includes at least the geographical grid corresponding to the location of the client.
[0071] It can be understood that based on the grid code, the geographic grid corresponding to the client's location can be determined, and then it can be determined whether the geographic grid corresponding to the client's location can cover the target screening range. If the geographic grid corresponding to the client's location can cover the target screening range, the minimum grid set only includes the geographic grid corresponding to the client's location. If the geographic grid corresponding to the client's location cannot cover the target screening range, the geographic grid corresponding to the client's location and at least one surrounding geographic grid will be checked to see if they can cover the target screening range, until the minimum grid set that can cover the target screening range is screened out.
[0072] 102c. Determine, from all cache locations stored in the minimum grid set, at least one cache location whose distance from the location of the client is less than or equal to the target query radius.
[0073] Exemplarily, the geographic grid in the minimum grid set stores the longitude and latitude coordinates of the location point corresponding to the page cache data. Therefore, from all the cache locations cached in the minimum grid set, at least one cache location whose longitude and latitude coordinates meet the distance condition (the distance from the location of the client is less than or equal to the target query radius) is determined.
[0074] 102d. Determine, from the memory database, at least one page cache data corresponding to the at least one cache location.
[0075] Therein, at least one cache location corresponds one-to-one to at least one page cache data.
[0076] The memory database may be a Redis-based database or other databases, which is not limited here.
[0077] 102e. Determine the target page cache data within the target cache validity period from the at least one page cache data.
[0078] In some embodiments of the present disclosure, data legitimacy verification may be performed to determine target page cache data that passes the data legitimacy verification from at least one page cache data.
[0079] The data legitimacy check may include whether the page cache data is within the cache validity period, and may also include whether any resource information (such as product information) included in the page cache data is enforceable, etc., which is not limited here.
[0080] In some embodiments of the present disclosure, the target page cache data is the page cache data within the cache validity period, and the corresponding cache location is the smallest distance from the client location. The smaller the distance between the corresponding cache location and the client location of the page cache data, the stronger the performability of the client at the client location as the target page cache data. Therefore, using the page cache data with the smallest distance between the corresponding cache location and the client location as the target page cache data can effectively ensure the performability of the resources of the target page displayed based on the target page cache data.
[0081] In some embodiments of the present disclosure, geographic cache data is obtained by accessing the page real data of the target page through a real data interface.
[0082] Exemplarily, after the server obtains the page real data 1 of the target application corresponding to the client 1 (which may be the page real data 1 generated by the server in response to the real data pre-request, or the page real data 1 received by the server from the client), the page real data 1 may be used as a new page cache data 1 to update the geographic cache data. Exemplarily, it may include performing coordinate conversion according to the longitude and latitude coordinates 1 of the location point of the client 1, determining the grid code 1, saving the longitude and latitude coordinates 1 to the geographic grid 1 corresponding to the grid code 1, and then storing the page real data 1 and the longitude and latitude coordinates 1 in the cache database.
[0083] At present, some applications that are limited by the fulfillment scope of location services have a high average daily visit volume (average daily page views) and a high number of queries per second (QPS), while some applications that are limited by the fulfillment scope of location services have a relatively low average daily visit volume and a relatively low QPS. Therefore, the average daily visit volume and the number of queries per second of different applications are not on the same order of magnitude. Therefore, how to ensure the cache hit rate when the average daily visit volume and the number of queries per second are low is an urgent problem to be solved.
[0084] In some embodiments of the present disclosure, the cache validity period and query area are two factors that directly affect the cache hit rate. If the cache validity period is short and the query area is small, it is easy to fail to hit the cache. If the cache validity period is long and the query area is large, the cache fulfillment will be reduced. Therefore, how to determine a reasonable cache validity period and query area is a decisive factor in ensuring a high cache hit rate and cache fulfillment.
[0085] In response to the above-mentioned practical technical problems, in the embodiments of the present disclosure, by defining a normalized visit volume formula (such as the second visit volume formula described below) and a visit volume formula for peak periods and hot spots (such as the first visit volume formula described below), the cache validity period and query area can be reasonably determined. Other feasible visit volume formulas can also be defined, which are not limited here.
[0086] Among them, the urban population has the characteristics of clustering, and the usage time distribution is trough-shaped. Users are not evenly distributed in space and time, so it is more effective to explore the cache strategy of peak time and hot spots.
[0087] In some embodiments of the present disclosure, the target query radius includes a first query radius, the target cache validity period includes a first cache validity period, the product of the first query radius and the first cache validity period is greater than or equal to the ratio of the first visit volume value to the target product, the target product is the product of the peak period density coefficient, the first query area, the central area density coefficient and the visit number base unit, the peak period density coefficient is the ratio of the number of visits per unit time in the peak period to the number of visits per unit time in the whole day, the central area density coefficient is the ratio of the number of people per unit area in the central area to the number of people per unit area in the city, the first query area is the area of a circular area with the first query radius as the radius, the first visit volume value is greater than 1, and the visit number base unit is the number of visits per unit area per unit time.
[0088] In some embodiments of the present disclosure, the target query radius includes a second query radius, the target cache validity period includes a second cache validity period, the product of the second query radius and the second cache validity period is greater than or equal to the ratio of the second access value to the access number base unit, the second query area is the area of a circular area with the second query radius as the radius, the second access value is greater than 1, and the access number base unit is the number of visits per unit time and unit area.
[0089] The first cache validity period is smaller than the second cache validity period, and the first query radius is smaller than the second query radius.
[0090] The first pageview value and the second pageview value can be determined according to actual conditions. The first pageview value and the second pageview value can be the same or different, which is not limited here. For example, the first pageview value and the second pageview value are both 1.
[0091] In some embodiments of the present disclosure, the peak period density coefficient may be the peak period density coefficient of all supply areas (ignoring regional differences), and accordingly, the number of visits per unit time during the peak period is the number of visits per unit time during the peak period corresponding to all supply areas, and the number of visits per unit time throughout the day is the number of visits per unit time throughout the day corresponding to all supply areas.
[0092] In some embodiments of the present disclosure, the peak period density coefficient may be the peak period density coefficient of some supply areas (taking regional differences into consideration), and accordingly, the number of visits per unit time during the peak period may be the number of visits per unit time during the peak period corresponding to some supply areas, and the number of visits per unit time throughout the day may be the number of visits per unit time throughout the day corresponding to some supply areas.
[0093] In some embodiments of the present disclosure, a second pageview formula may be defined to calculate the second pageview as follows:
[0094] Second access quantity=second cache validity period*second query area*access number base unit.
[0095] Among them, the second cache validity period: the unit is hours, abbreviated as h; the second query area: the unit is square kilometers, abbreviated as s; the access number base unit: the number of visits per hour and per square kilometer.
[0096] Here, the second access volume needs to be greater than 1. In a statistical sense, it can be guaranteed that new accesses will occur within the cache validity period, thereby updating the cache and achieving a higher cache hit rate.
[0097] Example 1: For an instant retail application, the average daily page views in the region are 222,200, the total area is 333,000 square kilometers, and the base unit of the number of visits is equal to 22.22 / (33.3*24)=0.0278. The formula is converted to h*s*0.0278>1; here, h=7, s=π*1.28 2 , the conditions are met, that is, the second cache validity period is 7 hours and the second query radius is 1.28km.
[0098] In some embodiments of the present disclosure, a first pageview formula may be defined to calculate the second pageview as follows:
[0099] First visit volume = first cache validity period * peak time density coefficient * first query area * central area density coefficient * visit number base unit.
[0100] Among them, the first cache validity period: the unit is hours, abbreviated as h; the first query area: the unit is square kilometers, abbreviated as s; the base unit of visit times: the number of visits per hour and per square kilometer; the peak period density coefficient = (peak period visits / peak period) / (total visits / total period); the central area density coefficient = (central area permanent population / central area area) / (total permanent population of the city / total area of the city).
[0101] Example 2, following Example 1, taking the peak period density coefficient as 1.2345 and the central area density coefficient as 6.666 as an example, the formula is converted to h*1.2345*s*6.666*0.0278>1, where h=5, s=π*0.53 2 , the conditions are met, that is, the first cache validity period is 5 hours and the first query radius is 0.53km.
[0102] In the embodiment of the present disclosure, by defining the first access volume formula and reasonably determining the first cache validity period and the first query radius when the first access volume is greater than the first access volume value, for scenarios in peak periods and hot spots, the target query strategy determined based on the first cache validity period and the first query radius can effectively improve the cache hit rate and cache fulfillment.
[0103] In the embodiment of the present disclosure, by defining the second access volume formula and reasonably determining the second cache validity period and the second query radius when the second access volume is greater than the second access volume value, for normalized scenarios, the target query strategy determined based on the second cache validity period and the second query radius can effectively improve the cache hit rate and cache fulfillment.
[0104] In some embodiments of the present disclosure, queries can be performed in parallel based on a query strategy determined by a first cache validity period and a first query radius, and a query strategy determined by a second cache validity period and a second query radius, to further ensure a higher cache hit rate.
[0105] In some embodiments of the present disclosure, the above step 102 can be specifically implemented through the following steps 102f to 102h.
[0106] 102f. Query the geographic cache data based on the first query strategy and the second query strategy respectively to obtain a first query result corresponding to the first query strategy and a second query result corresponding to the second query strategy.
[0107] The first query strategy includes a first query radius and a first query area, and the second query strategy includes a second query strategy and a second query area.
[0108] 102g. When the first query result is not empty, determine the target cache location and the target page cache data corresponding to the target cache location from the first query result.
[0109] 102h. When the second query result is empty, determine the target cache location and the target page cache data corresponding to the target cache location from the second query result.
[0110] In the disclosed embodiment, the geographic cache data is queried by the first query strategy and the second query strategy at the same time, that is, while searching for cache according to the geographic cache strategy of peak hours and hot spots, the scope is expanded to search for cache as candidate data according to the normalized geographic cache strategy. In this way, while satisfying more accurate cache data in peak hours and hot spots, a higher cache hit rate can also be guaranteed.
[0111] In some embodiments of the present disclosure, the target page structure is complex, and the page modules of different groups of people (such as new and old customers) are very different. If the same page cache data is read, the page is rendered, and then the real data of the page is rendered, since the page module corresponding to the page cache data is different from the page module of the real data of the page, when the target page rendered based on the page cache data is updated to the target page rendered based on the real data of the page, it may cause page jitter and affect the user experience.
[0112] In the disclosed embodiment, the server queries the user status corresponding to the geographic cache pre-request received by the cache interface in real time to determine the end-to-end query time for the client to obtain the corresponding real page data of each module of the target page, and whether each module is associated with the user's personal information characteristics (i.e., whether personalization is required), and then determines the query method for the data corresponding to each module to ensure that the target page structure is stable and does not jitter.
[0113] Among them, the goal of page cache data is to achieve rendering in hundreds of milliseconds. Therefore, the query time of page cache data of each module needs to be strictly limited. The query time of real page data of each module also needs to be strictly limited and cannot become a bottleneck in the rendering link.
[0114] Through data exploration in the development phase, it is found that in the page initialization phase of the instant retail consumer end of the client, the sum of the user's container startup time and the js environment initialization time is greater than or equal to the time threshold. The cache interface initiates a geographic cache pre-request through nativePrefetch (client pre-request) and executes it in parallel with the above page initialization phase. Therefore, the longest end-to-end time of the cache interface is defined as the time threshold to ensure that the page cache data can be consumed when the js logic is executed, achieving the effect of opening in seconds.
[0115] Exemplarily, the time consumption threshold may be 120 ms, which may be determined based on actual conditions and is not limited here.
[0116] In some embodiments of the present disclosure, the modules of the target page can be split according to two dimensions: the end-to-end query time required for the client to obtain the corresponding real page data of each module of the target page, and whether each module is associated with user personal information features.
[0117] Among them, the module is associated with the user's personal information features, that is, the rendering of the module requires the use of the user's personal information features. The rendering can be performed directly using the user's personal information features, or the rendering can be performed based on matching personalized module data based on the user's personal information features. There is no limitation here.
[0118] Exemplarily, the query mode of the module whose end-to-end query time for the corresponding client to obtain the real page data of the target page is less than or equal to the time threshold can be determined as real-time query, that is, the real page data obtained by the real-time query is used as the response data of the geo-cache pre-request; the query mode of the module whose end-to-end query time for the corresponding client to obtain the real page data of the target page is greater than the time threshold and is not associated with the user's personal information characteristics is determined as geo-cache query, that is, the page cache data obtained by the geo-cache query is used as the response data of the geo-cache pre-request; the query mode of the module whose end-to-end query time for the corresponding client to obtain the real page data of the target page is greater than the time threshold and is associated with the user's personal information characteristics is determined as skeleton screen query, that is, the skeleton screen data (i.e., module framework data) obtained by the skeleton screen query is used as the response data of the geo-cache pre-request.
[0119] In some embodiments of the present disclosure, the above step 102 can be specifically implemented through the following steps 102i to 102j.
[0120] 102i. In response to the geo-cache pre-request, determine that the target page includes at least one first module.
[0121] Among them, the end-to-end query time consumed by the client to obtain the real page data corresponding to the first module is greater than or equal to the time consumption threshold, and the first module is not associated with user personal information features.
[0122] 102j. Based on the target query strategy, determine the target cache location and the target page cache data corresponding to the at least one first module from the geographic cache data.
[0123] The target page cache data includes page cache data corresponding to at least one first module.
[0124] In the disclosed embodiment, in response to the geo-cache pre-request, when the target page includes at least one first module, the target page cache data corresponding to the at least one first module is used as the response data of the geo-cache pre-request. In this way, it can be ensured that the end-to-end query time for the client to obtain the target page cache data is less than or equal to the time threshold, and it can be ensured that after the page initialization is completed, the target page cache data can be consumed to render the target page, thereby achieving a second opening effect.
[0125] In some embodiments of the present disclosure, the page data acquisition method provided by the embodiments of the present disclosure may further include the following steps 104 to 106.
[0126] 104. In response to the geo-cache pre-request, determine that the target page includes at least one second module.
[0127] The end-to-end query time consumed by the client to obtain the real page data corresponding to the second module is less than the time threshold.
[0128] 105. Obtain target real page data corresponding to the at least one second module.
[0129] The target real page data includes real page data corresponding to at least one second module.
[0130] 106. Return the target real page data to the client, so that the client displays the target page based on the target real page data.
[0131] In the disclosed embodiment, in response to the geo-cache pre-request, when the target page includes at least one second module, the target real page data corresponding to the at least one second module is used as the response data of the geo-cache pre-request. In this way, it can be ensured that the end-to-end query time for the client to obtain the target real page data is less than or equal to the time threshold, and it can be ensured that after the page initialization is completed, the target real page data can be consumed to render the target page, thereby achieving a second opening effect.
[0132] In some embodiments of the present disclosure, the page data acquisition method provided by the embodiments of the present disclosure may further include the following steps 107 to 109.
[0133] 107. In response to the geo-cache pre-request, determine that the target page includes at least one third module.
[0134] Among them, the end-to-end query time taken by the client to obtain the real page data corresponding to the third module is greater than or equal to the time threshold, and the third module is associated with user personal information characteristics.
[0135] 108. Obtain module framework data corresponding to the at least one third module.
[0136] The module framework data includes at least one module framework corresponding to each of the third modules.
[0137] Among them, the module frame is a placeholder graphic displayed during the loading process of the page content, which is used to represent the framework structure of each module of the page. Therefore, the module frame data does not include resource data, and the data is left blank.
[0138] 109. Return the module framework data to the client, so that the client displays the target page based on the module framework data.
[0139] In the disclosed embodiment, in response to the geo-cache pre-request, when the target page includes at least one third module, module framework data corresponding to the at least one third module is used as response data of the geo-cache pre-request. In this way, it can be ensured that the end-to-end query time for the client to obtain the module framework data is less than or equal to the time threshold, and it can be ensured that after the page initialization is completed, the module framework data can be consumed to render the target page, thereby achieving a second opening effect.
[0140] In some embodiments of the present disclosure, when the target page includes at least two of the first module, the second module, and the third module, before returning the response data to the client, the response data corresponding to the different modules can be assembled to generate the target page data, and then the target page data can be returned to the client so that the client can display the target page based on the target page data.
[0141] Exemplarily, the target page includes at least one first module, at least one second module and at least one third module, and the target page cache data, the target real page data and the module framework data are assembled to generate the target page data, and the target page data is returned to the client.
[0142] Exemplarily, the target page includes at least one first module and at least one second module, and the target page cache data and the target real page data are assembled to generate the target page data, and the target page data is returned to the client.
[0143] In some embodiments of the present disclosure, the server for geographic grid storage, at least one cache location query, the server for cache database management, at least one page cache data query, and the server for page real data query can be the same server or different servers, which is not limited here.
[0144] In some embodiments of the present disclosure, the time consumption threshold is less than or equal to the minimum time consumption for the client to initialize the target page.
[0145] like Figure 2 As shown, in some embodiments of the present disclosure, a method for obtaining page data is provided, which is applied to a client, and the method includes the following steps 201 to 203.
[0146] 201. Send a geocaching pre-request to the server.
[0147] The geo-cache pre-request is used to request page cache data of a target page of a target application, and the content displayed by the target page of the target application is limited by the fulfillment scope of the location service.
[0148] 202. Receive the target page cache data returned by the server.
[0149] Among them, the target page cache data is the target cache location that matches the location of the client, determined by the server from the geographic cache data based on the target query strategy in response to the geographic cache pre-request, and the target page cache data corresponding to the target cache location; the target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geographic cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geographic cache pre-request.
[0150] 203. Display the target page based on the cached data of the target page.
[0151] In some embodiments of the present disclosure, the page data acquisition method provided by the embodiments of the present disclosure may further include the following step 204. The above step 203 may be specifically implemented by the following step 203a or step 203b, or after the above step 204, the page data acquisition method provided by the embodiments of the present disclosure may further include the following step 205.
[0152] 204. Send a real data pre-request to the server, where the real data pre-request is used to request the real page data of the target page.
[0153] The above step 204 is performed in parallel with the above step 201, that is, a geographic cache pre-request and a real data pre-request are sent to the server at the same time.
[0154] 203a. When the received real page data of the target page is abnormal, display the target page based on the cached data of the target page.
[0155] Among them, the existence of anomalies in the real page data of the target page indicates that a real data interface fails and the target page cannot be displayed based on the real page data of the target page.
[0156] The above-mentioned step 203a includes, when the target page is currently displayed based on the local page cache data, if there is an abnormality in the real page data of the received target page, updating the target page based on the target page cache data; when the target page is currently displayed based on the target page cache data, if there is an abnormality in the real page data of the received target page, keeping updating the target page based on the target page cache data.
[0157] In the disclosed embodiment, when there is an anomaly in the real page data of the target page, regardless of whether it is a first-time or second-time user, the target page cache data is used as a backup data to display the target page to ensure user needs, increase user interest, and improve user experience.
[0158] 203b. Before receiving the real page data of the target page returned by the server, display the target page based on the cached data of the target page.
[0159] In the disclosed embodiment, before receiving the real page data of the target page returned by the server, the target page is displayed based on the cached data of the target page. In this way, the page loading speed can be improved, the page can be opened in seconds, the white screen bounce rate can be effectively reduced, and the perceived second opening rate can be increased, thereby improving the user experience.
[0160] 205. Before displaying the target page based on the received target page cache data, receive the real page data of the target page returned by the server, discard the target page cache data, and display the target page based on the real page data of the target page.
[0161] In the disclosed embodiment, when the client receives cached target page data that is later than the real page data of the target page, the client discards the cached target page data and directly renders and displays the target page based on the real page data of the target page. This can avoid unnecessary updates to the target page and can promptly display the real page data of the target page that is more suitable for the user, thereby improving the user experience.
[0162] In some embodiments of the present disclosure, the page data acquisition method provided by the embodiments of the present disclosure may further include the following steps 206 and 207, and the above step 203 may be specifically implemented by the following step 203c.
[0163] 206. Determine whether there is local page cache data corresponding to the target page in the client.
[0164] 207. If local page cache data corresponding to the target page exists in the client, the target page is displayed based on the local page cache data.
[0165] 203c: If there is no local page cache data corresponding to the target page in the client, display the target page based on the target page cache data.
[0166] In the embodiment of the present disclosure, when local page cache data corresponding to the target page exists in the client, the target page is displayed based on the local page cache data. When local page cache data corresponding to the target page does not exist in the client, the target page is displayed based on the target page cache data. In this way, the target page can be displayed to the user more timely, which can improve the user experience.
[0167] In some embodiments of the present disclosure, when local page cache data corresponding to the target page exists in the client, it can be determined whether to display the target page based on the local page cache data or the target page cache data according to actual usage requirements. This is not limited here.
[0168] In some embodiments of the present disclosure, when the target page cache data does not hit and there is local page cache data in the client, the target page is displayed based on the local page cache data, and then when the real page data of the target page is abnormal, the target page displayed based on the local page cache data is updated to a blank page. In this way, the resource information of the local page cache data cannot be fulfilled, which leads to a poor user experience.
[0169] In some embodiments of the present disclosure, the page data acquisition method provided by the embodiments of the present disclosure will be implemented on the client, and designed as a general cache data acquisition hierarchical model, including: an access layer, which is used to initialize the software development kit (Software Development Kit, SDK) configuration and process the data returned by the SDK; an application layer SDK, which is used to inherit the core layer abstract class, encapsulate instant retail business attributes and public methods, and can horizontally support various instant retail fields, reduce access costs, and achieve out-of-the-box use; a core layer SDK, which is used to encapsulate real and cache data acquisition logic, provide preprocessing (prefetch), buried point detection, exception protection and other capabilities, and can horizontally support other C-end business scenarios.
[0170] Figure 3 FIG. 1 is a structural block diagram of a device for acquiring page data according to an embodiment of the present disclosure. Figure 3As shown, it includes: a receiving module 301, which is used to receive a geo-cache pre-request sent by a client, and the geo-cache pre-request is used to request page cache data of a target page of a target application; a determining module 302, which is used to determine a target cache position matching the location of the client and target page cache data corresponding to the target cache position from the geo-cache data in response to the geo-cache pre-request based on a target query strategy; the target query strategy includes a target query radius, and the distance between the target cache position and the location of the client is less than or equal to the target query radius; the geo-cache data includes multiple cache positions, and multiple page cache data corresponding to the multiple cache positions respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache position before the geo-cache pre-request; and a sending module 303, which is used to return the target page cache data to the client.
[0171] In some embodiments of the present disclosure, the target query strategy also includes a target cache validity period, the multiple cache locations are stored in a geographic grid database, and the multiple page cache data are stored in a memory database; the determination module 302 is specifically used to determine the grid code of the geographic grid corresponding to the location of the client in response to the geographic cache pre-request; based on the grid code, determine the minimum grid set in the geographic grid database that covers the target screening range, the center of the target screening range is the location of the client, and the radius of the target screening range is the target query radius; from all the cache locations stored in the minimum grid set, determine at least one cache location whose distance from the location of the client is less than or equal to the target query radius; from the memory database, determine at least one page cache data corresponding to the at least one cache location; from the at least one page cache data, determine the target page cache data within the target cache validity period.
[0172] In some embodiments of the present disclosure, the target query radius includes a first query radius, the target cache validity period includes a first cache validity period, the product of the first query radius and the first cache validity period is greater than or equal to the ratio of the first access volume value to the target product, the target product is the product of the peak period density coefficient, the first query area, the central area density coefficient and the visit number base unit, the peak period density coefficient is the ratio of the number of visits per unit time during the peak period to the number of visits per unit time throughout the day, the central area density coefficient is the ratio of the number of people per unit area in the central area to the number of people per unit area in the city, the first query area The target query radius includes the second query radius, the target cache validity period includes the second cache validity period, the product of the second query radius and the second cache validity period is greater than or equal to the ratio of the second access value to the access number base unit, the second query area is the area of the circular area with the second query radius as the radius, and the second access value is greater than 1; wherein the first cache validity period is less than the second cache validity period, the first query radius is less than the second query radius, and the access number base unit is the number of visits per unit time and unit area.
[0173] In some embodiments of the present disclosure, the determination module 302 is specifically used to query the geographic cache data based on a first query strategy and a second query strategy, respectively, to obtain a first query result corresponding to the first query strategy and a second query result corresponding to the second query strategy, the first query strategy including a first query radius and a first query area, and the second query strategy including a second query strategy and a second query area; when the first query result is not empty, determining the target cache location and the target page cache data corresponding to the target cache location from the first query result; when the second query result is empty, determining the target cache location and the target page cache data corresponding to the target cache location from the second query result.
[0174] In some embodiments of the present disclosure, the determination module 302 is specifically used to respond to the geographic cache pre-request, determine that the target page includes at least one first module, the end-to-end query time for the client to obtain the real page data corresponding to the first module is greater than or equal to the time threshold, and the first module is not associated with user personal information features; based on the target query strategy, determine the target cache location from the geographic cache data, and the target page cache data corresponding to the at least one first module.
[0175] In some embodiments of the present disclosure, the determination module 302 is further used to determine, in response to the geo-cache pre-request, that the target page includes at least one second module, and that the end-to-end query time consumed by the client to obtain the real page data corresponding to the second module is less than a time threshold; the device also includes: an acquisition module, used to obtain the target real page data corresponding to the at least one second module; the sending module 303 is further used to return the target real page data to the client, so that the client displays the target page based on the target real page data.
[0176] In some embodiments of the present disclosure, the determination module 302 is further used to determine, in response to the geo-cache pre-request, that the target page includes at least one third module, that the end-to-end query time taken by the client to obtain the real page data corresponding to the third module is greater than or equal to a time threshold, and that the third module is associated with user personal information features; the device also includes: an acquisition module for obtaining module framework data corresponding to the at least one third module; and the sending module 303 is further used to return the module framework data to the client, so that the client displays the target page based on the module framework data.
[0177] In some embodiments of the present disclosure, the time consumption threshold is less than or equal to the minimum time consumption for the client to initialize the target page.
[0178] In the embodiments of the present disclosure, each module can implement the page data acquisition method provided by the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0179] Figure 4 FIG. 1 is a structural block diagram of a device for acquiring page data according to an embodiment of the present disclosure. Figure 4 As shown, it includes: a sending module 401, which is used to send a geographic cache pre-request to a server, and the geographic cache pre-request is used to request page cache data of a target page of a target application; a receiving module 402, which is used to receive the target page cache data returned by the server, and the target page cache data is a target cache location that matches the location of the client and is determined by the server from the geographic cache data based on a target query strategy in response to the geographic cache pre-request, and a target page cache data corresponding to the target cache location; the target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geographic cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geographic cache pre-request; a display module 403, which is used to display the target page based on the target page cache data.
[0180] In some embodiments of the present disclosure, the sending module 401 is also used to send a real data pre-request to the server, and the real data pre-request is used to request the real page data of the target page; the display module 403 is specifically used to display the target page based on the target page cache data when there is an abnormality in the received real page data of the target page, or, before receiving the real page data of the target page returned by the server, display the target page based on the target page cache data; or, the receiving module 402 is also used to receive the real page data of the target page returned by the server before displaying the target page based on the received target page cache data, discard the target page cache data, and display the target page based on the real page data of the target page.
[0181] In some embodiments of the present disclosure, the device also includes: a determination module, used to determine whether local page cache data corresponding to the target page exists in the client; the display module 403 is also used to display the target page based on the local page cache data when the local page cache data corresponding to the target page exists in the client; the display module 403 is specifically used to display the target page based on the target page cache data when the local page cache data corresponding to the target page does not exist in the client.
[0182] In the embodiments of the present disclosure, each module can implement the page data acquisition method provided by the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0183] Figure 5 The structural diagram of a communication device provided in the embodiment of the present disclosure is used to exemplify the communication device for implementing any page data acquisition method in the embodiment of the present disclosure, and should not be understood as a specific limitation on the embodiment of the present disclosure. The above-mentioned communication device can be the above-mentioned server or client.
[0184] like Figure 5 As shown, the communication device 500 may include a processor (e.g., a central processing unit, a graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the communication device 500 are also stored. The processor 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0185] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the communication device 500 to communicate with other devices wirelessly or by wire to exchange data. Although the communication device 500 is shown with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0186] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processor 501, the functions defined in any page data acquisition method provided in the embodiment of the present disclosure can be executed.
[0187] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0188] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0189] The computer-readable medium may be included in the communication device, or may exist independently without being installed in the communication device.
[0190] The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: receives a geo-cache pre-request sent by a client, the geo-cache pre-request is used to request page cache data of a target page of a target application; in response to the geo-cache pre-request, determines a target cache location matching the location of the client and target page cache data corresponding to the target cache location from the geo-cache data based on a target query strategy; the target query strategy includes a target query radius, the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geo-cache data includes multiple cache locations and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geo-cache pre-request; and the target page cache data is returned to the client.
[0191] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the client, the client: sends a geo-cache pre-request to the server, the geo-cache pre-request is used to request page cache data of a target page of a target application; receives target page cache data returned by the server, the target page cache data is a target cache location matching the location of the client determined by the server from the geo-cache data based on a target query strategy in response to the geo-cache pre-request, and target page cache data corresponding to the target cache location; the target query strategy includes a target query radius, the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geo-cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geo-cache pre-request; and the target page is displayed based on the target page cache data.
[0192] In embodiments of the present disclosure, computer program codes for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0193] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0194] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0195] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0196] In the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0197] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0198] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0199] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for acquiring page data, characterized in that: Applied to the server, the method includes: receiving a geo-cache pre-request sent by a client, wherein the geo-cache pre-request is used to request page cache data of a target page of a target application; In response to the geographic cache pre-request, based on a target query strategy, a target cache location matching the location of the client and target page cache data corresponding to the target cache location are determined from the geographic cache data; the target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geographic cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geographic cache pre-request; The target page cache data is returned to the client.
2. The method according to claim 1, characterized in that: The target query strategy also includes a target cache validity period, the multiple cache locations are stored in a geographic grid database, and the multiple page cache data are stored in a memory database; the response to the geographic cache pre-request, based on the target query strategy, determines from the geographic cache data a target cache location that matches the location of the client, and the target page cache data corresponding to the target cache location, including: In response to the geo-cache pre-request, determining a grid code of a geographic grid corresponding to the location of the client; Based on the grid code, determine a minimum grid set in the geographic grid database that covers a target screening range, the center of the target screening range is the location of the client, and the radius of the target screening range is the target query radius; Determine, from all cache locations stored in the minimum grid set, at least one cache location whose distance from the location of the client is less than or equal to the target query radius; Determining, from the memory database, at least one page cache data corresponding to the at least one cache location; The target page cache data within the target cache validity period is determined from the at least one page cache data.
3. The method according to claim 2, characterized in that The target query radius includes a first query radius, the target cache validity period includes a first cache validity period, the product of the first query radius and the first cache validity period is greater than or equal to the ratio of the first access volume value to the target product, the target product is the product of the peak time density coefficient, the first query area, the central area density coefficient and the access number base unit, the peak time density coefficient is the ratio of the number of visits per unit time during the peak time period to the number of visits per unit time throughout the day, the central area density coefficient is the ratio of the number of people per unit area in the central area to the number of people per unit area in the city, the first query area is the area of a circular area with the first query radius as the radius, and the first access volume value is greater than 1; and / or, The target query radius includes a second query radius, the target cache validity period includes a second cache validity period, the product of the second query radius and the second cache validity period is greater than or equal to a ratio of a second access quantity value to a reference unit of access times, the second query area is an area of a circular area with the second query radius as a radius, and the second access quantity value is greater than 1; The first cache validity period is smaller than the second cache validity period, the first query radius is smaller than the second query radius, and the access number reference unit is the access number per unit time and per unit area.
4. The method according to claim 3, characterized in that The target query strategy is based on determining a target cache location matching the location of the client from the geographic cache data, and target page cache data corresponding to the target cache location, including: Based on a first query strategy and a second query strategy, the geographic cache data is queried respectively to obtain a first query result corresponding to the first query strategy and a second query result corresponding to the second query strategy, wherein the first query strategy includes the first query radius and the first query area, and the second query strategy includes the second query strategy and the second query area; In the case that the first query result is not empty, determining the target cache location and the target page cache data corresponding to the target cache location from the first query result; When the first query result is empty, the target cache location and the target page cache data corresponding to the target cache location are determined from the second query result.
5. The method according to claim 1, characterized in that The step of determining, in response to the geographic cache pre-request, a target cache location matching the location of the client and target page cache data corresponding to the target cache location from the geographic cache data based on a target query strategy includes: In response to the geo-cache pre-request, determining that the target page includes at least one first module, that an end-to-end query time taken by the client to obtain real page data corresponding to the first module is greater than or equal to a time threshold, and that the first module is not associated with a user personal information feature; Based on the target query strategy, the target cache location and the target page cache data corresponding to the at least one first module are determined from the geographic cache data.
6. The method according to claim 1, characterized in that The method further comprises: In response to the geo-cache pre-request, determining that the target page includes at least one second module, and that an end-to-end query time consumed by the client to obtain real page data corresponding to the second module is less than a time consumption threshold; Acquire target real page data corresponding to the at least one second module; The target real page data is returned to the client.
7. The method according to claim 1, characterized in that The method further comprises: In response to the geo-cache pre-request, determining that the target page includes at least one third module, that an end-to-end query time taken by the client to obtain real page data corresponding to the third module is greater than or equal to a time threshold, and that the third module is associated with a user personal information feature; Acquire module framework data corresponding to the at least one third module; The module framework data is returned to the client.
8. The method according to any one of claims 5 to 7, characterized in that The time consumption threshold is less than or equal to a minimum time consumption for the client to perform page initialization on the target page.
9. A method for acquiring page data, characterized in that: Applied to a client, the method comprises: Sending a geo-cache pre-request to a server, the geo-cache pre-request being used to request page cache data of a target page of a target application; Receive target page cache data returned by the server, the target page cache data being a target cache location matching the location of the client determined by the server from the geographic cache data based on a target query strategy in response to the geographic cache pre-request, and target page cache data corresponding to the target cache location; the target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geographic cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; the page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geographic cache pre-request; The target page is displayed based on the target page cache data.
10. The method according to claim 9, characterized in that The method further comprises: Sending a real data pre-request to the server, wherein the real data pre-request is used to request the real page data of the target page; The displaying the target page based on the target page cache data includes: In the case that the received real page data of the target page is abnormal, the target page is displayed based on the cached data of the target page, or before the real page data of the target page returned by the server is received, the target page is displayed based on the cached data of the target page; or, The method further comprises: Before displaying the target page based on the received target page cache data, real page data of the target page returned by the server is received, the target page cache data is discarded, and the target page is displayed based on the real page data of the target page.
11. The method according to claim 9 or 10, characterized in that: The method further comprises: Determine whether there is local page cache data corresponding to the target page in the client; In a case where local page cache data corresponding to the target page exists in the client, displaying the target page based on the local page cache data; The displaying the target page based on the target page cache data includes: In a case where the local page cache data corresponding to the target page does not exist in the client, the target page is displayed based on the target page cache data.
12. A device for acquiring page data, characterized in that: include: A receiving module, configured to receive a geo-cache pre-request sent by a client, wherein the geo-cache pre-request is used to request page cache data of a target page of a target application; A determination module, configured to determine, in response to the geographic cache pre-request, a target cache location matching the location of the client and target page cache data corresponding to the target cache location from the geographic cache data based on a target query strategy; the target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geographic cache data includes a plurality of cache locations, and a plurality of page cache data corresponding to the plurality of cache locations respectively; The page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geo-cache pre-request; The sending module is used to return the target page cache data to the client.
13. A device for acquiring page data, characterized in that: include: A sending module, used for sending a geo-cache pre-request to a server, wherein the geo-cache pre-request is used for requesting page cache data of a target page of a target application; A receiving module, configured to receive target page cache data returned by the server, wherein the target page cache data is a target cache location matching the location of the client determined by the server from the geographic cache data based on a target query strategy in response to the geographic cache pre-request, and target page cache data corresponding to the target cache location; the target query strategy includes a target query radius, and the distance between the target cache location and the location of the client is less than or equal to the target query radius; the geographic cache data includes multiple cache locations, and multiple page cache data corresponding to the multiple cache locations respectively; The page cache data is the real page data of the target page displayed by the client at the corresponding cache location before the geo-cache pre-request; A display module is used to display the target page based on the target page cache data.
14. A communication device, characterized in that: include: A memory and a processor, the memory is used to store a computer program; the processor is used to execute the page data acquisition method described in any one of claims 1 to 11 when calling the computer program.
15. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the page data acquisition method according to any one of claims 1 to 11 is implemented.
16. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the page data acquisition method according to any one of claims 1 to 11 is implemented.
Citation Information
Cited By
Page data acquisition method and apparatus, communication device, storage medium, and program product
WO2026051792A1
