CN116069408A - Article detail page loading method based on static resource separation and related equipment thereof - Google Patents

Article detail page loading method based on static resource separation and related equipment thereof Download PDF

Info

Publication number
CN116069408A
CN116069408A CN202211568714.3A CN202211568714A CN116069408A CN 116069408 A CN116069408 A CN 116069408A CN 202211568714 A CN202211568714 A CN 202211568714A CN 116069408 A CN116069408 A CN 116069408A
Authority
CN
China
Prior art keywords
loading
page
text
article
content
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211568714.3A
Other languages
Chinese (zh)
Inventor
张龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202211568714.3A priority Critical patent/CN116069408A/en
Publication of CN116069408A publication Critical patent/CN116069408A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application belongs to the technical field of financial science and technology, is applied to the field of information release in financial APP, and relates to an article detail page loading method based on static resource separation and related equipment thereof, wherein the method comprises the steps of obtaining article text content; identifying a head portion, a body portion, and a tail portion in the text content; loading the head part and the tail part to a target page by adopting a preset original loading mode, and completing page rendering of the head part and the tail part; and selecting a preset loading mode according to preset judging conditions to load the text part to a target page, and finishing loading the detail page of the whole article. According to the method and the device, when the method and the device are initialized, the part, the head part and the tail part, which need to be subjected to user interaction, in the text are subjected to primary loading, the part, which does not need to be subjected to user interaction, in the text is subjected to different types of loading in an H5 loading mode, so that the loading speed of the detailed pages of the article is improved to a certain extent, and the user experience is ensured.

Description

Article detail page loading method based on static resource separation and related equipment thereof
Technical Field
The application relates to the technical field of financial science and technology, in particular to an article detail page loading method based on static resource separation and related equipment thereof.
Background
The article is an important information in mobile phone app, and the information carrier is mainly graphics context. Most of the app articles are currently implemented using h5 pages to meet the requirements of their diversified expression forms. But the h5 page is slower to load than the native page and the user experience is poor.
Safe production insurance creates a car owner ecological circle through a self-developed good car owner APP, and on the premise of allowing a customer, a 'safe driving' function is started to encourage the car owner to voluntarily upload driving behavior data by using a 'driving earning' function, and meanwhile, various insurance and vehicle information can be pushed for the customer to read.
At present, for such articles, the general optimization direction in the industry is mainly unified optimization of h5 pages, such as webv i ew preloading, and the like, and special optimization of the article detail pages is not performed, and the optimization mode can reduce the loading time consumption of part of the article detail pages, but also has obvious page loading process, and has a problem of slower loading speed relative to the original page.
Disclosure of Invention
The embodiment of the application aims to provide an article detail page loading method based on static resource separation and related equipment thereof, so that the loading speed of the article detail page is improved to a certain extent, and the user experience is ensured.
In order to solve the above technical problems, the embodiment of the present application provides a method for loading an article detail page based on static resource separation, which adopts the following technical scheme:
a method for loading an article detail page based on static resource separation comprises the following steps:
step S1, acquiring text content edited by an article publisher on a text editing page;
step S2, recognizing a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page, wherein the distinguishing object at least comprises a first distinguishing object, a second distinguishing object and a third distinguishing object, the first distinguishing object corresponds to the head part in the text content, the second distinguishing object corresponds to the body part in the text content, and the third distinguishing object corresponds to the tail part in the text content;
step S3, loading the head part and the tail part to a target page by adopting a preset native loading mode, and completing page rendering of the head part and the tail part, wherein the native loading mode comprises an android I od native loading mode or an I OS native loading mode;
And S4, selecting a preset loading mode according to preset judging conditions to load the text part to the target page, and finishing loading of the detail page of the whole article.
Further, the executing step of the step S1 specifically includes:
and acquiring the text content edited by the text editing page in a POST request mode in AJAX.
Further, when initializing the target page, the condition that the step S3 is executed simultaneously is satisfied includes that the target page is an APP top page, the browsing user stays at the target page for more than 1 second, the article display cards in the target page are all displayed, the current network environment is a wifi environment, the interest tag corresponding to the article display cards in the target page is an interest tag of the browsing user, and before executing the step S3, the method further includes:
judging whether the article publisher submits a text content loading instruction or not according to a preset monitoring component;
if the article publisher submits a text content loading instruction, judging whether the condition of executing the step S3 simultaneously is met when initializing the target page according to a preset preloading rule;
if yes, step S3 is executed simultaneously when initializing the target page.
Further, after performing step S2, the method further includes:
screening the text part, the head part and the tail part from the text editing page according to the distinguishing object;
the text part is transferred to a preset CDN server;
and transferring the head part and the tail part into a storage server corresponding to a preset original loading file.
Further, the executing step of the step S4 specifically includes:
s4-1, acquiring a page tag corresponding to the text part on the text editing page;
step S4-2, identifying the content part needing to be subjected to user interaction and the content part needing not to be subjected to user interaction in the text part according to the page tag;
s4-3, acquiring position line information of the content part needing user interaction in the text part;
s4-4, extracting the content part needing to be subjected to user interaction according to the position line information, and loading the content part needing to be subjected to user interaction to the target page from a storage server corresponding to the original loading file by adopting the original loading mode;
step S4-5, obtaining position line information of the content part which does not need to be interacted with by the user in the text part, extracting the content part which does not need to be interacted with by the user according to the position line information, and loading the content part which does not need to be interacted with by the user to the target page from the CDN server by adopting a preset H5 page loading mode.
Further, after performing the step S4-3, the method further includes:
extracting a content part needing user interaction in the text part from the CDN server;
and caching the position line information corresponding to the content part needing user interaction in the text part to a storage server corresponding to the original loading file.
Further, when initializing the target page, the condition that the step S4-4 is executed simultaneously is satisfied, including that the target page is an APP top page, the browsing user stays at the target page for more than 1 second, the article display cards in the target page are all displayed, the current network environment is a wifi environment, the interest tag corresponding to the article display cards in the target page is an interest tag of the browsing user, and before executing the step S4-4, the method further includes:
judging whether the article publisher submits a text content loading instruction or not according to the monitoring component;
if the text content loading instruction is submitted by the article publisher, judging whether the condition of simultaneously executing the step S4-4 is met when initializing the target page according to the preloading rule;
If yes, step S4-4 is executed simultaneously when initializing the target page.
In order to solve the above technical problems, the embodiment of the present application further provides an article detail page loading device based on static resource separation, which adopts the following technical scheme:
an article detail page loading device based on static resource separation, comprising:
the text content acquisition module is used for acquiring text content edited by the article publisher on the text editing page;
the content classification recognition module is used for recognizing a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page, wherein the distinguishing object at least comprises a first distinguishing object, a second distinguishing object and a third distinguishing object, the first distinguishing object corresponds to the head part in the text content, the second distinguishing object corresponds to the body part in the text content, and the third distinguishing object corresponds to the tail part in the text content;
the native loading module is used for loading the head part and the tail part to the target page by adopting a preset native loading mode to finish page rendering of the head part and the tail part, wherein the native loading mode comprises an android I od native loading mode or an I OS native loading mode;
And the selectable loading module is used for selecting a preset loading mode according to preset judging conditions to load the text part to the target page, so that the loading of the whole article detail page is completed.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
a computer device comprising a memory having stored therein computer readable instructions which when executed by the processor implement the steps of the article detail page loading method based on static resource separation described above.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
a computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the article detail page loading method based on static resource separation as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
according to the method for loading the article detail page based on the static resource separation, text contents edited by an article publisher on a text editing page are obtained; identifying a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page; loading the head part and the tail part to a target page by adopting a preset original loading mode, and completing page rendering of the head part and the tail part; and selecting a preset loading mode according to preset judging conditions to load the text part to a target page, and finishing loading the detail page of the whole article. According to the method and the device, when the method and the device are initialized, the part, the head part and the tail part, which need to be subjected to user interaction, in the text are subjected to primary loading, the part, which does not need to be subjected to user interaction, in the text is subjected to different types of loading in an H5 loading mode, so that the loading speed of the detailed pages of the article is improved to a certain extent, and the user experience is ensured.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a static resource separation-based article detail page loading method according to the present application;
FIG. 3 is a flow chart of one embodiment of step S4 shown in FIG. 2;
FIG. 4 is a schematic structural diagram of one embodiment of an article detail page loading device based on static resource separation according to the present application;
FIG. 5 is a schematic diagram of one embodiment of a preload determination module in accordance with the present application;
FIG. 6 is a schematic structural diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Mov i ng P i cture ExpertsGroup Aud i o Layer I I I, dynamic video expert compression standard audio plane 3), MP4 (Mov i ng P i ctureExperts Group Aud i o Layer I V, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the method for loading the article detail page based on the static resource separation provided by the embodiment of the application is generally executed by a server/terminal device, and correspondingly, the article detail page loading device based on the static resource separation is generally arranged in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of a static resource separation-based article detail page loading method is shown in accordance with the present application. The article detail page loading method based on static resource separation comprises the following steps:
Step S1, acquiring text contents edited by an article publisher on a text editing page.
In this embodiment, the executing step of the step S1 specifically includes: and acquiring the text content edited by the text editing page in a POST request mode in AJAX.
And S2, identifying a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page, wherein the distinguishing object at least comprises a first distinguishing object, a second distinguishing object and a third distinguishing object, the first distinguishing object corresponds to the head part in the text content, the second distinguishing object corresponds to the body part in the text content, and the third distinguishing object corresponds to the tail part in the text content.
In this embodiment, after performing step S2, the method further includes: screening the text part, the head part and the tail part from the text editing page according to the distinguishing object; the text part is transferred to a preset CDN server; and transferring the head part and the tail part into a storage server corresponding to a preset original loading file.
In this embodiment, the CDN server is a content delivery network, which belongs to a novel network construction method. The CDN server is used for accessing the network, a new network architecture is newly constructed in the I-nternet, a special network sending function is started for the network of the user, the user can obtain the required content nearby through the load balancing, content distribution, scheduling and other functional modules of the center platform, network congestion is reduced, the access response speed and hit rate of the user are improved, and the key technology of the CDN mainly comprises content storage and distribution technology.
The head part and the tail part are transferred to the storage server corresponding to the preset original loading file, and the text part is transferred to the preset CDN server, so that the content parts with different loading modes are stored in different data memories, and the text to be loaded of the different content parts can be positioned quickly when the page is loaded.
And S3, loading the head part and the tail part to a target page by adopting a preset native loading mode, and completing page rendering of the head part and the tail part, wherein the native loading mode comprises an android I od native loading mode or an I OS native loading mode.
In this embodiment, before executing step S3, the method further includes: judging whether the article publisher submits a text content loading instruction or not according to a preset monitoring component; if the article publisher submits a text content loading instruction, judging whether the condition of executing the step S3 simultaneously is met when initializing the target page according to a preset preloading rule; if yes, step S3 is executed simultaneously when initializing the target page.
In this embodiment, the preloading rule includes: whether the target page of the browsing user corresponding to the article publisher is an APP home page, whether the browsing user stays on the target page for more than 1 second, whether the article display cards in the target page are all displayed, whether the current network environment is a wi f i environment, and whether the interest labels corresponding to the article display cards in the target page are the interest labels of the browsing user.
In this embodiment, if the target page is an APP home page, the browsing user stays on the target page for more than 1 second, the article display cards in the target page are all displayed, the current network environment is a wi f i environment, and the interest tag corresponding to the article display cards in the target page is the interest tag of the browsing user, then the condition that step S3 is executed simultaneously when initializing the target page is satisfied.
Judging through a pre-set pre-loading rule, if the content part to be loaded, which needs to be subjected to user interaction, in the article detail page meets the pre-loading rule, pre-loading the content part to be subjected to user interaction to the target page along with JS, CSS and other page resources during initialization, and compared with the existing article detail page which uses a pure H5 page loading mode, the pre-loading mode is used, so that the loading step is simplified, and meanwhile, the content part to be subjected to user interaction is loaded in a native loading mode, so that the loading speed is faster, the loading time is saved, and good user experience is ensured.
And S4, selecting a preset loading mode according to preset judging conditions to load the text part to the target page, and finishing loading of the detail page of the whole article.
With continued reference to fig. 3, fig. 3 is a flowchart of a specific embodiment of step S4 shown in fig. 2, including:
s4-1, acquiring a page tag corresponding to the text part on the text editing page;
in this embodiment, the page tags corresponding to the text portion in the text editing page include two types, where one type is an interactive operation type page tag and the other type is a non-interactive operation type page tag. For example, the label used by the clickable link in the text portion is an interactive operation type page label, and the label used by the reading portion only in the text portion is a non-interactive operation type page label.
Step S4-2, identifying the content part needing to be subjected to user interaction and the content part needing not to be subjected to user interaction in the text part according to the page tag;
in this embodiment, the step of identifying, according to the page tag, a content portion needing to perform user interaction and a content portion not needing to perform user interaction in the text portion specifically includes: if the page tag is an interactive operation type page tag, the corresponding content part is the content part needing user interaction in the text part, otherwise, if the page tag is a non-interactive operation type page tag, the corresponding content part is the content part needing no user interaction in the text part.
S4-3, acquiring position line information of the content part needing user interaction in the text part;
in this embodiment, after performing the step S4-3, the method further includes: extracting a content part needing user interaction in the text part from the CDN server; and caching the position line information corresponding to the content part needing user interaction in the text part to a storage server corresponding to the original loading file.
By identifying whether the content needing to be loaded by the original loading mode exists in the text part, the content needing to be loaded by the original loading mode is guaranteed to be transferred from the CDN to the storage server corresponding to the original loading file when the content needing to be loaded by the original loading mode exists in the text part, the content parts loaded by different loading modes are guaranteed to be separated, and the text to be loaded corresponding to the different loading modes can be positioned quickly when the page is loaded.
S4-4, extracting the content part needing to be subjected to user interaction according to the position line information, and loading the content part needing to be subjected to user interaction to the target page from a storage server corresponding to the original loading file by adopting the original loading mode;
in this embodiment, before performing the step S4-4, the method further includes: judging whether the article publisher submits a text content loading instruction or not according to the monitoring component; if the text content loading instruction is submitted by the article publisher, judging whether the condition of simultaneously executing the step S4-4 is met when initializing the target page according to the preloading rule; if yes, step S4-4 is executed simultaneously when initializing the target page.
In this embodiment, the preloading rule includes: whether the target page of the browsing user corresponding to the article publisher is an APP home page, whether the browsing user stays on the target page for more than 1 second, whether the article display cards in the target page are all displayed, whether the current network environment is a wi f i environment, and whether the interest labels corresponding to the article display cards in the target page are the interest labels of the browsing user.
In this embodiment, if the target page is an APP home page, the browsing user stays on the target page for more than 1 second, the article display cards in the target page are all displayed, the current network environment is a wi f i environment, and the interest tag corresponding to the article display cards in the target page is the interest tag of the browsing user, then the condition that step S4-4 is executed simultaneously when initializing the target page is satisfied.
Judging through a pre-set pre-loading rule, if the content part to be loaded, which needs to be subjected to user interaction, in the article detail page meets the pre-loading rule, pre-loading the content part to be subjected to user interaction to the target page along with JS, CSS and other page resources during initialization, and compared with the existing article detail page which uses a pure H5 page loading mode, the pre-loading mode is used, so that the loading step is simplified, and meanwhile, the content part to be subjected to user interaction is loaded in a native loading mode, so that the loading speed is faster, the loading time is saved, and good user experience is ensured.
Step S4-5, obtaining position line information of the content part which does not need to be interacted with by the user in the text part, extracting the content part which does not need to be interacted with by the user according to the position line information, and loading the content part which does not need to be interacted with by the user to the target page from the CDN server by adopting a preset H5 page loading mode.
The text content edited by the article publisher on the text editing page is obtained; identifying a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page; loading the head part and the tail part to a target page by adopting a preset original loading mode, and completing page rendering of the head part and the tail part; and selecting a preset loading mode according to preset judging conditions to load the text part to a target page, and finishing loading the detail page of the whole article. According to the method and the device, when the method and the device are initialized, the part, the head part and the tail part, which need to be subjected to user interaction, in the text are subjected to primary loading, the part, which does not need to be subjected to user interaction, in the text is subjected to different types of loading in an H5 loading mode, so that the loading speed of the detailed pages of the article is improved to a certain extent, and the user experience is ensured.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Art i f i c i a l I nte l l i gence, A I) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and expand human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
According to the method and the device, in an operation/interaction system corresponding to the loading of the article detail page, an artificial intelligence mode is adopted, a primary loading mode is adopted for the part, the head part and the tail part needing user interaction in the text during initialization, an H5 loading mode is adopted for the part needing no user interaction in the text, different types of loading is carried out, loading speed of the article detail page can be improved to a certain extent, and user experience is guaranteed.
With further reference to fig. 4, as an implementation of the method shown in fig. 2, the application provides an embodiment of an article detail page loading device based on static resource separation, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device is specifically applicable to various electronic devices.
As shown in fig. 4, the article detail page loading device 400 based on static resource separation according to this embodiment includes: a text content acquisition module 401, a content classification identification module 402, a native loading module 403, and an optional loading module 404. Wherein:
a text content obtaining module 401, configured to obtain text content edited by an article publisher on a text editing page;
a content classification recognition module 402, configured to recognize a head portion, a body portion, and a tail portion in the text content according to a differential object preset in the text editing page, where the differential object includes at least a first differential object, a second differential object, and a third differential object, the first differential object corresponds to the head portion in the text content, the second differential object corresponds to the body portion in the text content, and the third differential object corresponds to the tail portion in the text content;
The native loading module 403 is configured to load the head portion and the tail portion to a target page by adopting a preset native loading manner, and complete page rendering of the head portion and the tail portion, where the native loading manner includes an Andr I od native loading manner or an I OS native loading manner;
and the selectable loading module 404 is configured to select a preset loading mode according to a preset judging condition to load the text part to the target page, so as to complete loading of the whole article detail page.
With continued reference to fig. 5, in some embodiments of the present application, the article detail page loading apparatus 400 based on static resource separation further includes a pre-load determination module 405, where the pre-load determination module 405 includes a first determination unit 4051 and a second determination unit 4052, where,
a first judging unit 4051, configured to judge, according to a preset monitoring component, whether the article publisher submits a text content loading instruction; if the article publisher submits a text content loading instruction, judging whether the condition of executing the step S3 simultaneously is met when initializing the target page according to a preset preloading rule; if yes, step S3 is executed simultaneously when initializing the target page.
A second judging unit 4052, configured to judge, according to the monitoring component, whether the article publisher submits a text content loading instruction; if the text content loading instruction is submitted by the article publisher, judging whether the condition of simultaneously executing the step S4-4 is met when initializing the target page according to the preloading rule; if yes, step S4-4 is executed simultaneously when initializing the target page.
In some specific embodiments of the present application, the article detail page loading device 400 based on static resource separation further includes a distinguishing and saving module, where the distinguishing and saving module is configured to screen the body part, the head part, and the tail part from the text editing page according to the distinguishing object after executing step S2; the text part is transferred to a preset CDN server; and transferring the head part and the tail part into a storage server corresponding to a preset original loading file.
In some embodiments of the present application, the article detail page loading device 400 based on static resource separation further includes a dump adjustment module, where the dump adjustment module is configured to extract, after executing the step S4-3, a content portion to be interacted with by a user in the text portion from the CDN server; and caching the position line information corresponding to the content part needing user interaction in the text part to a storage server corresponding to the original loading file.
The text content edited by the article publisher on the text editing page is obtained; identifying a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page; loading the head part and the tail part to a target page by adopting a preset original loading mode, and completing page rendering of the head part and the tail part; and selecting a preset loading mode according to preset judging conditions to load the text part to a target page, and finishing loading the detail page of the whole article. According to the method and the device, when the method and the device are initialized, the part, the head part and the tail part, which need to be subjected to user interaction, in the text are subjected to primary loading, the part, which does not need to be subjected to user interaction, in the text is subjected to different types of loading in an H5 loading mode, so that the loading speed of the detailed pages of the article is improved to a certain extent, and the user experience is ensured.
Those skilled in the art will appreciate that implementing all or part of the above described embodiment methods may be accomplished by computer readable instructions, stored on a computer readable storage medium, that the program when executed may comprise the steps of embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-On-y Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 6, fig. 6 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 6 comprises a memory 6a, a processor 6b, a network interface 6c communicatively connected to each other via a system bus. It should be noted that only a computer device 6 having components 6a-6c is shown in the figures, but it should be understood that not all of the illustrated components need be implemented, and that more or fewer components may alternatively be implemented. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (App l I cat I on Spec I f I C I ntegrated Ci rcu it, AS ic), a programmable gate array (Fi e l d-Programmab l e Gate Array, FPGA), a digital processor (Di g ita l Si gna l Processor, DSP), an embedded device, and the like.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 6a includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 6a may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 6a may also be an external storage device of the computer device 6, such as a plug-in hard disk, a smart memory Card (Smart Med i a Card, SMC), a secure digital (Secure D i gi ta l, SD) Card, a flash memory Card (F1 ash Card) or the like, which are provided on the computer device 6. Of course, the memory 6a may also comprise both an internal memory unit of the computer device 6 and an external memory device. In this embodiment, the memory 6a is typically used to store an operating system and various application software installed on the computer device 6, such as computer readable instructions of an article detail page loading method based on static resource separation. Further, the memory 6a may also be used to temporarily store various types of data that have been output or are to be output.
The processor 6b may be a central processing unit (Centra l Process i ng Un i t, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 6b is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 6b is configured to execute computer readable instructions stored in the memory 6a or process data, for example, execute computer readable instructions of the article detail page loading method based on static resource separation.
The network interface 6c may comprise a wireless network interface or a wired network interface, which network interface 6c is typically used to establish a communication connection between the computer device 6 and other electronic devices.
The embodiment provides a computer device, which belongs to the technical field of financial science and technology. The text content edited by the article publisher on the text editing page is obtained; identifying a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page; loading the head part and the tail part to a target page by adopting a preset original loading mode, and completing page rendering of the head part and the tail part; and selecting a preset loading mode according to preset judging conditions to load the text part to a target page, and finishing loading the detail page of the whole article. According to the method and the device, when the method and the device are initialized, the part, the head part and the tail part, which need to be subjected to user interaction, in the text are subjected to primary loading, the part, which does not need to be subjected to user interaction, in the text is subjected to different types of loading in an H5 loading mode, so that the loading speed of the detailed pages of the article is improved to a certain extent, and the user experience is ensured.
The present application also provides another embodiment, namely, a computer readable storage medium, where computer readable instructions are stored, where the computer readable instructions are executable by a processor, so that the processor performs the steps of the article detail page loading method based on static resource separation as described above.
The embodiment provides a computer readable storage medium, which belongs to the technical field of financial science and technology. The text content edited by the article publisher on the text editing page is obtained; identifying a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page; loading the head part and the tail part to a target page by adopting a preset original loading mode, and completing page rendering of the head part and the tail part; and selecting a preset loading mode according to preset judging conditions to load the text part to a target page, and finishing loading the detail page of the whole article. According to the method and the device, when the method and the device are initialized, the part, the head part and the tail part, which need to be subjected to user interaction, in the text are subjected to primary loading, the part, which does not need to be subjected to user interaction, in the text is subjected to different types of loading in an H5 loading mode, so that the loading speed of the detailed pages of the article is improved to a certain extent, and the user experience is ensured.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (10)

1. The article detail page loading method based on static resource separation is characterized by comprising the following steps:
step S1, acquiring text content edited by an article publisher on a text editing page;
step S2, recognizing a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page, wherein the distinguishing object at least comprises a first distinguishing object, a second distinguishing object and a third distinguishing object, the first distinguishing object corresponds to the head part in the text content, the second distinguishing object corresponds to the body part in the text content, and the third distinguishing object corresponds to the tail part in the text content;
step S3, loading the head part and the tail part to a target page by adopting a preset native loading mode, and completing page rendering of the head part and the tail part, wherein the native loading mode comprises an android native loading mode or an I OS native loading mode;
and S4, selecting a preset loading mode according to preset judging conditions to load the text part to the target page, and finishing loading of the detail page of the whole article.
2. The method for loading the article detail page based on the static resource separation according to claim 1, wherein the executing step of the step S1 specifically includes:
and acquiring the text content edited by the text editing page in a POST request mode in AJAX.
3. The method for loading the article detail page based on the static resource separation according to claim 1, wherein the condition that the step S3 is executed simultaneously when initializing the target page includes that the target page is an APP top page, the browsing user stays at the target page for more than 1 second, the article display cards in the target page are all displayed, the current network environment is a wifi environment, the interest tag corresponding to the article display cards in the target page is an interest tag of the browsing user, and before executing the step S3, the method further includes:
judging whether the article publisher submits a text content loading instruction or not according to a preset monitoring component;
if the article publisher submits a text content loading instruction, judging whether the condition of executing the step S3 simultaneously is met when initializing the target page according to a preset preloading rule;
if yes, step S3 is executed simultaneously when initializing the target page.
4. The article detail page loading method based on static resource separation of claim 3, further comprising, after performing step S2:
screening the text part, the head part and the tail part from the text editing page according to the distinguishing object;
the text part is transferred to a preset CDN server;
and transferring the head part and the tail part into a storage server corresponding to a preset original loading file.
5. The method for loading the article detail page based on the static resource separation according to claim 4, wherein the executing step of the step S4 specifically includes:
s4-1, acquiring a page tag corresponding to the text part on the text editing page;
step S4-2, identifying the content part needing to be subjected to user interaction and the content part needing not to be subjected to user interaction in the text part according to the page tag;
s4-3, acquiring position line information of the content part needing user interaction in the text part;
s4-4, extracting the content part needing to be subjected to user interaction according to the position line information, and loading the content part needing to be subjected to user interaction to the target page from a storage server corresponding to the original loading file by adopting the original loading mode;
Step S4-5, obtaining position line information of the content part which does not need to be interacted with by the user in the text part, extracting the content part which does not need to be interacted with by the user according to the position line information, and loading the content part which does not need to be interacted with by the user to the target page from the CDN server by adopting a preset H5 page loading mode.
6. The static resource separation-based article detail page loading method of claim 5, further comprising, after performing step S4-3:
extracting a content part needing user interaction in the text part from the CDN server;
and caching the position line information corresponding to the content part needing user interaction in the text part to a storage server corresponding to the original loading file.
7. The method for loading an article detail page based on static resource separation according to claim 5, wherein the condition that the step S4-4 is executed simultaneously when initializing the target page includes that the target page is an APP top page, a browsing user stays at the target page for more than 1 second, the article display cards in the target page are all displayed, the current network environment is a wifi environment, and the interest tag corresponding to the article display cards in the target page is an interest tag of the browsing user, and before executing the step S4-4, the method further includes:
Judging whether the article publisher submits a text content loading instruction or not according to the monitoring component;
if the text content loading instruction is submitted by the article publisher, judging whether the condition of simultaneously executing the step S4-4 is met when initializing the target page according to the preloading rule;
if yes, step S4-4 is executed simultaneously when initializing the target page.
8. An article detail page loading device based on static resource separation, which is characterized by comprising:
the text content acquisition module is used for acquiring text content edited by the article publisher on the text editing page;
the content classification recognition module is used for recognizing a head part, a body part and a tail part in the text content according to a distinguishing object preset in the text editing page, wherein the distinguishing object at least comprises a first distinguishing object, a second distinguishing object and a third distinguishing object, the first distinguishing object corresponds to the head part in the text content, the second distinguishing object corresponds to the body part in the text content, and the third distinguishing object corresponds to the tail part in the text content;
the native loading module is used for loading the head part and the tail part to the target page by adopting a preset native loading mode to finish page rendering of the head part and the tail part, wherein the native loading mode comprises an android native loading mode or an I OS native loading mode;
And the selectable loading module is used for selecting a preset loading mode according to preset judging conditions to load the text part to the target page, so that the loading of the whole article detail page is completed.
9. A computer device comprising a memory having stored therein computer readable instructions which when executed implement the steps of the article detail page loading method based on static resource separation of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the article detail page loading method based on static resource separation as claimed in any of claims 1 to 7.
CN202211568714.3A 2022-12-08 2022-12-08 Article detail page loading method based on static resource separation and related equipment thereof Pending CN116069408A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211568714.3A CN116069408A (en) 2022-12-08 2022-12-08 Article detail page loading method based on static resource separation and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211568714.3A CN116069408A (en) 2022-12-08 2022-12-08 Article detail page loading method based on static resource separation and related equipment thereof

Publications (1)

Publication Number Publication Date
CN116069408A true CN116069408A (en) 2023-05-05

Family

ID=86169113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211568714.3A Pending CN116069408A (en) 2022-12-08 2022-12-08 Article detail page loading method based on static resource separation and related equipment thereof

Country Status (1)

Country Link
CN (1) CN116069408A (en)

Similar Documents

Publication Publication Date Title
CN112685565B (en) Text classification method based on multi-mode information fusion and related equipment thereof
CN117271121A (en) Task processing progress control method, device, equipment and storage medium thereof
CN117234505A (en) Interactive page generation method, device, equipment and storage medium thereof
CN117195886A (en) Text data processing method, device, equipment and medium based on artificial intelligence
CN116483425A (en) Micro-service gray level edition issuing method, device, equipment and storage medium thereof
CN116069408A (en) Article detail page loading method based on static resource separation and related equipment thereof
CN116127100A (en) Knowledge graph construction method, device, equipment and storage medium thereof
CN115562662A (en) Application page creating method and device, computer equipment and storage medium
CN116991442A (en) Interface upgrading method, device, equipment and storage medium thereof
CN118426883A (en) Page display method, device, equipment and storage medium thereof
CN114510916B (en) Template loading method and device, computer equipment and storage medium
CN115828846A (en) Display page font processing method and related equipment thereof
CN117632331A (en) Data display method, device, computer equipment and storage medium
CN117880274A (en) File uploading method and device, computer equipment and storage medium
CN118227491A (en) Method and device for generating test cases, computer equipment and storage medium
CN117874073A (en) Search optimization method, device, equipment and storage medium thereof
CN116776838A (en) Text processing method, device, computer equipment and storage medium
CN117850842A (en) Plug-in updating method, device, equipment and storage medium thereof
CN116821298A (en) Keyword automatic identification method applied to application information and related equipment
CN116775187A (en) Data display method, device, computer equipment and storage medium
CN118295908A (en) Commodity data processing method, commodity data processing device, computer equipment and storage medium
CN118113376A (en) Application program starting method for controlling miner lamp and related equipment
CN117591190A (en) Application data loading optimization method, device, equipment and storage medium thereof
CN117806738A (en) Service scheduling method, device, equipment and storage medium based on micro-link model
CN116932963A (en) Screenshot processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination