CN113141407A - Page resource loading method and device and electronic equipment - Google Patents

Page resource loading method and device and electronic equipment Download PDF

Info

Publication number
CN113141407A
CN113141407A CN202110447504.8A CN202110447504A CN113141407A CN 113141407 A CN113141407 A CN 113141407A CN 202110447504 A CN202110447504 A CN 202110447504A CN 113141407 A CN113141407 A CN 113141407A
Authority
CN
China
Prior art keywords
resource
volume
resources
page
volume data
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.)
Granted
Application number
CN202110447504.8A
Other languages
Chinese (zh)
Other versions
CN113141407B (en
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.)
Shanghai Qiyue Information Technology Co Ltd
Original Assignee
Shanghai Qiyue Information Technology Co 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 Shanghai Qiyue Information Technology Co Ltd filed Critical Shanghai Qiyue Information Technology Co Ltd
Priority to CN202110447504.8A priority Critical patent/CN113141407B/en
Publication of CN113141407A publication Critical patent/CN113141407A/en
Application granted granted Critical
Publication of CN113141407B publication Critical patent/CN113141407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification provides a page resource loading method, which includes acquiring resource link information to be loaded in a page, creating and executing an asynchronous task to acquire volume data of a resource pointed by a resource link, comparing the volume data of the resource pointed by the resource link with a preset resource volume threshold to obtain a comparison result, and executing a resource loading rule adapted to the comparison result to acquire and load the resource. The volume data of the resources pointed by the links are acquired by pre-establishing the asynchronous tasks, the execution of the page function is not influenced, the resources are acquired and loaded by selecting the adaptive resource loading rule, the influence of improving the volume data of the resources is considered, and therefore the resource loading performance of the page is improved.

Description

Page resource loading method and device and electronic equipment
Technical Field
The present application relates to the field of internet, and in particular, to a page resource loading method and apparatus, and an electronic device.
Background
When loading page resources, the loading mode of the page resources is often preset, and when the loading mode is set, the loading mode is fixed, however, because the volumes of the page resources are different, the loading mode is not suitable, and the resource loading performance is limited.
Therefore, it is necessary to provide a new method for improving the resource loading performance of the page.
Disclosure of Invention
The embodiment of the specification provides a page resource loading method and device and electronic equipment, which are used for improving the resource loading performance of a page.
An embodiment of the present specification provides a page resource loading method, including:
acquiring resource link information to be loaded in a page;
creating and executing an asynchronous task to acquire volume data of the resource pointed by the resource link;
and comparing the volume data of the resource pointed by the resource link with a preset resource volume threshold to obtain a comparison result, and executing a resource loading rule adapted to the comparison result to obtain and load the resource.
Optionally, the executing a resource loading rule adapted to the comparison result to obtain and load the resource includes:
if the volume data of the resources is larger than the threshold value, monitoring the state of the browser, acquiring the resources according to the resource link information and storing the resources in the browser locally in a silent state period of the browser, and loading the stored resources into a resource container after the resource container is created.
Optionally, the executing a resource loading rule adapted to the comparison result to obtain and load the resource further includes:
and if the volume data of the resources are larger than the threshold value, selecting a target network transmission route with the transmission speed at the head from the plurality of current network transmission routes after triggering the resource loading task, and acquiring the resources from the target network transmission route.
Optionally, the method further comprises:
the resource link information is tagged with volumetric data of the resource.
Optionally, the acquiring the volume data of the resource pointed by the resource link includes:
querying a resource volume management system for volume data for the resource.
Optionally, the acquiring the volume data of the resource pointed by the resource link includes:
and extracting volume data of the resource from the resource header information returned by the server.
Optionally, the method further comprises:
and reporting the volume comparison result of the resources to a resource volume management system.
Optionally, the creating and executing an asynchronous task includes:
and besides the task of performing event monitoring on the current page, a resource volume monitoring task is created.
Optionally, the resource is a picture resource, and the volume data of the resource is a picture data volume.
An embodiment of the present specification further provides a page resource loading apparatus, including:
the link acquisition module is used for acquiring resource link information to be loaded in a page;
the volume acquisition module is used for creating and executing an asynchronous task to acquire volume data of the resource pointed by the resource link;
and the loading module is used for comparing the volume data of the resource pointed by the resource link with a preset resource volume threshold value to obtain a comparison result, and executing a resource loading rule adapted to the comparison result to acquire and load the resource.
Optionally, the executing a resource loading rule adapted to the comparison result to obtain and load the resource includes:
if the volume data of the resources is larger than the threshold value, monitoring the state of the browser, acquiring the resources according to the resource link information and storing the resources in the browser locally in a silent state period of the browser, and loading the stored resources into a resource container after the resource container is created.
Optionally, the executing a resource loading rule adapted to the comparison result to obtain and load the resource further includes:
and if the volume data of the resources are larger than the threshold value, selecting a target network transmission route with the transmission speed at the head from the plurality of current network transmission routes after triggering the resource loading task, and acquiring the resources from the target network transmission route.
Optionally, the method further comprises:
the resource link information is tagged with volumetric data of the resource.
Optionally, the acquiring the volume data of the resource pointed by the resource link includes:
querying a resource volume management system for volume data for the resource.
Optionally, the acquiring the volume data of the resource pointed by the resource link includes:
and extracting volume data of the resource from the resource header information returned by the server.
Optionally, the method further comprises:
and reporting the volume comparison result of the resources to a resource volume management system.
Optionally, the creating and executing an asynchronous task includes:
and besides the task of performing event monitoring on the current page, a resource volume monitoring task is created.
Optionally, the resource is a picture resource, and the volume data of the resource is a picture data volume.
An embodiment of the present specification further provides an electronic device, where the electronic device includes:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform any of the methods described above.
The present specification also provides a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement any of the above methods.
In various technical solutions provided in the embodiments of the present description, resource link information to be loaded in a page is acquired, an asynchronous task is created and executed to acquire volume data of a resource pointed by a resource link, the volume data of the resource pointed by the resource link is compared with a preset resource volume threshold to obtain a comparison result, and a resource loading rule adapted to the comparison result is executed to acquire and load the resource. The volume data of the resources pointed by the links are acquired by pre-establishing the asynchronous tasks, the execution of the page function is not influenced, the resources are acquired and loaded by selecting the adaptive resource loading rule, the influence of improving the volume data of the resources is considered, and therefore the resource loading performance of the page is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram illustrating a page resource loading method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a page resource loading apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
Detailed Description
Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. The same reference numerals denote the same or similar elements, components, or parts in the drawings, and thus their repetitive description will be omitted.
Features, structures, characteristics or other details described in a particular embodiment do not preclude the fact that the features, structures, characteristics or other details may be combined in a suitable manner in one or more other embodiments in accordance with the technical idea of the invention.
In describing particular embodiments, the present invention has been described with reference to features, structures, characteristics or other details that are within the purview of one skilled in the art to provide a thorough understanding of the embodiments. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific features, structures, characteristics, or other details.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The term "and/or" and/or "includes all combinations of any one or more of the associated listed items.
Fig. 1 is a schematic diagram of a page resource loading method provided in an embodiment of the present specification, where the page resource loading method may include:
s101: and acquiring resource link information to be loaded in the page.
In the embodiment of the present specification, the page running state of the browser can be monitored, and when it is monitored that the page of the browser is in a silent state, resource link information to be loaded in the page is acquired. In this way, it is possible to reduce interference with the original function of the page and to realize the processing task relating to the resource volume data as an additional function.
The silent state refers to the number of tasks currently executed by the page being less than a threshold, or may also refer to the number of tasks currently performing response processing on the user operation information being less than a threshold, and the silent state is a relative state, and specifically may refer to: the page is in a state when it is open and the user operation is not listened to, which may also be referred to as an idle state.
In this embodiment of the present specification, a function to be recalled may be preset, and the function is used to acquire resource link information to be loaded in a page in a callback function manner when it is monitored that the page is in a silent state, and create an asynchronous task to acquire volume data of a resource pointed by a resource link in the page.
Therefore, the callback function may be a callback function of one task, or may be a callback function of multiple tasks, which is sequentially called back after the multiple tasks are executed, for example, a function for executing the callback to acquire resource link information to be loaded in a page when it is monitored that the page is in a silent state is executed, and after the resource link information to be loaded in the page is acquired, if it is monitored that the page is still in the silent state, a function for acquiring volume data of a resource to which a resource link points is called back, which is not specifically described or limited herein.
S102: and creating and executing an asynchronous task to acquire volume data of the resource pointed by the resource link.
Here, the asynchronous task is a task of acquiring volume data of a resource to which the resource link points.
Asynchronous means asynchronous with the task executed by the original functional component of the page, and interference to the original functional component of the page is reduced by creating an asynchronous task.
Therefore, in this embodiment, the creating and executing an asynchronous task may include:
and besides the task of performing event monitoring on the current page, a resource volume monitoring task is created.
The data volume difference of the picture resources in the page is large, so that the excessive load of the page resources on the loan and the load time can be avoided by selecting a proper loading mode for the picture page resources.
Therefore, in the embodiment of the present specification, the resource is a picture resource, and the volume data of the resource is a picture data amount.
In practical application, a page may have multiple resources, so that the volumes of the multiple resources in the page can be determined one by one, and in order to avoid repeated calculation or omission, the resources with known volumes can be marked.
Therefore, in the embodiment of the present specification, the method may further include:
the resource link information is tagged with volumetric data of the resource.
In order to achieve the decoupling of functions, a special resource volume management system can be set up to achieve management of information and tasks related to resource volumes, such as querying resource mention data.
Therefore, in this embodiment of the present specification, the acquiring the volume data of the resource to which the resource link points may include:
querying a resource volume management system for volume data for the resource.
In consideration of the practical application, many resources are often stored in the server side, so that the server side can calculate the actual volume of the resources, and therefore, the volume data carried in the response information can be determined according to the response information of the server to the request by sending the request to the server.
Therefore, in this embodiment of the present specification, the acquiring the volume data of the resource to which the resource link points may include:
and extracting volume data of the resource from the resource header information returned by the server.
Of course, if the computed volume data is obtained from the server, it can also be uploaded to the resource volume management system.
Of course, by acquiring volumetric data of the resource, in fact quantitative information is obtained, and in order to further simplify the processing, we can directly process the data in a qualitative way instead of a quantitative way.
For example, in the embodiment of the present specification, the method may further include:
and reporting the volume comparison result of the resources to a resource volume management system.
Thus, the volume data of the resource may refer to the size comparison result of the volume of the resource with the threshold, and then the appropriate resource loading rule may be selected according to this comparison result.
Of course, a rule for performing callback in a cross-domain condition may also be set to adapt to the cross-domain condition of the resource, which is not specifically described herein.
S103: and comparing the volume data of the resource pointed by the resource link with a preset resource volume threshold to obtain a comparison result, and executing a resource loading rule adapted to the comparison result to obtain and load the resource.
The method comprises the steps of acquiring resource link information to be loaded in a page, creating and executing an asynchronous task to acquire volume data of a resource pointed by a resource link, comparing the volume data of the resource pointed by the resource link with a preset resource volume threshold to obtain a comparison result, and executing a resource loading rule adapted to the comparison result to acquire and load the resource. The volume data of the resources pointed by the links are acquired by pre-establishing the asynchronous tasks, the execution of the page function is not influenced, the resources are acquired and loaded by selecting the adaptive resource loading rule, the influence of improving the volume data of the resources is considered, and therefore the resource loading performance of the page is improved.
In this embodiment of the present specification, the executing a resource loading rule adapted to the comparison result to obtain and load the resource may include:
if the volume data of the resources is larger than the threshold value, monitoring the state of the browser, acquiring the resources according to the resource link information and storing the resources in the browser locally in a silent state period of the browser, and loading the stored resources into a resource container after the resource container is created.
This may mean in practical application that, if the resource data volume of a certain picture is large, in order to prevent that it takes too long to acquire the resource when a subsequent user triggers to access the picture, we may extract the picture resource acquired in advance when the page is idle, and perform pre-storage. Therefore, when the user triggers to access the picture, the picture can be directly loaded from the browser locally, and the time consumption of transmission is shortened.
The resource container herein refers to a resource container in the next page, and the specific form of the resource container may be a page element frame, or may be a tool for editing and processing pictures and reverse lines, such as a Canvas (an image editing tool), which is not specifically described and limited herein.
In this embodiment of this specification, the executing a resource loading rule adapted to the comparison result to obtain and load the resource may further include:
and if the volume data of the resources are larger than the threshold value, selecting a target network transmission route with the transmission speed at the head from the plurality of current network transmission routes after triggering the resource loading task, and acquiring the resources from the target network transmission route.
The browser can be preset with a plurality of network transmission routes, and the transmission speed of different network transmission routes can fluctuate and the fluctuation characteristics can be different, so that the fact that the network transmission routes are switched can be of practical significance.
Of course, if some of the volume data of the plurality of resources in one page is larger than the threshold value and some is smaller than the threshold value, the transmission of the resources can be performed by using different network transmission routes respectively.
In this embodiment of the present specification, we may identify a specific type of resource, select a loading resource for the specific type of resource, and during specific identification, use a type identifier of the resource, such as a character string for describing a type of the resource.
Fig. 2 is a schematic structural diagram of a page resource loading apparatus provided in an embodiment of this specification, where the apparatus may include:
the link obtaining module 201 obtains resource link information to be loaded in a page;
the volume acquisition module 202 is used for creating and executing an asynchronous task to acquire volume data of the resource pointed by the resource link;
the loading module 203 compares the volume data of the resource pointed by the resource link with a preset resource volume threshold to obtain a comparison result, and executes a resource loading rule adapted to the comparison result to acquire and load the resource.
In an embodiment of this specification, the executing a resource loading rule adapted to the comparison result to obtain and load the resource includes:
if the volume data of the resources is larger than the threshold value, monitoring the state of the browser, acquiring the resources according to the resource link information and storing the resources in the browser locally in a silent state period of the browser, and loading the stored resources into a resource container after the resource container is created.
In an embodiment of this specification, the executing a resource loading rule adapted to the comparison result to obtain and load the resource further includes:
and if the volume data of the resources are larger than the threshold value, selecting a target network transmission route with the transmission speed at the head from the plurality of current network transmission routes after triggering the resource loading task, and acquiring the resources from the target network transmission route.
Of course, if some of the volume data of the plurality of resources in one page is larger than the threshold value and some is smaller than the threshold value, the transmission of the resources can be performed by using different network transmission routes respectively.
In this embodiment of the present specification, we may identify a specific type of resource, select a loading resource for the specific type of resource, and during specific identification, use a type identifier of the resource, such as a character string for describing a type of the resource.
In the embodiment of this specification, still include:
the resource link information is tagged with volumetric data of the resource.
In an embodiment of the present specification, the acquiring volumetric data of a resource to which the resource link points includes:
querying a resource volume management system for volume data for the resource.
In an embodiment of the present specification, the acquiring volumetric data of a resource to which the resource link points includes:
and extracting volume data of the resource from the resource header information returned by the server.
Of course, if the computed volume data is obtained from the server, it can also be uploaded to the resource volume management system.
Of course, by acquiring volumetric data of the resource, in fact quantitative information is obtained, and in order to further simplify the processing, we can directly process the data in a qualitative way instead of a quantitative way.
For example, in the embodiment of the present specification, the method may further include:
and reporting the volume comparison result of the resources to a resource volume management system.
Thus, the volume data of the resource may refer to the size comparison result of the volume of the resource with the threshold, and then the appropriate resource loading rule may be selected according to this comparison result.
In an embodiment of the present specification, the creating and executing an asynchronous task includes:
and besides the task of performing event monitoring on the current page, a resource volume monitoring task is created.
In an embodiment of the present specification, the resource is a picture resource, and the volume data of the resource is a picture data volume.
The device acquires the resource link information to be loaded in a page, creates and executes an asynchronous task to acquire the volume data of the resource pointed by the resource link, compares the volume data of the resource pointed by the resource link with a preset resource volume threshold to obtain a comparison result, and executes a resource loading rule adapted to the comparison result to acquire and load the resource. The volume data of the resources pointed by the links are acquired by pre-establishing the asynchronous tasks, the execution of the page function is not influenced, the resources are acquired and loaded by selecting the adaptive resource loading rule, the influence of improving the volume data of the resources is considered, and therefore the resource loading performance of the page is improved.
Based on the same inventive concept, the embodiment of the specification further provides the electronic equipment.
In the following, embodiments of the electronic device of the present invention are described, which may be regarded as specific physical implementations for the above-described embodiments of the method and apparatus of the present invention. Details described in the embodiments of the electronic device of the invention should be considered supplementary to the embodiments of the method or apparatus described above; for details which are not disclosed in embodiments of the electronic device of the invention, reference may be made to the above-described embodiments of the method or the apparatus.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 3, electronic device 300 is embodied in the form of a general purpose computing device. The components of electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one memory unit 320, a bus 330 connecting the various system components (including the memory unit 320 and the processing unit 310), a display unit 340, and the like.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned processing method section of the present specification. For example, the processing unit 310 may perform the steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache storage unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 300, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 300 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. Also, the electronic device 300 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. Network adapter 360 may communicate with other modules of electronic device 300 via bus 330. It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAI D systems, tape drives, and data backup storage systems, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments of the present invention described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. The computer program, when executed by a data processing apparatus, enables the computer readable medium to implement the above-described method of the invention, namely: such as the method shown in fig. 1.
Fig. 4 is a schematic diagram of a computer-readable medium provided in an embodiment of the present specification.
A computer program implementing the method shown in fig. 1 may be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components in embodiments in accordance with the invention may be implemented in practice using a general purpose data processing device such as a microprocessor or a Digital Signal Processor (DSP). The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
While the foregoing embodiments have described the objects, aspects and advantages of the present invention in further detail, it should be understood that the present invention is not inherently related to any particular computer, virtual machine or electronic device, and various general-purpose machines may be used to implement the present invention. The invention is not to be considered as limited to the specific embodiments thereof, but is to be understood as being modified in all respects, all changes and equivalents that come within the spirit and scope of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. A page resource loading method is characterized by comprising the following steps:
acquiring resource link information to be loaded in a page;
creating and executing an asynchronous task to acquire volume data of the resource pointed by the resource link;
and comparing the volume data of the resource pointed by the resource link with a preset resource volume threshold to obtain a comparison result, and executing a resource loading rule adapted to the comparison result to obtain and load the resource.
2. The method of claim 1, wherein executing the resource loading rule that is adapted to the comparison result to obtain and load the resource comprises:
if the volume data of the resources is larger than the threshold value, monitoring the state of the browser, acquiring the resources according to the resource link information and storing the resources in the browser locally in a silent state period of the browser, and loading the stored resources into a resource container after the resource container is created.
3. The method of any of claims 1-2, wherein the executing the resource loading rule that is adapted to the comparison result to obtain and load the resource further comprises:
and if the volume data of the resources are larger than the threshold value, selecting a target network transmission route with the transmission speed at the head from the plurality of current network transmission routes after triggering the resource loading task, and acquiring the resources from the target network transmission route.
4. The method according to any one of claims 1-3, further comprising:
the resource link information is tagged with volumetric data of the resource.
5. The method according to any one of claims 1-4, wherein said obtaining volumetric data of a resource to which the resource link points comprises:
querying a resource volume management system for volume data for the resource.
6. The method according to any one of claims 1-5, wherein said obtaining volumetric data of a resource to which the resource link points comprises:
and extracting volume data of the resource from the resource header information returned by the server.
7. The method according to any one of claims 1-6, further comprising:
and reporting the volume comparison result of the resources to a resource volume management system.
8. The method of any of claims 1-7, wherein creating and executing an asynchronous task comprises:
and besides the task of performing event monitoring on the current page, a resource volume monitoring task is created.
9. The method according to any one of claims 1-8, wherein the asset is a picture asset and the volumetric data of the asset is a picture data volume.
10. A page resource loading apparatus, comprising:
the link acquisition module is used for acquiring resource link information to be loaded in a page;
the volume acquisition module is used for creating and executing an asynchronous task to acquire volume data of the resource pointed by the resource link;
and the loading module is used for comparing the volume data of the resource pointed by the resource link with a preset resource volume threshold value to obtain a comparison result, and executing a resource loading rule adapted to the comparison result to acquire and load the resource.
11. An electronic device, wherein the electronic device comprises:
a processor; and the number of the first and second groups,
a memory storing computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-9.
12. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-9.
CN202110447504.8A 2021-04-25 2021-04-25 Page resource loading method and device and electronic equipment Active CN113141407B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110447504.8A CN113141407B (en) 2021-04-25 2021-04-25 Page resource loading method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110447504.8A CN113141407B (en) 2021-04-25 2021-04-25 Page resource loading method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113141407A true CN113141407A (en) 2021-07-20
CN113141407B CN113141407B (en) 2023-12-19

Family

ID=76811967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110447504.8A Active CN113141407B (en) 2021-04-25 2021-04-25 Page resource loading method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113141407B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093119A (en) * 2023-07-12 2023-11-21 荣耀终端有限公司 Application page switching method

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10191281A (en) * 1996-12-26 1998-07-21 Matsushita Electric Ind Co Ltd Digital broadcasting system
WO2001067285A2 (en) * 2000-03-03 2001-09-13 Merinta, Inc. Persistent portal for a browser
JP2003209870A (en) * 2002-01-16 2003-07-25 Nec Corp Information distribution system, method thereof, information distribution server, and operation control program thereof
CN101763357A (en) * 2008-11-13 2010-06-30 北京搜狗科技发展有限公司 Method and system for browser to load internet resources
US20100211955A1 (en) * 2006-09-07 2010-08-19 Cwi Controlling 32/64-bit parallel thread execution within a microsoft operating system utility program
CN102438045A (en) * 2011-12-07 2012-05-02 深圳市深信服电子科技有限公司 Method and system for pre-fetching web page, and method for accessing web page
JP2013038739A (en) * 2011-08-11 2013-02-21 Pioneer Electronic Corp Communication control system, method, computer program, and recording medium
US20130073736A1 (en) * 2011-09-20 2013-03-21 Canon Kabushiki Kaisha Communication device, control method thereof and storage medium
CN103428276A (en) * 2013-07-30 2013-12-04 中国联合网络通信集团有限公司 Downloading method and device
CN104601691A (en) * 2015-01-13 2015-05-06 北京中交兴路车联网科技有限公司 Method and system for increasing loading speed of Web site resource
CN105187891A (en) * 2015-09-09 2015-12-23 上海微令信息科技有限公司 Transparent-browser-based video comment screen display system and method and device with system
JP2016152568A (en) * 2015-02-19 2016-08-22 カシオ計算機株式会社 Communication device, communication control method and program
CN108536850A (en) * 2018-04-16 2018-09-14 沈文策 A kind of method, apparatus, electronic equipment and storage medium preloading picture
CN111258736A (en) * 2020-01-17 2020-06-09 北京无限光场科技有限公司 Information processing method and device and electronic equipment
CN111538885A (en) * 2020-04-24 2020-08-14 腾讯音乐娱乐科技(深圳)有限公司 Page monitoring method and device, electronic equipment and storage medium
CN111695061A (en) * 2019-03-15 2020-09-22 北京京东尚科信息技术有限公司 Resource processing method and device, equipment and storage medium

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10191281A (en) * 1996-12-26 1998-07-21 Matsushita Electric Ind Co Ltd Digital broadcasting system
WO2001067285A2 (en) * 2000-03-03 2001-09-13 Merinta, Inc. Persistent portal for a browser
JP2003209870A (en) * 2002-01-16 2003-07-25 Nec Corp Information distribution system, method thereof, information distribution server, and operation control program thereof
US20100211955A1 (en) * 2006-09-07 2010-08-19 Cwi Controlling 32/64-bit parallel thread execution within a microsoft operating system utility program
CN101763357A (en) * 2008-11-13 2010-06-30 北京搜狗科技发展有限公司 Method and system for browser to load internet resources
JP2013038739A (en) * 2011-08-11 2013-02-21 Pioneer Electronic Corp Communication control system, method, computer program, and recording medium
US20130073736A1 (en) * 2011-09-20 2013-03-21 Canon Kabushiki Kaisha Communication device, control method thereof and storage medium
CN102438045A (en) * 2011-12-07 2012-05-02 深圳市深信服电子科技有限公司 Method and system for pre-fetching web page, and method for accessing web page
CN103428276A (en) * 2013-07-30 2013-12-04 中国联合网络通信集团有限公司 Downloading method and device
CN104601691A (en) * 2015-01-13 2015-05-06 北京中交兴路车联网科技有限公司 Method and system for increasing loading speed of Web site resource
JP2016152568A (en) * 2015-02-19 2016-08-22 カシオ計算機株式会社 Communication device, communication control method and program
CN105187891A (en) * 2015-09-09 2015-12-23 上海微令信息科技有限公司 Transparent-browser-based video comment screen display system and method and device with system
CN108536850A (en) * 2018-04-16 2018-09-14 沈文策 A kind of method, apparatus, electronic equipment and storage medium preloading picture
CN111695061A (en) * 2019-03-15 2020-09-22 北京京东尚科信息技术有限公司 Resource processing method and device, equipment and storage medium
CN111258736A (en) * 2020-01-17 2020-06-09 北京无限光场科技有限公司 Information processing method and device and electronic equipment
CN111538885A (en) * 2020-04-24 2020-08-14 腾讯音乐娱乐科技(深圳)有限公司 Page monitoring method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093119A (en) * 2023-07-12 2023-11-21 荣耀终端有限公司 Application page switching method

Also Published As

Publication number Publication date
CN113141407B (en) 2023-12-19

Similar Documents

Publication Publication Date Title
CN107609004B (en) Application program embedding method and device, computer equipment and storage medium
CN110781180B (en) Data screening method and data screening device
CN113792240A (en) Page loading method and device and electronic equipment
US20200387377A1 (en) Instruction fusion using dependence analysis
US11561850B1 (en) System and method for performing failure analysis on a computing system using a bayesian network
CN113141407A (en) Page resource loading method and device and electronic equipment
CN105094857A (en) Method and system used for loading applications
CN113312553A (en) Method and device for determining user label
CN109325069B (en) Service processing method, device and network equipment
EP3519964B1 (en) Electronic apparatus for recording debugging information and control method thereof
CN113495723B (en) Method, device and storage medium for calling functional component
CN112286514B (en) Method and device for configuring task flow and electronic equipment
CN114090514A (en) Log retrieval method and device for distributed system
CN111681093B (en) Method and device for displaying resource page and electronic equipment
CN112799797B (en) Task management method and device
CN111950770A (en) Method and device for managing resource return auxiliary strategy and electronic equipment
CN112597119A (en) Method and device for generating processing log and storage medium
CN112650502A (en) Batch processing task processing method and device, computer equipment and storage medium
CN113138807B (en) Method and device for executing multi-node service task and electronic equipment
CN111796993A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN110858240A (en) Front-end module loading method and device
CN111209064B (en) Resource display method and device and electronic equipment
CN116341633B (en) Model deployment method, device, equipment and storage medium
CN112311931B (en) Method and device for processing contact information at terminal and electronic equipment
CN112130862B (en) Method, apparatus, device and computer readable storage medium for generating package file

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
GR01 Patent grant
GR01 Patent grant