WO2020024397A1 - 页面访问处理方法、装置、计算机设备及存储介质 - Google Patents

页面访问处理方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020024397A1
WO2020024397A1 PCT/CN2018/106425 CN2018106425W WO2020024397A1 WO 2020024397 A1 WO2020024397 A1 WO 2020024397A1 CN 2018106425 W CN2018106425 W CN 2018106425W WO 2020024397 A1 WO2020024397 A1 WO 2020024397A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
detail
text data
list
custom event
Prior art date
Application number
PCT/CN2018/106425
Other languages
English (en)
French (fr)
Inventor
徐唐生
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020024397A1 publication Critical patent/WO2020024397A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present application relates to the field of information processing, and in particular, to a method, a device, a computer device, and a storage medium for page access processing.
  • the hybrid H5 type APPs on the market mostly pass some simple primary key id values to new pages to implement page jumps, but when transmitting more content or notifying the new page to perform some method execution, it will cause most H5 types In the process of the APP jumping to a new page, the page is slow to jump because it needs to wait for data to be loaded, resulting in a long waiting time for the user and an unfriendly experience.
  • the embodiments of the present application provide a page access processing method, device, computer device, and storage medium that can quickly display the content of a jump page, so as to solve the problem that the current page jump is slow and the user waits longer.
  • a page access processing method includes:
  • the list page data includes a custom event of a detail page, pre-load text data corresponding to the detail page, and obtain pre-loaded text data corresponding to the detail page;
  • a page access processing device includes:
  • a list page display module configured to receive a page access request, obtain corresponding list page data according to the page access request, and display the list page data on the original page;
  • a preloading module configured to preload text data corresponding to the detail page if the list page data includes a custom event of a detail page, and obtain preloaded text data corresponding to the detail page;
  • a monitoring module configured to monitor a custom event of the detail page, and obtain a page jump request triggered based on the custom event of the detail page;
  • the detail page display module is configured to jump to a lower-level page corresponding to the original page based on the page jump request, and display pre-loaded text data corresponding to the detail page on the lower-level page.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor.
  • the processor executes the computer-readable instructions, the following steps are implemented:
  • the list page data includes a custom event of a detail page, pre-load text data corresponding to the detail page, and obtain pre-loaded text data corresponding to the detail page;
  • One or more non-volatile readable storage media storing computer readable instructions, where the computer readable storage medium stores computer readable instructions, and when the computer readable instructions are executed by one or more processors, The one or more processors are caused to perform the following steps, and when the computer-readable instructions are executed by the processors, the following steps are implemented:
  • the list page data includes a custom event of a detail page, pre-load text data corresponding to the detail page, and obtain pre-loaded text data corresponding to the detail page;
  • FIG. 1 is a schematic diagram of an application environment of a page access processing method according to an embodiment of the present application
  • FIG. 2 is a flowchart of a page access processing method according to an embodiment of the present application.
  • FIG. 3 is a flowchart of a page access processing method according to an embodiment of the present application.
  • FIG. 4 is a flowchart of a page access processing method according to an embodiment of the present application.
  • FIG. 5 is a flowchart of a page access processing method according to an embodiment of the present application.
  • FIG. 6 is a flowchart of a page access processing method according to an embodiment of the present application.
  • FIG. 7 is a flowchart of a page access processing method according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a page access processing device according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a computer device according to an embodiment of the present application.
  • the page access processing method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1, where a user terminal communicates with a server through a network.
  • the user terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented by an independent server or a server cluster composed of multiple servers.
  • a page access processing method is provided.
  • the method is applied to the server in FIG. 1 as an example, and includes the following steps:
  • S10 Receive a page access request, obtain corresponding list page data according to the page access request, and display the list page data on the original page.
  • the page access request refers to a request for a page sent by a client to a server.
  • List page data refers to the page data corresponding to the page to be accessed by this page access request.
  • the APP provides a visual page.
  • the client can send a page access request corresponding to a certain page to the server through the visual page, and the server obtains the page data of the page according to the page access request.
  • the page data of this page is called list page data.
  • the hybrid H5 type APP on the market introduces a front-end framework mui based on JS development as a development framework, encapsulates the front-end tools into a developed JavaScript method, and can call the native underlying interface for rendering through JavaScript.
  • the client communicates with the server through the network.
  • the client enters the H5 APP page
  • the client can log in based on the user account and password in advance, or the user account of the client is stored in the server and directly access the H5 APP page.
  • the client needs to enter a certain page of the H5 APP, it sends a page access request to the server.
  • the server obtains the list page data corresponding to the page access request according to the page access request, and displays the list page data on the original page.
  • JavaScript (referred to as JS) is a literal translation scripting language, which is a dynamically typed, weakly typed, and prototype-based language with built-in support types. Its interpreter is called a JavaScript engine. It is part of the browser and is widely used in user-side scripting languages. It was first used on HTML (an application under the standard universal markup language) web pages to add dynamic functions to HTML pages. .
  • the custom event refers to the fire event mechanism based on the mui framework, which can notify the new window to complete the event trigger in advance when a new window is opened.
  • Text data refers to the text field of the detail page.
  • the text field on the details page can be a fixed text field. For example, when jumping from a list page to a login page in an APP to log in a user, the user name and password are fixed.
  • the text field of the detail page may also be obtained according to the user's browsing operation, etc., and then set the text field of the detail page according to the text field of interest.
  • the content of the military news can be set in the details page, and the text field of military news that is interested in the user of the details page when obtaining the list page data Do a preload.
  • the server displays a page according to the list page data pair
  • the text data of the detail page can be passed to the mui.preload () method or the mui.init () method. Perform preloading to get preloaded text data for the detail page.
  • the custom event can only be used when the server receives a request for a page jump from the client. If a new detail page is created, the custom events that do not wait for the detail page to be triggered, that is, cannot be immediately triggered by webview.evalJS () or mui.fire (). If it is triggered, it may be invalid.
  • the custom event may be pre-configured in the list page data, and the custom event includes text data corresponding to each detail page.
  • the list page data includes the detail page that needs to be preloaded, you can pre-configure custom events in the list page data, so that after the original page displays the list page data, the detail page is customized by the custom event corresponding to the detail page.
  • the text data is preloaded.
  • S30 Listen for a custom event on the detail page, and obtain a page jump request triggered by the custom event on the detail page.
  • the page jump request refers to a request for jumping from an original page to a detail page (that is, a lower-level page).
  • the page jump request sent by the user can be triggered by touch, click, input, and swipe.
  • the lower-level page here refers to the page that jumps to the next page by touching, clicking, typing, and sliding the original page.
  • the list page data presets a monitoring function for monitoring a custom event.
  • the server listens to the custom event by executing the listen function, such as executing the on () method to listen to the custom event.
  • the listen function such as executing the on () method to listen to the custom event.
  • a custom event can be triggered by the mui.fire () method, so that the server can obtain a page jump request triggered by the custom event of the details page.
  • the server presets a jump method for jumping from the list page to the detail page. For example, if the jump method is a click jump, the user terminal can trigger a jump from the list page to the detail page according to the click operation.
  • Jump request that is, a page jump request that triggers a jump from the original page to a subordinate page.
  • the lower-level page refers to the entry from the original page to the detail page corresponding to the page jump request through the page jump request.
  • the original page A may jump to the detail page B and the detail page C, and enter the detail page B or the detail page C through a jump request.
  • the original page shows the list page data of list page A
  • the lower page shows the page data of detail page B or detail page C.
  • the server when it obtains a page jump request for jumping from the original page to the corresponding lower-level page, it obtains preloaded text data corresponding to the detail page, and preloads corresponding to the detail page on the lower-level page.
  • the pre-loaded text data is a text field of a detail page.
  • the pre-loaded text data includes an article, a sentence, or a sentence of the detail page.
  • the pre-loaded text data may be text data of all detail pages corresponding to the list page, and based on the jump request, the text data of the detail page corresponding to the jump request is displayed on the lower-level page.
  • the corresponding detail pages of the list page data are detail page 1, detail page 2, and detail page 3.
  • the text data of the detail page 1, detail page 2, and detail page 3 are all performed.
  • Preloading to get the corresponding preloaded text data when jumping from the original page to the corresponding subordinate page, it jumps from the list page to any of the detail page 1, detail page 2, or detail page 3 At this time, if you jump to the detail page 1, based on the page jump request, the preloaded text data of the detail page 1 is displayed on the lower page, and the page jump request is used to jump to the lower page corresponding to the original page.
  • the pre-loaded text data corresponding to the detail page is displayed on the page to quickly jump to the page that the user needs to enter, reducing user waiting time and improving user experience.
  • steps S10-S40 by receiving a page access request, obtaining corresponding list page data according to the page access request, and displaying the list page data on the original page, so as to display the list page data according to the page access request.
  • the list page data includes a custom event of the detail page
  • the text data corresponding to the detail page is preloaded, and the preloaded text data corresponding to the detail page is obtained in order to preload the text data of the detail page through the custom event.
  • To quickly display pre-loaded text data when you need to jump to the details page.
  • Preloaded text data corresponding to the details page to achieve jump to the details page quickly display the preloaded text data, reduce the time to jump to the details page to load the text data, and improve the user experience.
  • step S10 a page access request is received, and corresponding list page data is obtained according to the page access request, which specifically includes the following steps:
  • the page access request includes a url address and a list page id.
  • url is the abbreviation of (Uniform Resource Locator, Uniform Resource Locator), it is the WWW Uniform Resource Locator mark, which refers to the network address.
  • the list page id (identity) is the identification of the network address. In a JavaScript script, the list page id is operated as the unique identifier of the tag.
  • a url address and a list page id corresponding to the page in the page access request are obtained, where each page is pre-configured with a corresponding url address and list page id.
  • url is the HTML page address of the page.
  • the HTML address can support local addresses and network addresses.
  • Corresponding pages can be found through the url address and list page id. In order to maintain the uniqueness of the page ID, you should avoid using the same ID to create multiple pages.
  • the page execution script may be a JavaScript script.
  • the server needs to use JavaScript to edit the page execution script corresponding to each list page and detail page in advance, and configure the page execution script with a corresponding URL address and list page id. Specifically, a pre-configured corresponding JavaScript script can be obtained through the url address and the list page id.
  • the page execution script describes the page frame, page data source, and page rendering method of the page in advance. By executing the page execution script, you can obtain list page data related to the page.
  • a page access request is received, and the page access request includes a url address and a list page id to obtain a unique page execution script.
  • the list page data can be obtained and the list page data is displayed on the original page in order to display the page required for this page access request to be displayed on the user side The data.
  • the page access processing method before step S10 and before the step of receiving a page access request, the page access processing method further includes the following steps:
  • the event configuration request includes a list page id and a detail page id.
  • the client sends an event configuration request to the server, and the event configuration request includes a list page id and a detail page id.
  • the client configures a custom event in a JavaScript script in advance, and sends an event configuration request to the server.
  • the event configuration request describes the list page id and the detail page id to avoid the configuration of the wrong object, resulting in the inability to subsequently perform the details page based on the custom event Preloading.
  • the frame of the list page includes a display area that can jump to the details page and a display area that cannot jump to the details page.
  • Display area and detail page id associate the display area with the detail page id, and configure a custom event based on the detail page, so that when the list page data is displayed on the original page later, preloading can jump to the display of the detail page Text data for the detail page corresponding to the area.
  • a page jump request to jump to the detail page corresponding to the display area.
  • one of the display areas is a news title.
  • the news title is used to jump to the detail page corresponding to the title.
  • S102 Generate a custom event tag based on the list page id and the detail page id.
  • the custom event tag includes a custom event name corresponding to the detail page id, a value-passing target corresponding to the list page id, and a detail page id. Corresponding detail data.
  • the custom event label refers to a label for uniquely identifying the custom event, and the custom event can be found through the label.
  • the server determines the custom event name of the custom event by using the detail page id, and can also directly use the detail page id as the custom event name; the list page id determines the value-passing target of the event object, and the list page id can also correspond to the The page is used as a value-passing target.
  • the corresponding detailed data is obtained through the detailed page id, and the detailed data can be converted into json format data.
  • json Java, Object, Notation
  • json uses a language-independent text format. These features make json an ideal data exchange language.
  • the server converts the detailed data into json format data, so that when the text data corresponding to the detailed page is pre-loaded later, the speed is faster.
  • a custom event is configured to generate a custom event label.
  • the custom event name can be named by the detail page id or directly named.
  • the value-passing target is determined by the list page id, and the detail page id is associated with the detail data corresponding to the detail page id. All detailed data is converted into json format data as parameters for custom events.
  • the json format data includes text data and non-text data of all detail pages.
  • the custom event label By determining the custom event name, value-passing target, and details data in the custom event label, when the custom event label is triggered, the details page id is obtained, and the preload corresponding to the details page id is obtained according to the details page id text data.
  • the detailed data also includes non-text data, so that the target non-text data corresponding to the detailed page id is subsequently obtained according to the detailed page id.
  • an event configuration request is obtained.
  • the event configuration request includes a list page id and a detail page id.
  • a custom event tag is generated, and the custom event tag includes a name corresponding to the detail page id.
  • the detail data includes text data corresponding to the detail page, wherein the text data refers to a text field of the detail page.
  • step S20 that is, if the list page data includes a custom event of the detail page, the text data corresponding to the detail page is preloaded, and the preloaded text data corresponding to the detail page is obtained, which specifically includes The following steps:
  • S21 Determine whether the list page data corresponding to the list page id contains a custom event tag. If the list page data corresponding to the list page id contains a custom event tag, the list page data contains a custom event of the detail page.
  • the corresponding page execution script is obtained through the url address and the list page id, and the page execution script is a JavaScript script.
  • the server determines whether the list page data corresponding to the list page id contains a custom event tag, that is, determines whether the JavaScript script corresponding to the list page id contains a custom event tag.
  • the list is recognized Page data contains custom events for detail pages.
  • the server obtains the list page id, and determines whether the list page data corresponding to the list page id contains a custom event tag. If a custom event tag is included, the list page data contains a custom event to quickly determine the list page data. Include custom events.
  • the custom event name can be determined according to the detail page id; when the server determines that the list page data contains the custom event of the detail page, the server can obtain the custom event name through the custom event.
  • the custom event name corresponds to the details page id, so you can get the details page id.
  • the corresponding event data is determined according to the detail page id in the custom event tag, and the detail data includes text data and non-text data corresponding to the detail page.
  • the text data in the detail data can be converted into a pre-formatted json format in advance. Load text data.
  • json can convert a set of data represented in a JavaScript object into a string, and then you can easily pass this string between functions, or pass the string from a web user machine to a server-side program in an asynchronous application .
  • the json format text data corresponding to the detail page id is extracted from the custom event tag, and the text data is preloaded to obtain the preloaded text data in the json format.
  • the custom event tag can be detailed data in json format corresponding to all detail page ids, or detailed data in json format corresponding to a single detail page id, and each detailed data includes text data and non- Text data, which can be pre-loaded in JavaScript.
  • the text data corresponding to the detail page is text data in the detail data.
  • the json format text data corresponding to the detail page id is preloaded according to the detail page id.
  • the custom event tab you can set the json format detail data corresponding to all the detail page ids under the same list page, preload all the text data corresponding to the detail page id, or you can set it in the custom
  • the event tag is the detail data in json format corresponding to the single detail page id under the list page data, and the text data corresponding to the detail page id is preloaded.
  • steps S21-S23 if the list page data corresponding to the list page id contains a custom event tag, the list page data contains a custom event for the detail page, so as to determine whether the list page data contains a custom event through the list page id.
  • Event the implementation method is simple and fast.
  • the custom event based on the detail page, the detail page id in the custom event label is obtained, so that the pre-loaded text data of the detail page can be obtained later based on the detail page id.
  • the detail data further includes non-text data corresponding to the detail page.
  • the detailed data corresponding to the detail page id is configured in the custom event tag in advance, and the detailed data is divided into text data and non-text data.
  • the list page data is displayed on the original page, the data corresponding to the detail page id is displayed.
  • the text data in the corresponding detail data is preloaded.
  • the preloaded text data is directly displayed, and the non-data in the detail data corresponding to the id of the detail page is displayed. Text data is loaded.
  • the page access processing method further includes:
  • S301 Obtain the detail page id in the custom event label based on the custom event of the detail page.
  • the custom event tag carries a custom event name corresponding to the detail page id, that is, when the server obtains the custom event, the server can obtain the custom event name (ie, the detail page id) through the custom event.
  • S302 Obtain target non-text data corresponding to the detail page id based on the detail page id.
  • the target non-text data refers to data other than text data corresponding to the detail page, and may be some data data that consumes traffic.
  • Text data refers to the text field of the detail page. Specifically, when the list page data is displayed on the original page, the text data in the detail data corresponding to the detail page is preloaded. When a page jump request triggered by a custom event based on the detail page is received, it can be directly loaded. Display the pre-loaded text data and obtain the target non-text data corresponding to the detail page id based on the detail page id in the custom event.
  • the server when a page jump request is monitored, the server jumps from the original page to the lower page according to the page jump request, and displays preloaded text data and target non-text data corresponding to the detail page on the lower page.
  • the server can directly display the pre-loaded text data when displaying the lower-level page based on the page jump request, saving the loading time of the pre-loaded text data, improving the display efficiency of the text data, and then displaying the target non-text data To avoid long waiting times for users and improve user experience.
  • the detail page id in the custom event tag is obtained based on the custom event of the detail page, and the target non-text data corresponding to the detail page id is acquired based on the detail page id to obtain the detail page id.
  • the corresponding target non-text data Based on the page jump request, jump to the lower-level page corresponding to the original page, and display the pre-loaded text data and target non-text data corresponding to the detail page on the lower-level page to display the corresponding corresponding page of the detail page Preload text data and target non-text data to save display time of the detail page on this sub-page.
  • displaying the pre-loaded text data and the target non-text data corresponding to the detail page on the lower-level page includes:
  • the native low-level interface refers to invoking the low-level driver function by pre-loading text data and target non-text data to call related interfaces.
  • the server receives a page jump request sent by the client, the server jumps to a lower-level page corresponding to the original page according to the page jump request, and renders preloaded text data corresponding to the detail page through the native underlying interface.
  • the pre-loaded text data is displayed on the lower-level page, so that the text data can be quickly displayed on the lower-level page during the page jump, which solves the problem that the user waits too long; when the target non-text data is obtained, it is then passed through the native underlying interface.
  • Render the target non-text data and fill the target non-text data in the lower-level page.
  • you can display text data such as the text field of the detail page on the lower-level page, and then load the target non-text data.
  • the target non-text data is loaded, the target non-text data is filled in.
  • the page access processing method further includes generating a target listening function based on the custom event label.
  • the target listening function may be an on () method, which specifically includes methods such as on (event, selector, data, fn), where events: one or more Space-separated event types and optional namespaces.
  • selector a selector string used to filter the descendants of the selector element that triggers the event. If the selection is ⁇ null or omitted, the event is always triggered when it reaches the selected element.
  • data When an event is triggered, event.data is passed to the event handler.
  • the event handler is a function called in response to an event (that is, a function called in response to a page jump request).
  • event is the custom event name to be monitored, specifically the detail page id; the selector is used to filter out the selected detail page id; when data is the event trigger, the detailed data corresponding to the detail page id is given to the event Processing function; fn is an event processing function that needs to be executed when a custom event is triggered.
  • the server listens to custom events through the target listener function.
  • monitoring a custom event on the details page to obtain a page jump request triggered by the custom event on the details page includes:
  • S31 Use the function monitoring tool to execute the target monitoring function to monitor the custom event of the details page.
  • the function monitoring tool is a monitoring tool preset on the server.
  • the server receives a page access request, and determines that the list page data corresponding to the page access request contains a custom event of the detail page, it calls a preset function monitoring tool to execute the target monitoring function corresponding to the custom event. Listen to the custom event of the detail page to monitor whether the custom event of the detail page is triggered.
  • the function monitoring tool listens to a custom event being triggered, then obtains a page jump request triggered based on the custom event, and processes the received detailed data through the event processing function in the listening function according to the page jump request.
  • the function listener is used to execute the target listener function to listen to the custom event of the detail page. If the custom event in the listener function is triggered, a page jump request triggered by the custom event is obtained to achieve real-time Listen for custom events on the details page.
  • a page access processing device is provided, and the page access processing device corresponds to the page access processing method in the above embodiment in a one-to-one correspondence.
  • the page access processing device includes a list page display module 10, a preloading module 20, a monitoring module 30, and a detail page display module 40.
  • the detailed description of each function module is as follows:
  • the list page display module 10 is configured to receive a page access request, obtain corresponding list page data according to the page access request, and display the list page data on the original page.
  • the preloading module 20 is configured to preload text data corresponding to the detail page if the list page data includes a custom event of the detail page, and obtain preloaded text data corresponding to the detail page.
  • the monitoring module 30 is configured to monitor a custom event of the detail page, and obtain a page jump request triggered by the custom event of the detail page.
  • the detailed page display module 40 is configured to jump to a lower-level page corresponding to the original page based on the page jump request, and display the pre-loaded text data corresponding to the detailed page on the lower-level page.
  • the list page display module 10 includes a request receiving unit 11, a script obtaining unit 12, and a data obtaining unit 13.
  • the request receiving unit 11 is configured to receive a page access request, where the page access request includes a url address and a list page id.
  • the script obtaining unit 12 is configured to obtain a corresponding page execution script according to the URL address and the list page id.
  • the data obtaining unit 13 is configured to execute a script according to a page to obtain list page data.
  • the page access processing device before the list page display module 10, the page access processing device further includes a configuration request obtaining unit 101 and an event configuration unit 102.
  • the configuration request obtaining unit 101 is configured to obtain an event configuration request, and the event configuration request includes a list page id and a detail page id.
  • the event configuration unit 102 is configured to generate a custom event tag based on the list page id and the detail page id.
  • the custom event tag includes a custom event name corresponding to the detail page id, a value-passing target corresponding to the list page id, and Detail data corresponding to the detail page id.
  • the detail data includes text data corresponding to the detail page.
  • the preloading module 20 includes an event judging unit 21, a first detail page id obtaining unit 22, and a text data preloading unit 23.
  • the event judging unit 21 is configured to judge whether the list page data corresponding to the list page id includes a custom event tag. If the list page data corresponding to the list page id includes a custom event tag, the list page data includes the details of the page. Custom events.
  • the first detail page id obtaining unit 22 is configured to obtain a detail page id in a custom event tag based on a custom event of the detail page.
  • the text data preloading unit 23 is configured to preload preloaded text data in a json format corresponding to the detail page id based on the detail page id.
  • the detail data further includes non-text data corresponding to the detail page.
  • the page access processing device further includes a second detailed page id acquisition unit 301, a non-text data acquisition unit 302, and a data display unit 303.
  • the second detail page id obtaining unit 301 is configured to obtain the detail page id in the custom event tag based on the custom event of the detail page.
  • the non-text data obtaining unit 302 is configured to obtain a target non-text data corresponding to the detail page id based on the detail page id.
  • the data display unit 303 is configured to jump to a lower-level page corresponding to the original page based on the page jump request, and display the pre-loaded text data and the target non-text data corresponding to the detail page on the lower-level page.
  • the data display unit 303 includes rendering the pre-loaded text data and the target non-text data corresponding to the detail page through a native underlying interface, and displaying the pre-loaded text data and the target non-text data on a lower-level page.
  • the page access processing device further includes a listener function generating unit 103 for generating a target listener function based on a custom event tag.
  • the monitoring module 30 includes an event monitoring unit 31 and a request obtaining unit 32.
  • the event monitoring unit 31 is configured to execute a target monitoring function by using a function monitoring tool to monitor a custom event of a detail page.
  • the request obtaining unit 32 is configured to obtain a page jump request triggered based on the custom event if a custom event is triggered in the listening function.
  • Each module in the above-mentioned page access processing device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • Each of the above modules may be embedded in a processor in a hardware form or independent of a processor in a computer device, or may be stored in a memory of a computer device in a software form, so that the processor can call and execute operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer device includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for operating the operating system and computer-readable instructions in a non-volatile storage medium.
  • This database stores page execution scripts and so on.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by a processor to implement a page access processing method.
  • a computer device including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor.
  • the processor executes the computer-readable instructions, the processor implements the following steps: receiving a page Access request, according to the page access request to obtain the corresponding list page data, and display the list page data on the original page; if the list page data contains custom events for the details page, pre-load the text data corresponding to the details page to obtain Pre-loaded text data corresponding to the detail page; listen to the custom event of the detail page, and get the page jump request triggered by the custom event based on the detail page; jump to the lower-level page corresponding to the original page based on the page jump request, The pre-loaded text data corresponding to the detail page is displayed on the subordinate page.
  • receiving a page access request and obtaining corresponding list page data according to the page access request includes receiving a page access request, and the page access request includes a url address and a list page id; according to the url address and the list page id, obtaining The corresponding page executes the script; the page executes the script to obtain the list page data.
  • the processor before the step of receiving a page access request, the processor further implements the following steps when executing the computer-readable instructions: obtaining an event configuration request, the event configuration request includes a list page id and a detail page id; based on the list page id and The detail page id generates a custom event tag.
  • the custom event tag includes a custom event name corresponding to the detail page id, a value-passing target corresponding to the list page id, and detailed data corresponding to the detail page id.
  • the detail data includes text data corresponding to the detail page.
  • pre-loading the text data corresponding to the detail page and obtaining the pre-loaded text data corresponding to the detail page includes: determining a list corresponding to the list page id Whether the page data contains a custom event tag. If the list page data corresponding to the list page id contains a custom event tag, the list page data contains a custom event of the detail page; based on the custom event of the detail page, get the custom event The detail page id in the tag; based on the detail page id, preload the preloaded text data in json format corresponding to the detail page id.
  • the detail data further includes non-text data corresponding to the detail page.
  • the processor further implements the following steps when executing the computer-readable instructions: based on the custom event of the detail page, obtaining the Details page id; based on the details page id, get the target non-text data corresponding to the details page id; jump to the lower-level page corresponding to the original page based on the page jump request, and display the corresponding to the details page on the lower-level page Preload text data and target non-text data.
  • displaying the preloaded text data and the target non-text data corresponding to the detail page on the lower-level page includes: performing the pre-loaded text data and the target non-text data corresponding to the detail page through a native underlying interface. Rendering, displaying pre-loaded text data and target non-text data on lower-level pages.
  • the processor further implements the following steps when the processor executes the computer-readable instructions: based on the custom event label, generating a target listening function.
  • monitoring the custom event of the detail page to obtain a page jump request triggered by the custom event of the detail page includes: using a function listening tool to execute a target listening function to listen to the custom event of the detail page; If a custom event is triggered, a page jump request triggered based on the custom event is obtained.
  • one or more non-volatile readable storage media storing computer readable instructions are provided.
  • the computer readable storage medium stores computer readable instructions, and the computer readable instructions are processed by one or more processors. When executed, cause one or more processors to perform the following steps: receive a page access request, obtain corresponding list page data according to the page access request, and display the list page data on the original page; if the list page data contains the details page's auto Define the event, then preload the text data corresponding to the detail page, and get the preloaded text data corresponding to the detail page; listen to the custom event of the detail page, and get the page jump request triggered by the custom event of the detail page; Based on the page jump request, jump to the lower-level page corresponding to the original page, and display the pre-loaded text data corresponding to the detail page on the lower-level page.
  • receiving a page access request and obtaining corresponding list page data according to the page access request includes receiving a page access request, and the page access request includes a url address and a list page id; according to the url address and the list page id, obtaining The corresponding page executes the script; the page executes the script to obtain the list page data.
  • the one or more processors before the step of receiving the page access request, when the computer-readable instructions are executed by one or more processors, the one or more processors further perform the following steps: obtaining an event configuration request, the event configuration request includes List page id and detail page id; generate custom event tags based on list page id and detail page id, custom event tags include custom event names corresponding to the detail page id, and pass-through targets corresponding to the list page id And detailed data corresponding to the detail page id.
  • the detail data includes text data corresponding to the detail page.
  • pre-loading the text data corresponding to the detail page and obtaining the pre-loaded text data corresponding to the detail page includes: determining a list corresponding to the list page id Whether the page data contains a custom event tag. If the list page data corresponding to the list page id contains a custom event tag, the list page data contains a custom event of the detail page; based on the custom event of the detail page, get the custom event The detail page id in the tag; based on the detail page id, preload the preloaded text data in json format corresponding to the detail page id.
  • the detail data further includes non-text data corresponding to the detail page.
  • the one or more processors further perform the following steps: based on the details Custom event of the page, get the detail page id in the custom event tag; get the target non-text data corresponding to the detail page id based on the detail page id; jump to the lower-level page corresponding to the original page based on the page jump request , And pre-loaded text data and target non-text data corresponding to the detail page are displayed on the subordinate pages.
  • displaying the preloaded text data and the target non-text data corresponding to the detail page on the lower-level page includes: performing the pre-loaded text data and the target non-text data corresponding to the detail page through a native underlying interface. Rendering, displaying pre-loaded text data and target non-text data on lower-level pages.
  • the one or more processors are caused to perform the following steps: based on the custom event label, generating a target listener function.
  • monitoring the custom event of the detail page to obtain a page jump request triggered by the custom event of the detail page includes: using a function listening tool to execute a target listening function to listen to the custom event of the detail page; If a custom event is triggered, a page jump request triggered based on the custom event is obtained.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Synchlink DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种页面访问处理方法、装置、计算机设备及存储介质,该方法包括:接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据(S10);若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据(S20);监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求(S30);基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据(S40),解决当前页面跳转较慢而导致用户等待时间较长的问题。

Description

页面访问处理方法、装置、计算机设备及存储介质
本申请以2018年8月2日提交的申请号为201810869554.3,名称为“页面访问处理方法、装置、计算机设备及存储介质”的中国发明申请为基础,并要求其优先权。
技术领域
本申请涉及信息处理领域,尤其涉及一种页面访问处理方法、装置、计算机设备及存储介质。
背景技术
目前市面上的混合H5型APP,大多是传一些简单的主键id值到新页面以实现页面跳转,但是在传较多内容或者通知新页面做一些方法执行时,会导致大部分的H5型APP跳转到新页面的过程中,因需等待数据加载而使其页面跳转较慢,从而导致用户等待时间较长,体验不友好。
发明内容
本申请实施例提供一种可以快速显示跳转页面内容的页面访问处理方法、装置、计算机设备及存储介质,以解决当前页面跳转较慢而导致用户等待时间较长的问题。
一种页面访问处理方法,包括:
接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
一种页面访问处理装置,包括:
列表页面展示模块,用于接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
预加载模块,用于若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
监听模块,用于监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
详情页面展示模块,用于基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤,所述计算机可读指令被处理器执行时实现如下步骤:
接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
本申请的一个或多个实施例的细节在下面的附图及描述中提出。本申请的其他特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中页面访问处理方法的一应用环境示意图;
图2是本申请一实施例中页面访问处理方法的一流程图;
图3是本申请一实施例中页面访问处理方法的一流程图;
图4是本申请一实施例中页面访问处理方法的一流程图;
图5是本申请一实施例中页面访问处理方法的一流程图;
图6是本申请一实施例中页面访问处理方法的一流程图;
图7是本申请一实施例中页面访问处理方法的一流程图;
图8是本申请一实施例中页面访问处理装置的一示意图;
图9是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供的页面访问处理方法,可应用在如图1的应用环境中,其中,用户端通过网络与服务器进行通信。其中,用户端可以但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图2所示,提供一种页面访问处理方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:
S10:接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,并在原始页面上展示列表页面数据。
其中,页面访问请求是指用户端向服务器发送的访问页面的请求。列表页面数据是指本次页面访问请求所要访问的页面相对应的页面数据。例如,访问APP中某一页面时,APP提供一可视化页面,用户端可通过可视化页面向服务器发送需要进入与某一页面相对应的页面访问请求,服务器根据页面访问请求获取到该页面的页面数据,该页面的页面数据称之为列表页面数据。
具体地,市面上的混合H5型APP中引入基于JS开发的前端框架mui作为开发框架,将前端工具封装成开发的JavaScript方法,可通过JavaScript调用原生底层接口进行渲染。用户端通过网络与服务器进行通信连接,用户端在进入H5型APP页面时,用户端可预先根据用户账号和密码进行登录操作,或者服务器中存储有该用户端的用户账号,直接访问H5型APP页面。当用户端需进入H5型APP某一页面时,向服务器发送页面访问请求,服务器根据页面访问请求获取到与页面访问请求相对应的列表页面数据,并在原始页面展示该列表页面数据。
其中,JavaScript(简称JS)是一种直译式脚本语言,是一种动态类型、弱类型和基于原型的语言,内置支持类型。它的解释器被称为JavaScript引擎,为浏览器的一部分,广泛用于用户端的脚本语言,最早是在HTML(标准通用标记语言下的一个应用)网页上使用,用来给HTML网页增加动态功能。
S20:若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据。
其中,自定义事件是指基于mui框架的fire事件机制,可在打开新窗口时提前通知新窗口完成事件触发。文本数据是指详情页面的文字字段。其中,详情页面的文字字段可以是固定不变的文字字段,例如,在APP中从列表页面跳转至登录页面进行用户登录时,用户名和密码是固定不变的。详情页面的文字字段还可以是根据用户端的浏览操作等获取到用户端感兴趣的文字字段,再根据感兴趣的文字字段设定详情页面的文字字段。例如,某一新闻APP中,检测到用户端经常浏览军事新闻,则在详情页面中可设定军事新闻的内容,获取列表页面数据时,对详情页面的用户端感兴趣的军事新闻的文字字段进行预加载。
具体地,服务器根据列表页面数据对进行页面展示时,若检测出列表页面数据中包括详情页面的自定义事件,可通过mui.preload()方法或者mui.init()方法对详情页面的文本数据进行预加载,以获取到详情页面的预加载文本数据。需要说明的是,必须在服务器接收到用户端发送的获取页面跳转请求时,才能使用自定义事件。若新创建一个详情页面,不等该详情页面的自定义事件被触发,即不能立即使用webview.evalJS()或mui.fire()进行触发,若被触发则可能无效。其中,自定义事件可以是在列表页面数据中预先配置的,自定义事件中包括每一详情页面相对应的文本数据。当列表页面数据中包括需预加载的详情页面时,可通过在列表页面数据中预先配置自定义事件,以便在原始页面展示列表页面数据之后,通过与详情页面相对应的自定义事件对详情页面的文本数据进行预加载。
S30:监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求。
其中,页面跳转请求是指从原始页面跳转至详情页面(即下级页面)的请求。用户端发送的页面跳转请求可以通过触摸、点击、输入和滑动等方式触发的页面跳转请求。此处下级页面是指通过对原始页面进行触摸、点击、输入和滑动等操作跳转至下一页面的页面。
具体地,列表页面数据中预先设定了对自定义事件进行监听的监听函数。服务器通过执行该监听函数对自定义事件进行监听,如执行on()方法对自定义事件进行监听。当用户端需触发的跳转至详情页面的页面跳转请求时,可通过mui.fire()方法触发自定义事件,以使服务器获取到基于详情页面的自定义事件触发的页面跳转请求。
进一步地,服务器中预先设定从列表页面跳转至详情页面的跳转方式,例如,跳转方式为点击跳转,则用户端可根据点击操作,触发从列表页面跳转至详情页面的页面跳转请求,即触发从原始页面跳转至下级页面的页面跳转请求。
S40:基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据。
其中,下级页面是指通过页面跳转请求,从原始页面进入到与页面跳转请求相对应的详情页面。例如,原始页面A中可跳转至详情页面B和详情页面C,通过跳转请求,进入到详情页面B或详情页面C。原始页面上展示的是列表页面A的列表页面数据,下级页面展示的是详情页面B或详情页面C的页面数据。
具体地,服务器获取到从原始页面跳转至相对应的下级页面的页面跳转请求时,获取与详情页面相对应的预加载文本数据,并在下级页面上对与详情页面相对应的预加载文本数据进行展示。其中,预加载文本数据为详情页面的文字字段,例如,预加载文本数据中包括详情页面的一篇文章、一段话或者一句话。当从原始页面跳转至相对应的下级页面时,若原始页面与下级页面的顶部导航、底部选项卡和页面底部颜色等相同时,则跳转至下级页面时,顶部导航、底部选项卡和页面底部颜色等不需重新进行加载。进一步地,预加载文本数据可以是与列表页面相对应的所有详情页面的文本数据,基于跳转请求,在下级页面上展示跳转请求相对应的详情页面的文本数据。例如,列表页面数据的相对应的详情页面有详情页面1、详情页面2和详情页面3,当对列表页面数据进行展示时,对详情页面1、详情页面2和详情页面3的文本数据均进行预加载,获取相对应的预加载文本数据;当从原始页面跳转至与之相应的下级页面时,即从列表页面跳转至详情页面1、详情页面2或详情页面3中的任一页面时,如跳转至详情页面1,基于页面跳转请求,在下级页面上展示详情页面1的预加载文本数据,通过页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据,以实现快速跳转至用户端需要进入的页面,减少用户等待时间,提高用户体验。
步骤S10-S40中,通过接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,并在原始页面上展示列表页面数据,以实现根据页面访问请求显示列表页面数据。若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据,以便通过自定义事件对详情页面的文本数据的预加载,以便在需跳转至详情页面时可快速显示预加载文本数据。通过监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求,以便实时对自定义事件进行监控,基于页面跳转请求跳转到下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据,以实现跳转至详情页面,快速显示预加载文本数据,减少跳转至详情页面对文本数据进行加载的时间,提高用户体验。
在一实施例中,如图3所示,步骤S10中,即接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,具体包括如下步骤:
S11:接收页面访问请求,页面访问请求包括url地址和列表页面id。
其中,url是(Uniform Resource Locator,统一资源定位符)的缩写,它是WWW的统一资源定位标志,就是指网络地址。列表页面id(identity,身份)是网络地址的标识。在 JavaScript脚本中会将列表页面id作为该标签的唯一标识进行操作。
具体地,当接收到用户发送的页面访问请求时,获取该页面访问请求中与页面相应的url地址和列表页面id,其中,每一页面预先配置有相应的url地址和列表页面id。url为该页面的HTML页面地址,当打开该页面时要获取到与url相对应的HTML地址,该HTML地址可支持本地地址和网络地址。通过url地址和列表页面id可查找到相对应的页面,为了保持页面标识的唯一性,应该避免使用相同的标识来创建多个页面。
S12:根据url地址和列表页面id,获取相对应的页面执行脚本。
其中,页面执行脚本可以是JavaScript脚本,服务器需预先采用JavaScript编辑每一列表页面和详情页面相对应的页面执行脚本,并给该页面执行脚本配置相应的url地址和列表页面id。具体地,通过url地址和列表页面id可获取到预先配置的与之相应的JavaScript脚本。
S13:根据页面执行脚本,获取列表页面数据。
其中,页面执行脚本中预先对页面的页面框架、页面数据来源和页面渲染方式等进行描述,通过执行该页面执行脚本,可获取到与该页面相关的列表页面数据。
步骤S11-S13中,通过接收页面访问请求,页面访问请求包括url地址和列表页面id,以获取到唯一的页面执行脚本。在根据与url地址和列表页面id相对应的页面执行脚本后,可获取列表页面数据,并在原始页面上展示该列表页面数据,以实现在用户端展示本次页面访问请求所需要展示的页面的数据。
在一实施例中,如图4所示,在步骤S10之前,在接收页面访问请求的步骤之前,页面访问处理方法还包括如下步骤:
S101:获取事件配置请求,事件配置请求包括列表页面id和详情页面id。
具体地,用户端向服务器发送事件配置请求,事件配置请求中包括列表页面id和详情页面id。例如,用户端预先在JavaScript脚本中配置自定义事件,向服务器发送事件配置请求,事件配置请求中说明列表页面id和详情页面id,避免配置错误对象,导致后续不能根据自定义事件对详情页面进行预加载。其中,对自定义事件配置之前,先确定列表页面的框架,列表页面的框架中包括可跳转至详情页面的显示区域和不可跳转至详情页面的显示区域,获取可跳转至详情页面的显示区域和详情页面id,将显示区域与详情页面id进行关联,并基于该详情页面配置自定义事件,以便后续通过在原始页面上展示列表页面数据时,预加载可跳转至详情页面的显示区域相对应的详情页面的文本数据。通过原始页面上展示的可跳转至详情页面的显示区域,触发页面跳转请求,跳转至与显示区域相对应的详情页面。例如,在原始页面展示列表页面数据,其中有一显示区域是新闻标题,当基于该显示区域触发页面跳转请求,通过该新闻标题跳转至与标题相对应的详情页面。
S102:基于列表页面id和详情页面id,生成自定义事件标签,自定义事件标签包括与详情页面id相对应的自定义事件名称、与列表页面id相对应的传值目标、以及与详情页 面id相对应的详情数据。
具体地,自定义事件标签是指用于唯一识别自定义事件的标签,通过该标签可查找到自定义事件。服务器通过将详情页面id确定自定义事件的自定义事件名称,也可直接将详情页面id作为自定义事件名称;通过列表页面id确定事件对象的传值目标,也可将列表页面id相对应的页面作为传值目标,通过详情页面id获取相对应的详情数据,可将详情数据转换成json格式数据。其中,json(Java Script Object Notation)是一种轻量级的数据交换格式。json采用完全独立于语言的文本格式,这些特性使json成为理想的数据交换语言。本实施例中,服务器通过将详情数据转换成json格式数据,以便后续预加载与详情页面相对应的文本数据时,速度更快。
进一步地,某一列表页面数据可跳转至至少两个详情页面时,通过配置自定义事件,以生成自定义事件标签。当配置自定义事件时,自定义事件名称可通过详情页面id进行命名或者直接命名,传值目标通过列表页面id确定,并将详情页面id和与详情页面id相对应的详情数据进行关联,将所有详情数据转换成json格式数据,作为自定义事件的参数。其中,json格式数据包括所有详情页面的文本数据和非文本数据。通过在自定义事件标签中确定自定义事件名称、传值目标和详情数据,以实现当触发自定义事件标签时,获取详情页面id,根据详情页面id获取到与详情页面id相对应的预加载文本数据。其中,详情数据中还包括非文本数据,以便后续根据详情页面id获取到与详情页面id相对应的目标非文本数据。通过确定自定义事件名称,确定传值目标,通过详情页面id获取到与详情页面id相对应的详情数据(包括文本数据和非文本数据)。
步骤S101-S102中,获取事件配置请求,事件配置请求包括列表页面id和详情页面id,基于列表页面id和详情页面id,生成自定义事件标签,自定义事件标签包括与详情页面id相对应的自定义事件名称、与列表页面id相对应的传值目标以及与详情页面id相对应的详情数据,以实现对自定义事件的配置,以便后跟根据自定义事件对详情页面的预加载文本数据进行预加载。
在一实施例中,详情数据包括与详情页面相对应的文本数据,其中,文本数据是指详情页面的文字字段。如图5所示,在步骤S20中,即若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据,具体包括如下步骤:
S21:判断与列表页面id相对应的列表页面数据是否包含自定义事件标签,若与列表页面id相对应的列表页面数据包含自定义事件标签,则列表页面数据包含详情页面的自定义事件。
其中,JavaScript中,事件是绑定在标签上。本实施例中,通过url地址和列表页面id,获取相对应的页面执行脚本,页面执行脚本是JavaScript脚本。服务器通过判断与列表页面id相对应的列表页面数据是否包含自定义事件标签,即判断与列表页面id相对应的JavaScript脚本中是否包含自定义事件标签,当包含自定义事件标签时,则认定列表页面数 据包含详情页面的自定义事件。具体地,服务器获取列表页面id,判断与列表页面id相对应的列表页面数据是否包含自定义事件标签,若包含自定义事件标签,则列表页面数据包含自定义事件,以实现快速确定列表页面数据中包括自定义事件。
S22:基于详情页面的自定义事件,获取自定义事件标签中的详情页面id。
由于预先生成的自定义事件标签中,可根据详情页面id确定自定义事件名称;则服务器在确定列表页面数据包含详情页面的自定义事件时,可通过自定义事件获取到自定义事件名称,该自定义事件名称与详情页面id相对应,因此可获取到详情页面id。
S23:基于详情页面id,预加载与详情页面id相对应的json格式的预加载文本数据。
其中,自定义事件标签中根据详情页面id确定相对应的详情数据,而详情数据包括与详情页面相对应的文本数据和非文本数据,可事先将详情数据中的文本数据转换为json格式的预加载文本数据。其中,json可以将JavaScript对象中表示的一组数据转换为字符串,然后就可以在函数之间轻松地传递这个字符串,或者在异步应用程序中将字符串从Web用户机传递给服务器端程序。
具体他,根据详情页面id,从自定义事件标签中提取与详情页面id相对应的json格式的文本数据,并对该文本数据进行预加载,获取json格式的预加载文本数据。其中,在自定义事件标签中可以是所有详情页面id相对应的json格式的详情数据,也可以是单个详情页面id相对应的json格式的详情数据,而每一详情数据中包括文本数据和非文本数据,可在JavaScript设定预加载与详情页面相对应的文本数据是详情数据中的文本数据,根据详情页面id预加载与详情页面id相对应的json格式的文本数据。例如,在自定义事件标签中,可以设定同一列表页面下的所有详情页面id相对应的json格式的详情数据,预加载所有与详情页面id相对应的文本数据,也可以设定在自定义事件标签中为列表页面数据下单个详情页面id相对应的json格式的详情数据,预加载与详情页面id相对应的文本数据。
步骤S21-S23中,若与列表页面id相对应的列表页面数据包含自定义事件标签,则列表页面数据包含详情页面的自定义事件,以实现通过列表页面id确定列表页面数据中是否包含自定义事件,实现方法简单快速。通过基于详情页面的自定义事件,获取自定义事件标签中的详情页面id,以便后续根据详情页面id获取详情页面的预加载文本数据。通过详情页面id,预加载与详情页面id相对应的json格式的预加载文本数据,以实现预加载详情页面相对应的文本数据,以便在需跳转至详情页面时可快速显示预加载文本数据,提高用户体验。
在一实施例中,详情数据还包括与详情页面相对应的非文本数据。具体地,预先在自定义事件标签中配置与详情页面id相对应的详情数据,将详情数据分为文本数据和非文本数据,在原始页面对列表页面数据进行展示时,对与详情页面id相对应的详情数据中的文本数据进行预加载,当获取到跳转至某一详情页面的页面跳转请求时,直接显示预加载文本数据,并对与详情页面id相对应的详情数据中的非文本数据进行加载。
进一步地,如图6所示,在步骤S30之后,即在获取基于详情页面的自定义事件触发 的页面跳转请求的步骤之后,页面访问处理方法还包括:
S301:基于详情页面的自定义事件,获取自定义事件标签中的详情页面id。
其中,自定义事件标签中携带有详情页面id对应的自定义事件名称,即服务器在获取到自定义事件时,便可通过自定义事件获取到自定义事件名称(即详情页面id)。
S302:基于详情页面id,获取与详情页面id相对应的目标非文本数据。
其中,目标非文本数据是指与详情页面相对应的除文本数据以外的数据,可以是一些耗流量的图片数据等。文本数据中是指详情页面的文字字段。具体地,在原始页面对列表页面数据进行展示时,对详情页面相对应的详情数据中的文本数据进行预加载,当接收到基于详情页面的自定义事件触发的页面跳转请求时,可直接显示预加载文本数据,并基于自定义事件中详情页面id,获取与详情页面id相对应的目标非文本数据。
S303:基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据。
具体地,当监听到页面跳转请求,服务器根据页面跳转请求从原始页面跳转至下级页面,在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据。本实施例中,服务器在基于页面跳转请求进行下级页面展示时,可直接展示预加载文本数据,节省预加载文本数据的加载时间,提高文本数据的展示效率,再对目标非文本数据进行展示,避免用户等待时间长,提高用户体验。
步骤S301-S303中,基于详情页面的自定义事件,获取自定义事件标签中的详情页面id,基于详情页面id,获取与详情页面id相对应的目标非文本数据,以获取到与详情页面id相对应的目标非文本数据。基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据,以实现在下级页面展示与详情页面相对应的预加载文本数据和目标非文本数据,以节省详情页面在该下级页面的展示时间。
在一实施例中,在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据,包括:
通过原生底层接口对与详情页面相对应的预加载文本数据和目标非文本数据进行渲染,将预加载文本数据和目标非文本数据在下级页面上展示。
其中,原生底层接口是指通过预加载文本数据和目标非文本数据来调用相关的接口从而间接调用底层驱动功能。具体地,服务器接收到用户端发送的页面跳转请求时,根据页面跳转请求跳转到原始页面相对应的下级页面,通过原生底层接口对与详情页面相对应的预加载文本数据进行渲染,并在下级页面展示该预加载文本数据,使得页面跳转过程中文本数据可快速在下级页面上展示,解决用户等待时间过长的问题;当获取到目标非文本数据时,再通过原生底层接口对目标非文本数据进行渲染,在下级页面将目标非文本数据进行填充。例如,打开某一详情页面时,可在下级页面先显示详情页面的文字字段等文本数据,再对目标非文本数据进行加载,当目标非文本数据加载完成时,再将目标非文本数据填充到下级页面,以将详情页面在下级页面显示。
在一实施例中,步骤S102之后,即在生成自定义事件标签的步骤之后,页面访问处理方法还包括基于自定义事件标签生成目标监听函数。
具体地,生成自定义标签后,基于自定义事件生成目标监听函数,目标监听函数可为on()方法,具体包括on(event,selector,data,fn)等方法,其中,events:一个或多个用空格分隔的事件类型和可选的命名空间。selector:一个选择器字符串用于过滤器的触发事件的选择器元素的后代,如果选择的<null或省略,当它到达选定的元素,事件总是触发。data:当一个事件被触发时要传event.data给事件处理函数,其中,事件处理函数是指响应于某个事件而调用的函数(即响应页面跳转请求而调用的函数)。fn:该事件被触发时执行的函数。本申请中,event为监听的自定义事件名称,具体为详情页面id;selector选择器用来过滤出被选中的详情页面id;data是事件触发时,将与详情页面id相对应的详情数据给事件处理函数;fn是当自定义事件被触发时需要执行的事件处理函数。服务器通过目标监听函数实现对自定义事件的监听。
进一步地,如图7所示,步骤S30中,监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求,包括:
S31:采用函数监听工具执行目标监听函数,以监听详情页面的自定义事件。
其中,函数监听工具是预先设置在服务器上的监听工具。当服务器接收到页面访问请求,并确定该页面访问请求相对应的列表页面数据中包含详情页面的自定义事件时,调用预先设置的函数监听工具执行该自定义事件相对应的目标监控函数,以对详情页面的自定义事件进行监听,以监听该详情页面的自定义事件是否被触发。
S32:若监听函数中自定义事件被触发,则获取基于自定义事件触发的页面跳转请求。
具体地,函数监听工具监听到自定义事件被触发,则获取基于自定义事件触发的页面跳转请求,根据页面跳转请求通过监听函数中的事件处理函数对接收到的详情数据进行处理。
步骤S31-S32中,采用函数监听工具执行目标监听函数,以监听详情页面的自定义事件,若监听函数中自定义事件被触发,则获取基于自定义事件触发的页面跳转请求,以实现实时对详情页面的自定义事件进行监听。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种页面访问处理装置,该页面访问处理装置与上述实施例中页面访问处理方法一一对应。如图8所示,该页面访问处理装置包括列表页面展示模块10、预加载模块20、监听模块30和详情页面展示模块40。各功能模块详细说明如下:
列表页面展示模块10,用于接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,并在原始页面上展示列表页面数据。
预加载模块20,用于若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据。
监听模块30,用于监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求。
详情页面展示模块40,用于基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据。
在一实施例中,列表页面展示模块10包括请求接收单元11、脚本获取单元12和数据获取单元13。
请求接收单元11,用于接收页面访问请求,页面访问请求包括url地址和列表页面id。
脚本获取单元12,用于根据url地址和列表页面id,获取相对应的页面执行脚本。
数据获取单元13,用于根据页面执行脚本,获取列表页面数据。
在一实施例中,在列表页面展示模块10的之前,页面访问处理装置还包括配置请求获取单元101和事件配置单元102。
配置请求获取单元101,用于获取事件配置请求,事件配置请求包括列表页面id和详情页面id。
事件配置单元102,用于基于列表页面id和详情页面id,生成自定义事件标签,自定义事件标签包括与详情页面id相对应的自定义事件名称、与列表页面id相对应的传值目标以及与详情页面id相对应的详情数据。
在一实施例中,详情数据包括与详情页面相对应的文本数据。
进一步地,预加载模块20包括事件判断单元21、第一详情页面id获取单元22和文本数据预加载单元23。
事件判断单元21,用于判断与列表页面id相对应的列表页面数据是否包含自定义事件标签,若与列表页面id相对应的列表页面数据包含自定义事件标签,则列表页面数据包含详情页面的自定义事件。
第一详情页面id获取单元22,用于基于详情页面的自定义事件,获取自定义事件标签中的详情页面id。
文本数据预加载单元23,用于基于详情页面id,预加载与详情页面id相对应的json格式的预加载文本数据。
在一实施例中,详情数据还包括与详情页面相对应的非文本数据。
进一步地,在监听模块30之后,页面访问处理装置还包括第二详情页面id获取单元301、非文本数据获取单元302和数据展示单元303。
第二详情页面id获取单元301,用于基于详情页面的自定义事件,获取自定义事件标签中的详情页面id。
非文本数据获取单元302,用于基于详情页面id,获取与详情页面id相对应的目标非文本数据。
数据展示单元303,用于基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据。
在一实施例中,数据展示单元303包括通过原生底层接口对与详情页面相对应的预加 载文本数据和目标非文本数据进行渲染,将预加载文本数据和目标非文本数据在下级页面上展示。
在一实施例中,在事件配置单元102之后,页面访问处理装置还包括监听函数生成单元103,用于基于自定义事件标签,生成目标监听函数。
进一步地,监听模块30包括事件监听单元31和请求获取单元32。
事件监听单元31,用于采用函数监听工具执行目标监听函数,以监听详情页面的自定义事件。
请求获取单元32,用于若监听函数中自定义事件被触发,则获取基于自定义事件触发的页面跳转请求。
关于页面访问处理装置的具体限定可以参见上文中对于页面访问处理方法的限定,在此不再赘述。上述页面访问处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块相对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作***和计算机可读指令的运行提供环境。该数据库存储页面执行脚本等。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种页面访问处理方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现以下步骤:接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,并在原始页面上展示列表页面数据;若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据;监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求;基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据。
在一实施例中,接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,包括:接收页面访问请求,页面访问请求包括url地址和列表页面id;根据url地址和列表页面id,获取相对应的页面执行脚本;根据页面执行脚本,获取列表页面数据。
在一实施例中,在接收页面访问请求的步骤之前,处理器执行计算机可读指令时还实现以下步骤:获取事件配置请求,事件配置请求包括列表页面id和详情页面id;基于列表页面id和详情页面id,生成自定义事件标签,自定义事件标签包括与详情页面id相对应的自定义事件名称、与列表页面id相对应的传值目标以及与详情页面id相对应的详情数据。
在一实施例中,详情数据包括与详情页面相对应的文本数据。
进一步地,若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据,包括:判断与列表页面id相对应的列表页面数据是否包含自定义事件标签,若与列表页面id相对应的列表页面数据包含自定义事件标签,则列表页面数据包含详情页面的自定义事件;基于详情页面的自定义事件,获取自定义事件标签中的详情页面id;基于详情页面id,预加载与详情页面id相对应的json格式的预加载文本数据。
在一实施例中,详情数据还包括与详情页面相对应的非文本数据。
进一步地,在获取基于详情页面的自定义事件触发的页面跳转请求的步骤之后,处理器执行计算机可读指令时还实现以下步骤:基于详情页面的自定义事件,获取自定义事件标签中的详情页面id;基于详情页面id,获取与详情页面id相对应的目标非文本数据;基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据。
在一实施例中,在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据,包括:通过原生底层接口对与详情页面相对应的预加载文本数据和目标非文本数据进行渲染,将预加载文本数据和目标非文本数据在下级页面上展示。
在一实施例中,在生成自定义事件标签的步骤之后,处理器执行计算机可读指令时还实现以下步骤:基于自定义事件标签,生成目标监听函数。
进一步地,监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求,包括:采用函数监听工具执行目标监听函数,以监听详情页面的自定义事件;若监听函数中自定义事件被触发,则获取基于自定义事件触发的页面跳转请求。
在一个实施例中,提供一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读存储介质存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如下步骤:接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,并在原始页面上展示列表页面数据;若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据;监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求;基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据。
在一实施例中,接收页面访问请求,根据页面访问请求获取相对应的列表页面数据,包括:接收页面访问请求,页面访问请求包括url地址和列表页面id;根据url地址和列表页面id,获取相对应的页面执行脚本;根据页面执行脚本,获取列表页面数据。
在一实施例中,在接收页面访问请求的步骤之前,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行如下步骤:获取事件配置请求,事件配置请求包括列表页面id和详情页面id;基于列表页面id和详情页面id,生成自定义事件标签,自定义事件标签包括与详情页面id相对应的自定义事件名称、与列表页面id相对应的传值 目标以及与详情页面id相对应的详情数据。
在一实施例中,详情数据包括与详情页面相对应的文本数据。
进一步地,若列表页面数据包含详情页面的自定义事件,则预加载与详情页面相对应的文本数据,获取与详情页面相对应的预加载文本数据,包括:判断与列表页面id相对应的列表页面数据是否包含自定义事件标签,若与列表页面id相对应的列表页面数据包含自定义事件标签,则列表页面数据包含详情页面的自定义事件;基于详情页面的自定义事件,获取自定义事件标签中的详情页面id;基于详情页面id,预加载与详情页面id相对应的json格式的预加载文本数据。
在一实施例中,详情数据还包括与详情页面相对应的非文本数据。
进一步地,在获取基于详情页面的自定义事件触发的页面跳转请求的步骤之后,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器还执行如下步骤:基于详情页面的自定义事件,获取自定义事件标签中的详情页面id;基于详情页面id,获取与详情页面id相对应的目标非文本数据;基于页面跳转请求跳转到原始页面相对应的下级页面,并在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据。
在一实施例中,在下级页面上展示与详情页面相对应的预加载文本数据和目标非文本数据,包括:通过原生底层接口对与详情页面相对应的预加载文本数据和目标非文本数据进行渲染,将预加载文本数据和目标非文本数据在下级页面上展示。
在一实施例中,在生成自定义事件标签的步骤之后,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如下步骤:基于自定义事件标签,生成目标监听函数。
进一步地,监听详情页面的自定义事件,获取基于详情页面的自定义事件触发的页面跳转请求,包括:采用函数监听工具执行目标监听函数,以监听详情页面的自定义事件;若监听函数中自定义事件被触发,则获取基于自定义事件触发的页面跳转请求。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功 能单元、模块完成,即将该装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种页面访问处理方法,其特征在于,包括:
    接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
    若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
    监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
    基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
  2. 如权利要求1所述的页面访问处理方法,其特征在于,所述接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,包括:
    接收页面访问请求,所述页面访问请求包括url地址和列表页面id;
    根据所述url地址和所述列表页面id,获取相对应的页面执行脚本;
    根据所述页面执行脚本,获取列表页面数据。
  3. 如权利要求1所述的页面访问处理方法,其特征在于,在所述接收页面访问请求的步骤之前,所述页面访问处理方法还包括如下步骤:
    获取事件配置请求,所述事件配置请求包括列表页面id和详情页面id;
    基于所述列表页面id和所述详情页面id,生成自定义事件标签,所述自定义事件标签包括与所述详情页面id相对应的自定义事件名称、与所述列表页面id相对应的传值目标以及与所述详情页面id相对应的详情数据。
  4. 如权利要求3所述的页面访问处理方法,其特征在于,所述详情数据包括与所述详情页面相对应的文本数据;
    所述若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据,包括:
    判断与所述列表页面id相对应的列表页面数据是否包含所述自定义事件标签,若与所述列表页面id相对应的列表页面数据包含所述自定义事件标签,则所述列表页面数据包含详情页面的自定义事件;
    基于所述详情页面的自定义事件,获取所述自定义事件标签中的详情页面id;
    基于所述详情页面id,预加载与所述详情页面id相对应的json格式的预加载文本数据。
  5. 如权利要求3所述的页面访问处理方法,其特征在于,所述详情数据还包括与所述详情页面相对应的非文本数据;
    在所述获取基于所述详情页面的自定义事件触发的页面跳转请求的步骤之后,所述页面访问处理方法还包括:
    基于所述详情页面的自定义事件,获取所述自定义事件标签中的详情页面id;
    基于所述详情页面id,获取与所述详情页面id相对应的目标非文本数据;
    基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据和所述目标非文本数据。
  6. 如权利要求5所述的页面访问处理方法,其特征在于,所述在所述下级页面上展示与所述详情页面相对应的预加载文本数据和所述目标非文本数据,包括:
    通过原生底层接口对与所述详情页面相对应的预加载文本数据和所述目标非文本数据进行渲染,将所述预加载文本数据和所述目标非文本数据在所述下级页面上展示。
  7. 如权利要求3所述的页面访问处理方法,其特征在于,在所述生成自定义事件标签的步骤之后,所述页面访问处理方法还包括:
    基于所述自定义事件标签,生成目标监听函数;
    所述监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求,包括:
    采用函数监听工具执行目标监听函数,以监听所述详情页面的自定义事件;
    若监听函数中自定义事件被触发,则获取基于所述自定义事件触发的页面跳转请求。
  8. 一种页面访问处理装置,其特征在于,包括:
    列表页面展示模块,用于接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
    预加载模块,用于若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
    监听模块,用于监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
    详情页面展示模块,用于基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
    若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
    监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
    基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
  10. 如权利要求9所述的计算机设备,其特征在于,所述接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,包括:
    接收页面访问请求,所述页面访问请求包括url地址和列表页面id;
    根据所述url地址和所述列表页面id,获取相对应的页面执行脚本;
    根据所述页面执行脚本,获取列表页面数据。
  11. 如权利要求9所述的计算机设备,其特征在于,在所述接收页面访问请求的步骤之前,所述处理器执行所述计算机可读指令时还包括如下步骤:
    获取事件配置请求,所述事件配置请求包括列表页面id和详情页面id;
    基于所述列表页面id和所述详情页面id,生成自定义事件标签,所述自定义事件标签包括与所述详情页面id相对应的自定义事件名称、与所述列表页面id相对应的传值目标以及与所述详情页面id相对应的详情数据。
  12. 如权利要求11所述的计算机设备,其特征在于,所述详情数据包括与所述详情页面相对应的文本数据;
    所述若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据,包括:
    判断与所述列表页面id相对应的列表页面数据是否包含所述自定义事件标签,若与所述列表页面id相对应的列表页面数据包含所述自定义事件标签,则所述列表页面数据包含详情页面的自定义事件;
    基于所述详情页面的自定义事件,获取所述自定义事件标签中的详情页面id;
    基于所述详情页面id,预加载与所述详情页面id相对应的json格式的预加载文本数据。
  13. 如权利要求11所述的计算机设备,其特征在于,所述详情数据还包括与所述详情页面相对应的非文本数据;
    在所述获取基于所述详情页面的自定义事件触发的页面跳转请求的步骤之后,所述处理器执行所述计算机可读指令时实现如下步骤:
    基于所述详情页面的自定义事件,获取所述自定义事件标签中的详情页面id;
    基于所述详情页面id,获取与所述详情页面id相对应的目标非文本数据;
    基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据和所述目标非文本数据。
  14. 如权利要求13所述的计算机设备,其特征在于,所述在所述下级页面上展示与所述详情页面相对应的预加载文本数据和所述目标非文本数据,包括:
    通过原生底层接口对与所述详情页面相对应的预加载文本数据和所述目标非文本数据进行渲染,将所述预加载文本数据和所述目标非文本数据在所述下级页面上展示。
  15. 一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,并在原始页面上展示所述列表页面数据;
    若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据;
    监听所述详情页面的自定义事件,获取基于所述详情页面的自定义事件触发的页面跳转请求;
    基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据。
  16. 如权利要求15所述的非易失性可读存储介质,其特征在于,所述接收页面访问请求,根据所述页面访问请求获取相对应的列表页面数据,包括:
    接收页面访问请求,所述页面访问请求包括url地址和列表页面id;
    根据所述url地址和所述列表页面id,获取相对应的页面执行脚本;
    根据所述页面执行脚本,获取列表页面数据。
  17. 如权利要求15所述的非易失性可读存储介质,其特征在于,在所述接收页面访问请求的步骤之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    获取事件配置请求,所述事件配置请求包括列表页面id和详情页面id;
    基于所述列表页面id和所述详情页面id,生成自定义事件标签,所述自定义事件标签包括与所述详情页面id相对应的自定义事件名称、与所述列表页面id相对应的传值目标以及与所述详情页面id相对应的详情数据。
  18. 如权利要求17所述的非易失性可读存储介质,其特征在于,所述详情数据包括与所述详情页面相对应的文本数据;
    所述若所述列表页面数据包含详情页面的自定义事件,则预加载与所述详情页面相对应的文本数据,获取与所述详情页面相对应的预加载文本数据,包括:
    判断与所述列表页面id相对应的列表页面数据是否包含所述自定义事件标签,若与所述列表页面id相对应的列表页面数据包含所述自定义事件标签,则所述列表页面数据包含详情页面的自定义事件;
    基于所述详情页面的自定义事件,获取所述自定义事件标签中的详情页面id;
    基于所述详情页面id,预加载与所述详情页面id相对应的json格式的预加载文本数据。
  19. 如权利要求17所述的非易失性可读存储介质,其特征在于,所述详情数据还包括与所述详情页面相对应的非文本数据;
    在所述获取基于所述详情页面的自定义事件触发的页面跳转请求的步骤之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    基于所述详情页面的自定义事件,获取所述自定义事件标签中的详情页面id;
    基于所述详情页面id,获取与所述详情页面id相对应的目标非文本数据;
    基于所述页面跳转请求跳转到所述原始页面相对应的下级页面,并在所述下级页面上展示与所述详情页面相对应的预加载文本数据和所述目标非文本数据。
  20. 如权利要求19所述的非易失性可读存储介质,其特征在于,所述在所述下级页面上展示与所述详情页面相对应的预加载文本数据和所述目标非文本数据,包括:
    通过原生底层接口对与所述详情页面相对应的预加载文本数据和所述目标非文本数据进行渲染,将所述预加载文本数据和所述目标非文本数据在所述下级页面上展示。
PCT/CN2018/106425 2018-08-02 2018-09-19 页面访问处理方法、装置、计算机设备及存储介质 WO2020024397A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810869554.3 2018-08-02
CN201810869554.3A CN109213952A (zh) 2018-08-02 2018-08-02 页面访问处理方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020024397A1 true WO2020024397A1 (zh) 2020-02-06

Family

ID=64988046

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106425 WO2020024397A1 (zh) 2018-08-02 2018-09-19 页面访问处理方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN109213952A (zh)
WO (1) WO2020024397A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538455A (zh) * 2020-05-25 2020-08-14 网易(杭州)网络有限公司 一种页面切换方法及装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134656B (zh) * 2019-04-04 2021-10-22 微民保险代理有限公司 页面控制方法、装置、计算机可读存储介质和计算机设备
CN110222284B (zh) * 2019-05-05 2021-04-02 福建天泉教育科技有限公司 多页面加载方法及计算机可读存储介质
CN111984888B (zh) * 2019-05-24 2024-06-07 阿里巴巴集团控股有限公司 页面渲染方法、装置、电子设备及计算机可读介质
CN110532159B (zh) * 2019-09-03 2023-04-18 北京百度网讯科技有限公司 数据监听方法、装置、设备及计算机可读存储介质
CN112434233B (zh) * 2020-02-20 2023-03-07 上海哔哩哔哩科技有限公司 一种用于加快次级页面首屏渲染的方法与设备
CN111866158B (zh) * 2020-07-28 2021-06-18 企查查科技有限公司 路由方法、装置、计算机设备和存储介质
CN111898336B (zh) * 2020-09-30 2021-03-12 拼说说(深圳)网络科技有限公司 弹幕显示方法、装置、计算机设备及存储介质
CN112650549A (zh) * 2020-12-23 2021-04-13 平安普惠企业管理有限公司 一种页面跳转方法、装置、终端以及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268019A (zh) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 一种软件运行方法、装置及终端
CN105095280A (zh) * 2014-05-13 2015-11-25 腾讯科技(深圳)有限公司 一种浏览器缓存方法和装置
CN105260424A (zh) * 2015-09-28 2016-01-20 北京奇虎科技有限公司 用户浏览网页历史记录和最常访问的处理方法及装置
CN106250529A (zh) * 2016-08-05 2016-12-21 成都佳荣科技有限公司 网页页面加载方法
CN106649810A (zh) * 2016-12-29 2017-05-10 山东舜网传媒股份有限公司 基于Ajax的新闻网页动态数据的抓取方法及***

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302557A (zh) * 2015-05-11 2017-01-04 阿里巴巴集团控股有限公司 页面加载方法及相关设备、***
CN104991916B (zh) * 2015-06-24 2019-03-01 小米科技有限责任公司 网页的加载方法及装置
CN108196964A (zh) * 2017-12-29 2018-06-22 北京奇虎科技有限公司 一种将数据流模块化的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095280A (zh) * 2014-05-13 2015-11-25 腾讯科技(深圳)有限公司 一种浏览器缓存方法和装置
CN104268019A (zh) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 一种软件运行方法、装置及终端
CN105260424A (zh) * 2015-09-28 2016-01-20 北京奇虎科技有限公司 用户浏览网页历史记录和最常访问的处理方法及装置
CN106250529A (zh) * 2016-08-05 2016-12-21 成都佳荣科技有限公司 网页页面加载方法
CN106649810A (zh) * 2016-12-29 2017-05-10 山东舜网传媒股份有限公司 基于Ajax的新闻网页动态数据的抓取方法及***

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538455A (zh) * 2020-05-25 2020-08-14 网易(杭州)网络有限公司 一种页面切换方法及装置

Also Published As

Publication number Publication date
CN109213952A (zh) 2019-01-15

Similar Documents

Publication Publication Date Title
WO2020024397A1 (zh) 页面访问处理方法、装置、计算机设备及存储介质
US10613916B2 (en) Enabling a web application to call at least one native function of a mobile device
CN110020292B (zh) 网页内容提取方法以及终端设备
US10733259B2 (en) Web page access method and apparatus
TW201640342A (zh) 應用程式頁面快速存取方法及應用其的行動終端
US9400633B2 (en) Methods and apparatus for voiced-enabling a web application
US9781262B2 (en) Methods and apparatus for voice-enabling a web application
WO2020024399A1 (zh) 页面渲染方法、装置、计算机设备及存储介质
CN110399578B (zh) 页面访问方法及装置
US10157612B2 (en) Methods and apparatus for voice-enabling a web application
US20140040746A1 (en) Methods and apparatus for voiced-enabling a web application
US10506400B2 (en) Data download method and apparatus
CN104317570B (zh) 动态解析Web应用的装置和方法
US9292252B2 (en) Methods and apparatus for voiced-enabling a web application
CN103970760A (zh) 一种网页请求处理方法及装置
US9648078B2 (en) Identifying a browser for rendering an electronic document
JP2021111403A (ja) ランディングページの処理方法、装置、機器及び媒体
CN111431767B (zh) 多浏览器资源同步方法、装置、计算机设备和存储介质
CN104270443B (zh) 一种能够动态解析Web应用的云计算***及方法
TWI519980B (zh) 網頁顯示方法和裝置及電腦可讀取儲存介質
WO2020155765A1 (zh) 移动终端爬取数据的方法、装置、移动终端和存储介质
CN110674435A (zh) 页面访问方法、服务器、终端、电子设备及可读存储介质
CN105095289A (zh) 网页访问方法及装置
US9485330B2 (en) Web browser operation method and system
US10095791B2 (en) Information search method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18928325

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18928325

Country of ref document: EP

Kind code of ref document: A1