A method and device for displaying a web page
By downloading and cacheing network page data on the terminal device, and configuring an effective time period according to the page level, and directly displaying network pages from local cache, the problems of low network page display efficiency and service response quality in the prior art are solved, and more efficient data interaction and more stable service response are achieved.
Patent Information
- Application Number
- CN202010200429.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-20
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2040-03-20
AI Technical Summary
The existing network page display technology obtains page data from third-party systems through hit thermal response, resulting in an increase in response time and excessive load on third-party systems, which reduces the display efficiency of network pages and service response quality.
By downloading and storing the page data of the network page, and determining the data cache time according to the first page level of the page data, the effective time period of the page data is configured. During the valid time period, the page data is directly extracted from the local cache area to display the network page, reducing the number of interactions with third-party systems.
It reduces the load on third-party systems, improves service response quality, reduces response time, and improves display efficiency.
Smart Images

Figure CN111475752B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet technologies, and in particular, relates to a method and device for displaying a network page. Background Art
[0002] With the continuous development of Internet technologies, more and more services can be implemented online, thus greatly improving the service response efficiency and convenience. For example, hospital registration services or bank self-service, etc., can be reserved through online ticket-taking, without the need to obtain tickets on-site, reducing the difficulty of ticket-taking for users. The above-mentioned online reservation service obtains the current ticket source information from the background system and outputs the corresponding network page, and users can make reservation services according to the displayed network page.
[0003] In the existing network page display technology, when receiving a user's selection instruction, it will obtain the remaining number of tickets for all selectable items at the current moment from a third-party system through the hit hot response method. However, users often only focus on the ticket source situation of one or several objects, so a large amount of ticket source information will be wasted. Moreover, when there are many selected objects and the user selects back and forth on multiple interfaces, the user terminal needs to communicate with the third-party system frequently and obtain the latest remaining number of tickets, thus increasing the response time. Especially when multiple users simultaneously initiate display operations to the third-party system, it will cause the third-party system to be overloaded, resulting in abnormal situations such as system crashes, further prolonging the response time, reducing the display efficiency of the network page, and then reducing the service response quality. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method and device for displaying a network page to solve the problem that the existing network page display technology obtains the page data of the network page from a third-party system through the hit hot response method, increasing the response time, causing the third-party system to be overloaded, reducing the display efficiency of the network page, and then reducing the service response quality.
[0005] The first aspect of the embodiments of the present invention provides a method for displaying a network page, including:
[0006] Downloading and storing the page data of the network page, and identifying the first page level of the network page;
[0007] Based on the first page level, determining the data caching duration associated with the page data;
[0008] Configuring the valid time period of the page data according to the data caching duration and the download time of the page data;
[0009] If a jump instruction for the network page is received, determine whether the current time is within the valid time period;
[0010] If the current time is within the valid time period, display the network page through the page data stored locally.
[0011] A second aspect of the embodiments of the present invention provides a display device for a network page, including:
[0012] A page data download unit, configured to download and store the page data of the network page, and identify the first page level of the network page;
[0013] A data cache duration identification unit, configured to determine the data cache duration associated with the page data based on the first page level;
[0014] A valid time period configuration unit, configured to configure the valid time period of the page data according to the data cache duration and the download time of the page data;
[0015] A jump instruction trigger unit, configured to, if a jump instruction for the network page is received, determine whether the current time is within the valid time period;
[0016] A network page display unit, configured to, if the current time is within the valid time period, display the network page through the page data stored locally.
[0017] A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the first aspect are implemented.
[0018] A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the first aspect are implemented.
[0019] Implementing a display method and device for a network page provided by the embodiments of the present invention has the following beneficial effects:
[0020] In the embodiments of the present invention, page data corresponding to a web page is downloaded from a third-party system, stored in a cache area, the data cache duration corresponding to the page data is determined according to the first page level of the web page, and the valid time period of the page data is configured according to the download time and the data cache duration. Within the valid time period, if an adjustment instruction for the web page is received, the page data can be directly extracted from the cache area, so as to display the web page corresponding to the page data. Compared with the existing display technology of web pages, in the embodiments of the present invention, the display device does not establish a hot response with the third-party system, but stores the page data in the cache area, and within the preset valid time period, the web page is displayed through the page data. Since the data cache duration is associated with the page level of the web page, it is possible to ensure the validity of the page data in the web page, for example, the validity of ticket source data, while reducing the number of interactions between the display device and the third-party system, thereby reducing the load on the third-party system, improving the stability of the third-party system, and then improving the service response quality. On the other hand, since the page data can be directly extracted from the local cache area within the valid time period, the response duration is reduced and the display efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0022] Figure 1 It is a flowchart of the implementation of a method for displaying a web page provided by the first embodiment of the present invention;
[0023] Figure 2 It is a specific implementation flowchart of a method for displaying a web page provided by the second embodiment of the present invention;
[0024] Figure 3 It is a specific implementation flowchart of step S101 of a method for displaying a web page provided by the third embodiment of the present invention;
[0025] Figure 4 It is a specific implementation flowchart of step S303 of a method for displaying a web page provided by the fourth embodiment of the present invention;
[0026] Figure 5 It is a specific implementation flowchart of step S105 of a method for displaying a web page provided by the fifth embodiment of the present invention;
[0027] Figure 6It is a specific implementation flowchart of a method for displaying a web page provided in the sixth embodiment of the present invention;
[0028] Figure 7 It is a specific implementation flowchart of a method for displaying a web page provided in the seventh embodiment of the present invention;
[0029] Figure 8 It is a structural block diagram of a device for displaying a web page provided in an embodiment of the present invention;
[0030] Figure 9 It is a schematic diagram of a terminal device provided in another embodiment of the present invention. Detailed implementation manners
[0031] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0032] In the embodiments of the present invention, the execution subject of the process is a terminal device. The terminal device includes, but is not limited to, devices such as servers, computers, smart phones, and tablet computers that can execute the task of displaying web pages.
[0033] The implementation flowchart of the method for displaying a web page provided in the first embodiment of the present invention is shown and described in detail as follows: Figure 1
[0034] In S101, the page data of the web page is downloaded and stored, and the first page level of the web page is identified.
[0035] In this embodiment, the terminal device can download page data from the server corresponding to the web page and store the page data in the cache area. The terminal device can configure a corresponding storage area for the web page in the cache area according to the page identifier of the web page, establish an association relationship between the page identifier and the storage area, and generate a page data addressing table. When the terminal device needs to construct a certain web page, it can determine the storage address corresponding to the page data according to the page identifier of the web page through the page data addressing table, and extract the associated page data.
[0036] In this embodiment, the terminal device can determine the first page level of the web page according to the page identifier of the web page. The page level specifically refers to the shortest number of jumps required to jump to the web page. If a certain web page is the home page, then the web page is at the highest level, that is, the first level; if there is no jump connection in a certain web page, then the web page is at the lowest level, and if the web page at the lowest level requires 6 click operations, then the first page level of the web page is the 7th level. Since when making a reservation service, when the number of target objects is large, a single page cannot accommodate all the UI controls of the target objects, the target objects can be classified at multiple levels according to the object attributes of the target objects. For example, in the scenario of making a reservation for hospital services, the target object is the doctor to be reserved. In this case, the doctors can be classified at the first level according to the departments to which the doctors belong, and then the doctors can be classified at the second level according to the professional titles of the doctors. Finally, according to the preset time division rules, the final reservation time is determined.
[0037] Exemplarily, if a user needs to make an appointment with Dr. Chen in the ENT department at 10:00 am, the first-level web page can display all departments and mark the current number of available appointments for each department. The user clicks the button corresponding to "ENT department" on the first-level web page of all departments, and the terminal device can jump to the second department classification page, that is, the second-level web page. This second department classification page includes "Ear department", "Nose department", and "Throat department", and marks the current number of available appointments for the above three departments. On the second-level web page, the user clicks the control corresponding to the "Nose department", and the terminal device will jump to the page showing all doctors in the "Nose department" and mark the current number of appointments for each doctor. At this time, the user can click the control corresponding to "Dr. Chen" on the third-level web page. At this time, the terminal device will jump to the fourth-level page showing the appointment time and mark the number of available appointments corresponding to each appointment time. The user can select the time period of "10:00 - 10:30" to complete the appointment operation. Thus, it can be seen that the web page showing all departments is the first-level web page, that is, the highest-level web page; and the web page showing each available appointment time is the lowest-level web page. Among them, the page data specifically includes the object identifier of the candidate object included in the web page and the associated data. The associated data can be the number of available appointments, the number of already-appointed people, and the total number of appointments, etc.
[0038] In this embodiment, the trigger time for the terminal device to download and store the page data of the web page can specifically be when the user first accesses the web page. In this case, when the user initiates a web page jump instruction, the terminal device will detect whether the network identifier corresponding to the web page exists in the accessed list. If so, it indicates that the web page is not accessed for the first time, and the operation jumps to S104; otherwise, it is identified as the first access, and the operation of S101 is executed.
[0039] Optionally, in this embodiment, after receiving the domain name input by the user, the terminal device will identify all the web pages under the domain name and download the page data of all the web pages under the domain name. That is, the trigger condition for page data download is receiving the jump domain name input by the user. Preferably, when the user inputs another domain name, the page data in the current cache area is cleared to reserve the storage area to download the page data of all the web pages associated with the other domain name. Since the user inputs another domain name, it is necessary to jump to another completely unrelated web page. For example, it is necessary to jump from the page of making an appointment for seeing a doctor to the page of making an appointment for banking services. At this time, the page data in the cache area can be cleared.
[0040] In S102, based on the first page level, determine the data cache duration associated with the page data.
[0041] In this embodiment, after determining the first page of the network page, the terminal device can query the corresponding relationship table between the data cache time and the page level to determine the data cache time associated with the downloaded page data. Specifically, if the page level is higher, the corresponding data cache time is longer; conversely, if the page level is lower, the corresponding data cache time is shorter. When the page level corresponding to the network page is higher, the number of lower-linked network pages is more. When obtaining the page data of the network page of the high page level, it is necessary to count the page data of each lower-linked network page before the page data of the high-level network page can be obtained, that is, the update time required for the update of the high-level page data is longer; correspondingly, the lower the page level of the network page, the shorter the time required to obtain the page data. In order to further reduce the amount of interactive data between the terminal device and the third-party system, different data cache time lengths are configured for different network levels, so that the data cache time length of the page data of the high-level network page can be proportional to the time required for its data update.
[0042] Optionally, in this embodiment, the terminal device can identify the number of optional objects contained in the network page, and calculate the data cache duration of the page data based on the number of optional objects. The more optional objects there are, the longer the corresponding data cache duration; conversely, the smaller the number of optional objects, the shorter the corresponding data cache duration. Among them, the first page level can determine the weight value of the number of optional objects. For example, if the page weight value is a, and the number of optional objects is m, then the data cache duration is a*m.
[0043] In S103, a valid time period of the page data is configured according to the data cache time length and the download time of the page data.
[0044] In this embodiment, after determining the data cache duration, the terminal device can configure the effective time period of the page data in the cache area, specifically by adding the cache duration to the download time of the page data to obtain the effective time period. For example, if the download time of the page data is 10:00 and the data cache duration is 5 minutes, the effective time period of the page data is 10:00-10:05.
[0045] It should be noted that the length of the data cache duration is related to the first page level of the network page, and the effective time period is calculated based on the two parameters of the data cache duration and the download time. That is, for the same network page, the corresponding effective time period will change according to the different download times, while the data cache duration corresponding to the network page is related to the page level of the network page and will not change with the different download times.
[0046] Optionally, in this embodiment, the terminal device may add the valid time period of each network page in the network page addressing table. If it is detected that the valid time period of any network page has expired, the page data of the network page is re-downloaded from the server of the third-party system.
[0047] In S104, if a jump instruction for the network page is received, it is determined whether the current time is within the valid time period.
[0048] In this embodiment, the user can send a jump instruction for the network page to the terminal device by means of a click operation or inputting a domain name. After receiving the jump instruction for the network page, the terminal device will detect whether the page data of the network page is included in the cache area. If it is included, the operation of S104 is executed; otherwise, if the page data of the network page is not included in the cache area, it means that the terminal device accesses the network page for the first time. At this time, the operation of S101 is executed.
[0049] In this embodiment, if it is detected that the page data of the network page is stored in the cache area, it can be determined whether the current time is within the valid time period of the page data of the network page. If so, the operation of S105 is executed; otherwise, if the current time is not within the valid time period of the page data, the operation of S101 can be returned and executed.
[0050] It should be noted that the re-download operation of the page data of the network page can be triggered by the user, that is, when the user accesses the network page again, the terminal device will detect the validity of the page data, and when it is detected that the page data has expired, the page data is re-downloaded; and when the user does not access the network page, the validity of the page data will not be detected. Of course, the terminal device can also actively detect the validity of the page data, that is, the terminal device can configure corresponding timers for each page data according to the data cache duration of each page data. If it is detected that the count value of the timer reaches the data cache duration, the page data of the network page is automatically downloaded from the server.
[0051] In S105, if the current time is within the valid time period, the network page is displayed by the locally stored page data.
[0052] In this embodiment, when the terminal device detects that the current time is within the valid time period of the page data, it can directly extract the page data of the network page stored in S101 from the local cache area and generate a network page based on the page data. If the user accesses the network page multiple times in a short period, for example, during the reservation process, if a certain target object cannot be reserved, the user will return to the previous level and select another target object, and so on. Therefore, if the page data is obtained from the cache area within the valid time period, the number of times of downloading page data from the server can be reduced, and the display efficiency of the network page can be improved, enhancing the user experience.
[0053] As can be seen from the above, a method for displaying a network page provided by an embodiment of the present invention downloads page data corresponding to the network page from a third-party system, stores the page data in a cache area, determines the data cache duration corresponding to the page data according to the first page level of the network page, configures the valid time period of the page data according to the download time and the data cache duration, and within the valid time period, if an adjustment instruction for the network page is received, the page data can be directly extracted from the cache area, thereby displaying the network page corresponding to the page data. Compared with the existing network page display technology, the display device in the embodiment of the present invention does not establish a hot response with the third-party system, but stores the page data in the cache area and displays the network page through the page data within a preset valid time period. Since the data cache duration is associated with the page level of the network page, the validity of the page data in the network page can be ensured, for example, the validity of ticket source data, while reducing the number of interactions between the display device and the third-party system, thereby reducing the load on the third-party system, improving the stability of the third-party system, and then improving the service response quality. On the other hand, since the page data can be directly extracted from the local cache area within the valid time period, the response duration is reduced and the display efficiency is improved.
[0054] Figure 2 The specific implementation flowchart of a method for displaying a network page provided by the second embodiment of the present invention is shown. Refer to Figure 2 , relative to Figure 1 In the method for displaying a network page provided by this embodiment, after the step of "if the current time is within the valid time period, the network page is displayed through the page data stored locally", the method further includes: S201 - S202, which are specifically described as follows:
[0055] Further, after the step of "if the current time is within the valid time period, the network page is displayed through the page data stored locally", the method further includes:
[0056] In S201, if it is detected that the current moment is outside the effective time period during the display of the network page, the page data is updated.
[0057] In this embodiment, in addition to detecting the validity of page data when receiving a jump instruction for a network page, the terminal device also detects the validity of the page data being displayed during the display of the network page. If the terminal device detects that any display moment during the display process is outside the effective time period of the page data, that is, the display moment exceeds the effective time period, it means that the current page data has expired and the page data of the network page needs to be downloaded again from the server, and the network page is updated according to the downloaded page data.
[0058] Preferably, in this embodiment, the terminal device can detect the updated content between the previously obtained page data and the page data obtained by this update, and based on the display position of the updated content on the network page, adjust the elements corresponding to the display position, that is, perform incremental update on the network page. During the process of refreshing the network page, local update can be achieved, thereby reducing the content to be updated. From the perspective of the user watching, it is not easy to notice the update operation, reducing the impact on the user.
[0059] In S202, the effective time period is adjusted according to the update time of the updated page data and the data caching duration.
[0060] In this embodiment, after the terminal device updates the page data, in addition to adjusting the currently displayed network page, it also needs to reset the effective time period, that is, recalculate the effective time period according to the update time of the page data and the data caching duration identified in S102.
[0061] In the embodiment of the present invention, during the process of displaying a network page, it is detected whether the display moment is within the effective time period, and when the page data fails, the page data is updated and the effective time period is adjusted, so as to ensure the validity of the page data on the basis of reducing the number of interactions with the server.
[0062] Figure 3 Shows a specific implementation flowchart of a method S101 for displaying a network page provided in the third embodiment of the present invention. Refer to Figure 3 , relative to Figure 1 The embodiment described above, a method for displaying a network page provided in this embodiment is based on downloading and storing the page data of the network page, and identifying the first page level of the network page, including: S301 - S303, which are specifically described in detail as follows:
[0063] Further, the method based on downloading and storing the page data of the network page, and identifying the first page level of the network page, further includes:
[0064] In S301, identify the associated pages of the network page; the associated pages include the upstream page and the downstream page of the network page.
[0065] In this embodiment, the terminal device can automatically identify the page levels of the network page and pre-configure the data cache duration corresponding to each page level. In S102, the data cache duration corresponding to the current first page level can be directly queried.
[0066] In this embodiment, the terminal device can determine the associated pages of the network page. Among them, the associated pages include the pages accessed during the process of jumping from the main page to the network page, that is, the above-mentioned upstream page, and the pages accessed during the process of jumping from the network page to the bottommost page, that is, the above-mentioned downstream page. Optionally, the terminal device can resolve the domain name of the network page to determine the main domain name and sub-domain names, and determine the number of upstream pages of the network page according to the number of sub-domain names.
[0067] Optionally, the terminal device can divide the path of the candidate objects of the bottommost network page into multiple different levels according to the object attributes of the candidate objects, and configure different object groups for each level. That is, according to all candidate objects and the object groups obtained based on the divided levels, construct a tree diagram corresponding to the network page. The main page associated with the network page is the root node of the tree diagram. The root node has multiple child nodes below, that is, the network page of the upper level is the parent node of the network page of the lower level, and the network page of the lower level is the child node of the network page of the upper level. Thus, the user can determine its associated upstream page and downstream page according to the tree diagram and the position of the network page.
[0068] In S302, determine the first page level of the network page according to the number of upstream pages of the upstream page and the number of downstream pages of the downstream page.
[0069] In this embodiment, after the terminal device identifies the associated pages of the network page, it can count the number of upstream pages of the upstream page and the number of downstream pages of the downstream page, construct the jump path of the network page, and identify the number of jumps required for the network page in the jump path, and identify the number of jumps as the page level where the network page is located, that is, the above-mentioned first page level.
[0070] In S303, identify the number of page objects included in each of the downstream pages, and calculate the data cache duration corresponding to the network page according to all the numbers of objects.
[0071] In this embodiment, after the terminal device identifies the page level of the network page, it can configure the corresponding data cache duration for the first page level. Since the data cache duration is related to the time required to obtain page data, and when outputting the page data of the current level, it is necessary to count the page data of each lower-link page of the lower-link level, therefore, the terminal device will identify the number of page objects contained in each lower-link page associated with the network page. If the number of objects is larger, the associated data cache duration is longer, so that the data cache duration can match the acquisition time of the page data.
[0072] In the embodiment of the present invention, by determining the associated pages of the network page, determining the first page level and the data cache duration, the data cache duration is automatically adjusted without manual configuration by the user, thereby improving the automation of the display operation.
[0073] Figure 4 FIG. 4 shows a specific implementation flow chart of a method S303 for displaying a web page provided by the fourth embodiment of the present invention. Figure 4 , relative to Figure 3 In the embodiment, a method S303 for displaying a web page provided in the embodiment includes: S3031 to S3033, which are described in detail as follows:
[0074] Further, the identifying the number of page objects contained in each of the downstream pages, and calculating the data cache duration corresponding to the network page according to all the number of objects, includes:
[0075] In S3031, a reference weight of the downstream page is determined according to the second page level corresponding to the downstream page.
[0076] In this embodiment, network pages at different page levels have corresponding basic weight values. Therefore, when calculating the data cache duration of the network page, it is necessary to determine the reference weights corresponding to all page objects in the downstream page according to the second page level corresponding to each downstream page. The terminal device can be configured with a corresponding relationship table between page levels and reference weights, and the reference weights associated with each downstream page can be determined by querying the corresponding relationship table.
[0077] In S3032, the object type of the page object in the downstream page is identified, and the object weight of the page object is determined.
[0078] In this embodiment, similarly, different types of page objects may have different time lengths required to obtain page data. To further improve the accuracy of data cache time length, the terminal device may identify the page objects contained in the downstream page and the object type of each page object, and configure the object weight associated with the page object according to the object type of the page object. The object type includes character type, image type, and video type.
[0079] In S3033, the reference weight, the object weight and the number of objects are introduced into a cache duration conversion function to calculate the data cache duration corresponding to the web page; the cache duration conversion function is specifically:
[0080]
[0081] Wherein, BufferTime is the data buffering duration; n is the number of downstream links; Standard i is the benchmark weight of the ith downstream page; ij is the object weight of the jth page object in the i-th downstream page; m i is the number of objects in the i-th downstream page.
[0082] In this embodiment, after obtaining the benchmark weights corresponding to each downstream page and the object weights of each page object in the page, the terminal device can import all weight values and the number of page objects into the cache duration conversion function to calculate the data cache duration of the network page.
[0083] In the embodiment of the present invention, by counting the number of page objects contained in each downstream page and configuring the associated weight value, the data cache duration is automatically calculated, thereby improving the accuracy of the data cache duration.
[0084] Figure 5 FIG. 5 shows a specific implementation flow chart of a method S105 for displaying a web page provided by the fifth embodiment of the present invention. Figure 5 , relative to Figures 1-4 In any of the above embodiments, a method S105 for displaying a web page provided in this embodiment includes: S1051 to S1052, which are described in detail as follows:
[0085] Furthermore, if the current time is within the valid time period, displaying the network page using the locally stored page data includes:
[0086] In S1051, if the first page level of the web page is the lowest page level, a hot connection is established with the server of the web page.
[0087] In this embodiment, for higher-level network pages, since the duration of obtaining page data is relatively long and they are not the ultimate target objects selected by the user. For example, when performing hospital reservation services, the ultimate target object selected by the user is the number of available tickets for a certain period of a certain doctor, while the department where the target doctor is located is not the ultimate target object. Therefore, the real-time requirement for page data in higher-level network pages is relatively low, and there is no need to update the page data in higher-level pages in real time. The data cache duration can be configured, and the update operation can be executed when the page data becomes invalid. For the lowest-level network pages, the real-time requirement is relatively high. For example, when the tickets are in short supply, that is, the number of reservation requests is greater than the number of available reservations, the user needs to determine the value of the page data in real time. To meet the above requirements, if the terminal device detects that the first page level of the currently displayed network page is the lowest page level, it establishes a hot connection with the server corresponding to the network page. This hot connection supports hit hot response, and when the page data of the network page changes, the currently displayed page will be updated.
[0088] In S1052, the page data is updated through the hot connection; the hot connection is used to, if the server detects a change in the page data, feedback the changed page data through the hot connection.
[0089] In this embodiment, after establishing a hot connection between the terminal device and the server, update data about the network page sent from the server can be received through the hot connection. When the server detects a data change in the page data of the network page, it will send the updated page data to the terminal device through the hot connection, and then the terminal device can adjust the display content of the network page according to the received update data.
[0090] In the embodiment of the present invention, by identifying the first page level of the currently displayed page and establishing a hot connection with the server when detecting that the first page level is the lowest level, network pages with relatively low real-time requirements are displayed through caching, while for network pages with relatively high real-time requirements, the network pages are updated in real time, ensuring the accuracy of the display content.
[0091] Figure 6 Shows the specific implementation flowchart of a method S104 for displaying a network page provided in the sixth embodiment of the present invention. Refer to Figure 6 , relative to Figures 1 to 4 Any of the above embodiments, the method S104 for displaying a network page provided in this embodiment includes: S1041 to S1042, which are specifically described in detail as follows:
[0092] Further, the step of, if a jump instruction for the network page is received, determining whether the current time is within the valid time period includes:
[0093] In S1041, according to the touch position of the user, identify the page control corresponding to the touch position.
[0094] In this embodiment, the user can click on the position where the object to be selected is located on the touch module of the terminal device to generate a touch instruction. The terminal device parses the touch instruction to obtain the touch position of the user's current operation, which is identified by coordinates for example, and determines the page control corresponding to the touch position according to the touch position and the page layout diagram corresponding to the web page.
[0095] In S1042, through the corresponding relationship between the page control and the web page, identify the web page associated with the touch position and generate the jump instruction for the web page.
[0096] In this embodiment, the terminal device can query the corresponding relationship between the page space and the web page, determine the jump link associated with the page control, and determine the associated web page based on the jump link, so as to generate a jump instruction for the web page to implement the access operation of the web page.
[0097] In the embodiment of the present invention, by identifying the touch position of the user and generating a jump instruction corresponding to the touch position, the access to the web page is realized, and the accuracy of the web page access is improved.
[0098] Figure 7 Shows the specific implementation flowchart of a method for displaying a web page provided in the seventh embodiment of the present invention. Refer to Figure 7 , relative to Figures 1 to 4 Any of the above embodiments, after the step of if a jump instruction for the web page is received, then determining whether the current time is within the valid time period in the method for displaying a web page provided in this embodiment, further includes: S701 - S702, which are specifically described as follows:
[0099] In S701, if the current time is outside the valid time period, re - download the page data of the web page.
[0100] In this embodiment, when the terminal device receives a jump instruction for the web page and identifies that the current time is outside the valid time period of the downloaded page data, it means that the page data has expired and needs to be updated. In this case, the terminal device will establish a communication connection with the server of the web page, re - download the current page data of the web page from the server, and update the page data in the cache area according to the downloaded page data, and generate a web page through the updated page data.
[0101] In S702, the network page is displayed through the re-downloaded page data, and the valid time period of the network page is updated.
[0102] In this embodiment, the terminal device can generate a network page according to the re-downloaded page data, and adjust the valid time period based on the download time of the re-downloaded page data and the data caching duration.
[0103] In the embodiment of the present invention, when it is detected that the page data of the network page fails, the page data is re-downloaded and the valid time period is adjusted, which can determine the accuracy of the page data while reducing the interaction with the server.
[0104] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0105] Figure 8 The block diagram of a display device for a network page provided by an embodiment of the present invention is shown. Each unit included in the display device for the network page is used to execute Figure 1 the steps in the corresponding embodiment. For details, please refer to Figure 1 and Figure 1 the relevant descriptions in the corresponding embodiment. For the sake of convenience of description, only the parts related to this embodiment are shown.
[0106] See Figure 8 , the display device for the network page includes:
[0107] A page data download unit 81, configured to download and store the page data of the network page, and identify the first page level of the network page;
[0108] A data caching duration identification unit 82, configured to determine the data caching duration associated with the page data based on the first page level;
[0109] A valid time period configuration unit 83, configured to configure the valid time period of the page data according to the data caching duration and the download time of the page data;
[0110] A jump instruction trigger unit 84, configured to, if a jump instruction about the network page is received, determine whether the current time is within the valid time period;
[0111] A network page display unit 85, configured to, if the current time is within the valid time period, display the network page through the locally stored page data.
[0112] Optionally, the display device for the network page further includes:
[0113] A page data update unit, configured to update the page data if it is detected that the current moment is outside the valid time period during the display of the network page;
[0114] A valid time period adjustment unit, configured to adjust the valid time period according to the update time for updating the page data and the data cache duration.
[0115] Optionally, the display device of the network page further includes:
[0116] An associated page recognition unit, configured to recognize the associated page of the network page; the associated page includes the upstream page and the downstream page of the network page;
[0117] A first page level determination unit, configured to determine the first page level of the network page according to the number of upstream pages of the upstream page and the number of downstream pages of the downstream page;
[0118] A data cache duration calculation unit, configured to recognize the number of object of the page objects included in each downstream page, and calculate the data cache duration corresponding to the network page according to all the object numbers.
[0119] Optionally, the data cache duration calculation unit includes:
[0120] A reference weight determination unit, configured to determine the reference weight of the downstream page according to the second page level corresponding to the downstream page;
[0121] An object weight determination unit, configured to recognize the object type of the page object in the downstream page, and determine the object weight of the page object;
[0122] A data cache duration conversion unit, configured to import the reference weight, the object weight, and the object number into a cache duration conversion function, and calculate the data cache duration corresponding to the network page; the cache duration conversion function is specifically:
[0123]
[0124] Wherein, BufferTime is the data cache duration; n is the number of downstream pages; Standard i is the reference weight of the i-th downstream page; Target ij is the object weight of the j-th page object in the i-th downstream page; m i is the number of objects of the i-th downstream page.
[0125] Optionally, the network page display unit 85 includes:
[0126] A hot connection establishment unit, configured to establish a hot connection with the server of the network page if the first page level of the network page is the lowest page level;
[0127] An updated data feedback unit, configured to update the page data through the hot connection; the hot connection is used to feedback the changed page data through the hot connection if the server detects a change in the page data.
[0128] Optionally, the jump instruction trigger unit 84 includes:
[0129] A page control recognition unit, configured to recognize the page control corresponding to the touch position according to the user's touch position;
[0130] A jump instruction generation unit, configured to recognize the network page associated with the touch position through the correspondence between the page control and the network page, and generate the jump instruction of the network page.
[0131] Optionally, the display device of the network page further includes:
[0132] A page data re-download unit, configured to re-download the page data of the network page if the current time is outside the valid time period;
[0133] A valid time period reconfiguration unit, configured to display the network page through the re-downloaded page data, and update the valid time period of the network page.
[0134] Therefore, the display device of the network page provided by the embodiment of the present invention can also display the network page through page data without storing the page data in the cache area within a preset valid time period. Since the data cache duration is associated with the page level of the network page, it is possible to ensure the validity of the page data in the network page, such as the validity of ticket source data, while reducing the number of interactions between the display device and the third-party system, thereby reducing the load on the third-party system, improving the stability of the third-party system, and then improving the service response quality. On the other hand, since the page data can be directly extracted from the local cache area within the valid time period, the response duration is reduced and the display efficiency is improved.
[0135] Figure 9 It is a schematic diagram of a terminal device provided by another embodiment of the present invention. As Figure 9As shown, the terminal device 9 of this embodiment includes: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90, such as a display program for a web page. When the processor 90 executes the computer program 92, it implements the steps in the above-described embodiments of the display method for each web page, such as Figure 1 S101 to S105 shown. Alternatively, when the processor 90 executes the computer program 92, it implements the functions of each unit in the above-described device embodiments, such as Figure 8 the functions of the modules 81 to 85 shown.
[0136] Exemplarily, the computer program 92 can be divided into one or more units. The one or more units are stored in the memory 91 and executed by the processor 90 to complete the present invention. The one or more units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 92 in the terminal device 9. For example, the computer program 92 can be divided into a page data download unit, a data cache duration identification unit, a valid time period configuration unit, a jump instruction trigger unit, and a web page display unit, and the specific functions of each unit are as described above.
[0137] The terminal device 9 can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art can understand that Figure 9 this is only an example of the terminal device 9 and does not constitute a limitation on the terminal device 9. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the terminal device may further include input / output devices, network access devices, a bus, etc.
[0138] The so-called processor 90 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0139] The memory 91 may be an internal storage unit of the terminal device 9, such as the hard disk or memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the terminal device 9. Further, the memory 91 may also include both the internal storage unit and the external storage device of the terminal device 9. The memory 91 is used to store the computer program and other programs and data required by the terminal device. The memory 91 may also be used to temporarily store the data that has been output or is to be output.
[0140] In addition, in each embodiment of the present invention, the functional units may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0141] The above-described embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for displaying a web page, characterized in that, it includes: Download and store the page data of the web page, and identify the first page level of the web page; Based on the first page level, determine the data cache duration associated with the page data; According to the data cache duration and the download time of downloading the page data, configure the valid time period of the page data; If a jump instruction for the web page is received, determine whether the current time is within the valid time period; If the current time is within the valid time period, display the web page through the page data stored locally.
2. The display method according to claim 1, characterized in that, after the step of if the current time is within the valid time period, display the web page through the page data stored locally, it further includes: If it is detected that the current moment is outside the valid time period during the display of the web page, update the page data; According to the update moment of updating the page data and the data cache duration, adjust the valid time period.
3. The display method according to claim 1, characterized in that, the step of based on downloading and storing the page data of the web page, and identifying the first page level of the web page, further includes: Identify the associated pages of the web page; the associated pages include the upstream page and the downstream page of the web page; According to the number of upstream pages of the upstream page and the number of downstream pages of the downstream page, determine the first page level of the web page; Identify the number of page objects included in each downstream page, and calculate the data cache duration corresponding to the web page according to all the object numbers.
4. The display method according to claim 3, characterized in that, the step of identifying the number of page objects included in each downstream page, and calculating the data cache duration corresponding to the web page according to all the object numbers, includes: According to the second page level corresponding to the downstream page, determine the reference weight of the downstream page; Identify the object type of the page object in the downstream page, and determine the object weight of the page object; Import the reference weight, the object weight and the object number into a cache duration conversion function, and calculate the data cache duration corresponding to the web page; the cache duration conversion function is specifically: Among them, BufferTime is the data caching duration; n is the number of the downstream connections; Standard i is the reference weight of the i-th downstream page; Target ij is the object weight of the j-th page object in the i-th downstream page; m i is the number of the objects in the i-th downstream page.
5. The display method according to any one of claims 1-4, characterized in that, the step of if the current time is within the valid time period, display the web page through the page data stored locally, includes: If the first page level of the web page is the lowest page level, establish a hot connection with the server of the web page; Update the page data through the hot connection; the hot connection is used for the server to feedback the changed page data through the hot connection when it detects that the page data has changed.
6. The display method according to any one of claims 1-4, characterized in that, If a jump instruction for the network page is received, determining whether the current time is within the valid time period includes: Identifying the page control corresponding to the touch position according to the user's touch position; Identifying the network page associated with the touch position through the correspondence between the page control and the network page, and generating the jump instruction for the network page.
7. The display method according to any one of claims 1-4, characterized in that, after the step of if a jump instruction for the network page is received, determining whether the current time is within the valid time period, further includes: If the current time is outside the valid time period, re-downloading the page data of the network page; Displaying the network page through the re-downloaded page data, and updating the valid time period of the network page.
8. A display system for a network page, characterized in that, comprising: A page data download unit, configured to download and store the page data of the network page, and identify the first page level of the network page; A data cache duration identification unit, configured to determine the data cache duration associated with the page data based on the first page level; A valid time period configuration unit, configured to configure the valid time period of the page data according to the data cache duration and the download time of the page data; A jump instruction trigger unit, configured to determine whether the current time is within the valid time period if a jump instruction for the network page is received; A network page display unit, configured to display the network page through the locally stored page data if the current time is within the valid time period.
9. A terminal device, characterized in that, the terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it performs the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Android equipment webpage data processing system and data processing method of system
CN108062371A
Advertisement display method based on electronic book and electronic equipment
CN109858962A