Method, device, server and storage medium for determining first screen loading resources

By filtering the requested resources of the page to be loaded layer by layer and determining the resources to be loaded on the first screen, the problem of cumbersome resource preloading and caching in the existing technology is solved, and the loading speed and accuracy are improved.

CN115202791BActive Publication Date: 2025-10-03SHENZHEN LEXIN SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210862811.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2025-10-03
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

When loading an H5 page in an APP environment, the existing technology has a cumbersome resource preloading and caching process, and cannot accurately determine the resource list loaded on the first screen, resulting in slow loading of resources on the first screen of the page.

Method used

By obtaining the requested resources of the page to be loaded, performing field filtering and image filtering, determining the resources to be loaded on the first screen, and controlling the client to cache and load.

Benefits of technology

It achieves the maximum acquisition of page first screen loading resources, improves loading speed and accuracy, and reduces the time it takes for the client to load first screen resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115202791B_ABST
    Figure CN115202791B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, server and storage medium for determining first-screen loading resources. The method is applied to a server and includes: obtaining at least one requested resource of a page to be loaded during the page loading process; performing field filtering on each requested resource according to the resource information of each requested resource to obtain a first requested resource; after the page to be loaded is loaded, performing image filtering on the first requested resource whose image resource information has been loaded to obtain a second requested resource; and determining the first-screen loading resource of the page to be loaded according to the second requested resource, for controlling the client to cache and load the first-screen loading resource. The embodiment of the present invention improves the loading speed of the first-screen loading resource of the page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, server and storage medium for determining first screen loading resources. Background Art

[0002] When loading an H5 page in an APP (Application) environment, it is usually necessary to preload and cache resources for the page. Resource preloading and caching are usually done by manually generating a CDN (Content Delivery Network) link corresponding to the build product generated by packaging each page, and configuring the resource preloading cache based on the CDN link. This process is relatively cumbersome and cannot maximize the acquisition of the resource list loaded on the first screen of the page, that is, it cannot accurately determine the resource list loaded on the first screen, thereby reducing the speed of resource loading on the first screen of the page. Summary of the Invention

[0003] The present invention provides a method, device, server and storage medium for determining first-screen loading resources, so as to improve the loading speed of the first-screen loading resources of a page.

[0004] According to one aspect of the present invention, a method for determining resources to be loaded on the first screen is provided, which is applied to a server and includes:

[0005] Obtain at least one requested resource of the page to be loaded during the page loading process;

[0006] Performing field filtering on each requested resource according to resource information of each requested resource to obtain a first requested resource;

[0007] After the page to be loaded is loaded, filtering the first requested resource whose image resource information has been loaded to obtain a second requested resource;

[0008] According to the second requested resource, a first-screen loading resource of the to-be-loaded page is determined, and is used to control the client to cache and load the first-screen loading resource.

[0009] According to another aspect of the present invention, a device for determining resources to be loaded on the first screen is provided, which is applied to a server and includes:

[0010] A request resource acquisition module is used to acquire at least one request resource of a page to be loaded during the page loading process;

[0011] A first requested resource determination module, configured to perform field filtering on each requested resource according to resource information of each requested resource to obtain a first requested resource;

[0012] A second requested resource determination module is configured to, after the page to be loaded is loaded, perform image filtering on the first requested resource whose image resource information has been loaded to obtain a second requested resource;

[0013] The first screen loading resource determination module is used to determine the first screen loading resource of the page to be loaded according to the second request resource, and is used to control the client to cache and load the first screen loading resource.

[0014] According to another aspect of the present invention, a server is provided, comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining first screen loading resources according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining first screen loading resources according to any embodiment of the present invention when executed.

[0019] The embodiment of the present invention obtains at least one requested resource of the page to be loaded during the page loading process; performs field filtering on each requested resource according to the resource information of each requested resource to obtain a first requested resource; after the page to be loaded is loaded, performs image filtering on the first requested resource whose image resource information has been loaded to obtain a second requested resource; and determines the first screen loading resource of the page to be loaded according to the second requested resource, so as to control the client to cache and load the first screen loading resource. The above scheme achieves the maximum acquisition of the resources loaded on the first screen of the page by filtering the obtained request resources of the page to be loaded layer by layer, and can accurately determine the first screen loading resources, thereby reducing the speed at which the client loads the first screen resources of the page and improving the accuracy of the loaded first screen loading resources.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 This is a flowchart of a method for determining resources loaded on the first screen provided in accordance with the first embodiment of the present invention;

[0023] Figure 2 This is a flowchart of a method for determining resources loaded on the first screen provided in accordance with the second embodiment of the present invention;

[0024] Figure 3 This is a structural diagram of a device for determining resources loaded on the first screen provided in accordance with a third embodiment of the present invention;

[0025] Figure 4 4 is a schematic diagram of the structure of a server that implements the method for determining resources loaded on the first screen according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Example 1

[0029] Figure 1A flowchart of a method for determining first-screen loading resources is provided for the first embodiment of the present invention. This embodiment is applicable to the case of determining first-screen loading resources for each page to be loaded. The method can be executed by a first-screen loading resource determination device, which can be implemented in the form of hardware and / or software. The first-screen loading resource determination device can be configured in a server. Figure 1 Shown, including:

[0030] S110: Obtain at least one requested resource of a page to be loaded during the page loading process.

[0031] The page to be loaded can be any page that has a requirement to load resources on the first screen. Requested resources can be various resources that need to be loaded on the page. For example, requested resources can include dynamically loaded resources and statically loaded resources. For example, statically loaded resources can include images, fonts, JS (JavaScript) description files, and CSS (Cascading Style Sheets) description files.

[0032] S120: Perform field filtering on each requested resource according to resource information of each requested resource to obtain a first requested resource.

[0033] Resource information can be information used to describe the resource type and resource characteristics of the requested resource. It should be noted that during the page loading process, the fields contained in each requested resource corresponding to different resource types are different. Exemplarily, each requested resource can be subjected to field parsing to obtain resource information corresponding to each requested resource containing field information; the requested resources whose field information does not meet the preset field conditions are filtered. The field conditions can be pre-set by relevant technical personnel. For example, the field conditions can be to retain request resources with fields such as page links, resource types and status codes. Optionally, the filtered request resources can be temporarily stored in the filtered resource list.

[0034] In an optional embodiment, the resource information includes resource type and field information; accordingly, based on the resource information of each requested resource, each requested resource is filtered to obtain a first requested resource, including: based on the resource type, each requested resource is dynamically filtered to obtain a static requested resource; based on the field information corresponding to the static requested resource, the static requested resource is filtered to obtain the first requested resource.

[0035] The resource information may include the resource type and field information of the requested resource. For example, the resource type may include dynamically loaded resources and statically loaded resources. For example, the field information may include the page link, content encryption algorithm, link header information, status code, and request body.

[0036] For example, dynamically loaded resources in each request resource can be filtered based on resource type to obtain statically loaded resources after filtering out the dynamically loaded resources. The filtered request resources are temporarily stored in a filtered resource list. Field filtering is performed on static request resources corresponding to fields with null values ​​or incomplete information in the static request resources to obtain a first request resource. The filtered request resources after field filtering are temporarily stored in a filtered resource list.

[0037] The complete field information may include, for example, a page link, content encryption algorithm, link header information, status code, and request body. Field restriction conditions for filtering static request resources based on field information can be pre-set by relevant technical personnel according to actual needs, and this embodiment does not limit this.

[0038] This optional embodiment obtains static request resources by dynamically filtering each request resource according to resource type; and obtains first request resources by filtering the static request resources according to field information corresponding to the static request resources, thereby achieving precise filtering of each request resource, improving the accuracy of determining the first request resource, and thus improving the accuracy of determining the resources loaded on the first screen.

[0039] S130: After the page to be loaded is loaded, image filtering is performed on the first requested resource whose image resource information has been loaded to obtain a second requested resource.

[0040] The sign indicating that the page to be loaded has been loaded can be, for example, that the page to be loaded has been loaded for 1 second.

[0041] It should be noted that, during the loading process of the page to be loaded, the requested resources are continuously loaded, among which there are requested resources whose resource information is being loaded but has not been loaded completely, such as image resource information.

[0042] After the image resource information is loaded, the first requested resource is filtered. For example, the first requested resource that does not meet the preset image filtering rules can be filtered, and the filtered request resources can be temporarily stored in the filtered resource list; the first requested resource obtained after filtering is used as the second requested resource. The preset image filtering rules can be pre-set by relevant technical personnel. For example, the preset image filtering rules can be to retain the first screen image resources in the first requested resource.

[0043] Optionally, the first-screen image resources in the first request resource can be obtained by injecting JS code for collecting first-screen images into the headless browser using the Puppeteer tool (a Node library headless browser), parsing the image links collected for the first-screen images, and generating an array of first-screen images. When the first request resource is subsequently filtered, the request resources corresponding to images not in the first-screen image data can be filtered out to obtain the second request resource.

[0044] In an optional embodiment, after performing image filtering on the first request resource whose image resource information has been loaded to obtain the second request resource, the method further includes: performing abnormal resource filtering on the second request resource according to a preset abnormal filtering rule to obtain the filtered second request resource.

[0045] Exception filtering rules can be pre-set by relevant technical personnel. For example, the exception filtering rules can include filtering empty content, filtering abnormal JS description files, and filtering abnormal image resources. Based on the exception filtering rules, the second request resource is filtered, and the filtered request resource is used as the second request resource. The request resources filtered out based on the exception filtering rules are temporarily stored in the filtered resource list.

[0046] S140: Determine the first screen loading resource of the page to be loaded according to the second requested resource, and control the client to cache and load the first screen loading resource.

[0047] Exemplarily, the second requested resource may be determined as a first-screen loading resource of the page to be loaded, and the first-screen loading resource may be sent to a corresponding client to control the client to cache and load the first-screen loading resource.

[0048] Specifically, the client caches the first-screen loading resources sent by the server locally offline. When the client receives a page load request for a page to be loaded, it retrieves the first-screen loading resources from the local offline cache and displays them. The page load request can be initiated by the relevant user when the client clicks on the page to be loaded.

[0049] Optionally, the server may display the resources in the filtered resource list so that relevant technical personnel can analyze the requested resources in the filtered resource list when there is a relevant need.

[0050] The embodiment of the present invention obtains at least one requested resource of the page to be loaded during the page loading process; performs field filtering on each requested resource according to the resource information of each requested resource to obtain a first requested resource; after the page to be loaded is loaded, performs image filtering on the first requested resource whose image resource information has been loaded to obtain a second requested resource; and determines the first screen loading resource of the page to be loaded according to the second requested resource, so as to control the client to cache and load the first screen loading resource. The above scheme achieves the maximum acquisition of the resources loaded on the first screen of the page by filtering the obtained request resources of the page to be loaded layer by layer, and can accurately determine the first screen loading resources, thereby reducing the speed at which the client loads the first screen resources of the page and improving the accuracy of the loaded first screen loading resources.

[0051] Example 2

[0052] Figure 2 This is a flow chart of a method for determining resources loaded on the first screen provided in the second embodiment of the present invention. This embodiment is optimized and improved based on the above technical solutions.

[0053] Furthermore, the step of "filtering the first request resource after the image resource information is loaded to obtain the second request resource" is refined into "filtering the first request resource after the image resource information is loaded at least twice to obtain the filtered first request resource; and determining the second request resource based on at least two filtered first request resources." to improve the method of determining the second request resource.

[0054] like Figure 2 As shown, the method includes the following specific steps:

[0055] S210: Obtain at least one requested resource of a page to be loaded during the page loading process.

[0056] S220: Perform field filtering on each requested resource according to resource information of each requested resource to obtain a first requested resource.

[0057] S230 , performing at least two image filtering operations on the first requested resource whose image resource information has been loaded, to obtain a filtered first requested resource.

[0058] For example, the first request resource after loading the image resource information can be parsed and filtered twice to obtain at least two filtered first request resources. For example, the JS code for collecting the first screen image can be injected into the headless browser at least twice using the Puppeteer tool, and the first request resource can be parsed and filtered at least twice.

[0059] In an optional embodiment, the first requested resource after the image resource information is loaded is subjected to at least two image filtering operations to obtain the filtered first requested resource, including: obtaining the image resource information obtained after the resource information of the first requested resource is loaded; and filtering the first requested resource for non-first screen image resources at least twice according to the image resource information to obtain the filtered first requested resource.

[0060] The image resource information may include the image location, image link, and image type. For example, after the page to be loaded is loaded, the image resource information corresponding to the image resource in the page to be loaded is also loaded. The image resource information obtained after the resource information of the first requested resource is loaded is obtained.

[0061] Based on the image resource information, the first-screen image resources and non-first-screen image resources in the first requested resources can be determined. Based on the image resource information, the first requested resources are filtered for non-first-screen image resources at least twice to obtain the filtered first requested resources. The first requested resources at least include the first-screen image resources.

[0062] This optional embodiment filters the first requested resource for non-first screen image resources at least twice based on the image resource information to obtain the filtered first requested resource, thereby achieving accurate filtering of the first requested resource and improving the accuracy of subsequent determination of the first screen loaded resource.

[0063] In an optional embodiment, after performing at least two image filtering on the first request resource after loading the image resource information to obtain the filtered first request resource, it also includes: filtering the request resources in the filtered first request resource that do not meet the preset status code judgment conditions according to the status code information in the field information to update the filtered first request resource.

[0064] The preset status code judgment condition may be pre-set by relevant technical personnel. For example, the preset status code condition may be that the status code corresponding to the requested resource is equal to 200.

[0065] Exemplarily, according to the status code information in the field information of the request resource, the request resources with status codes not equal to 200 in the first request resources are filtered out to obtain the first request resources with status codes not equal to 200.

[0066] Optionally, the filtered resource list may be filtered in the same manner to filter out request resources with status codes not equal to 200 in the filtered resource list, thereby obtaining a filtered filtered resource list.

[0067] S240: Determine a second requested resource according to at least two filtered first requested resources.

[0068] Exemplarily, the second requested resource may be determined by comparing the requested resources in the at least two filtered first requested resources.

[0069] In an optional embodiment, determining the second requested resource based on each first requested resource obtained after at least two filterings includes: performing resource comparison on the requested resources in each first requested resource obtained after at least two filterings; and using the requested resources with the same resource comparison results as the second requested resource.

[0070] Exemplarily, resource comparison is performed on the request resources in each first request resource obtained after at least two filterings, and the request resources with the same resource comparison results are used as the second request resources; and the request resources with different resource comparison results are filtered out and stored in the filtered resource list.

[0071] S250: Determine the first screen loading resource of the page to be loaded according to the second requested resource, and control the client to cache and load the first screen loading resource.

[0072] The embodiment of the present invention performs at least two image filters on the first request resource after loading the image resource information, thereby obtaining the filtered first request resource; and determines the second request resource based on the at least two filtered first request resources, thereby achieving accurate determination of the second request resource, thereby improving the accuracy of subsequent determination of the first screen loaded resource. By filtering the obtained request resources of the page to be loaded layer by layer, it is achieved to obtain the resources loaded on the first screen of the page to the greatest extent, and the resources loaded on the first screen can be accurately determined, which reduces the speed at which the client loads the first screen of the page while improving the accuracy of the loaded first screen resources.

[0073] Example 3

[0074] Figure 3 This is a structural diagram of a first screen loading resource determination device provided by embodiment 3 of the present invention. The first screen loading resource determination device provided by the embodiment of the present invention is applicable to the case of determining the first screen loading resources of each page to be loaded. The first screen loading resource determination device can be implemented in the form of hardware and / or software, such as Figure 3 As shown, the device specifically includes: a request resource acquisition module 301, a first request resource determination module 302, a second request resource determination module 303 and a first screen loading resource determination module 304.

[0075] The request resource acquisition module 301 is used to acquire at least one request resource of the page to be loaded during the page loading process;

[0076] A first requested resource determining module 302 is configured to perform field filtering on each requested resource according to resource information of each requested resource to obtain a first requested resource;

[0077] The second requested resource determination module 303 is configured to filter the first requested resource whose image resource information has been loaded after the page to be loaded is loaded, to obtain the second requested resource;

[0078] The first screen loading resource determination module 304 is used to determine the first screen loading resource of the page to be loaded according to the second request resource, and to control the client to cache and load the first screen loading resource.

[0079] The embodiment of the present invention obtains at least one requested resource of the page to be loaded during the page loading process; performs field filtering on each requested resource according to the resource information of each requested resource to obtain a first requested resource; after the page to be loaded is loaded, performs image filtering on the first requested resource whose image resource information has been loaded to obtain a second requested resource; and determines the first screen loading resource of the page to be loaded according to the second requested resource, so as to control the client to cache and load the first screen loading resource. The above scheme achieves the maximum acquisition of the resources loaded on the first screen of the page by filtering the obtained request resources of the page to be loaded layer by layer, and can accurately determine the first screen loading resources, thereby reducing the speed at which the client loads the first screen resources of the page and improving the accuracy of the loaded first screen loading resources.

[0080] Optionally, the resource information includes resource type and field information;

[0081] Accordingly, the first request resource determination module 302 includes:

[0082] a static request resource determining unit, configured to perform dynamic resource filtering on each of the requested resources according to the resource type to obtain a static request resource;

[0083] The first requested resource determining unit is configured to filter the static requested resources according to field information corresponding to the static requested resources to obtain the first requested resources.

[0084] Optionally, the second request resource determining module 303 includes:

[0085] a first request resource filtering unit, configured to perform at least two image filters on the first request resource after image resource information is loaded, to obtain a filtered first request resource;

[0086] The second requested resource determining unit is configured to determine a second requested resource according to at least two filtered first requested resources.

[0087] Optionally, the first request resource filtering unit includes:

[0088] A picture resource information acquisition subunit, configured to acquire picture resource information obtained after the resource information of the first requested resource is loaded;

[0089] The first requested resource filtering subunit is configured to filter the first requested resource for non-first screen image resources at least twice according to the image resource information to obtain a filtered first requested resource.

[0090] Optionally, the second requested resource determining unit includes:

[0091] a resource comparison subunit, configured to compare the requested resources in each of the first requested resources obtained after the at least two filtering operations;

[0092] The second requested resource determining subunit is configured to use the requested resources with the same resource comparison result as the second requested resources.

[0093] Optionally, the second requested resource determining module 303 further includes:

[0094] The first request resource updating unit is configured to filter the request resources that do not meet the preset status code judgment condition in the filtered first request resources according to the status code information in the field information, so as to update the filtered first request resources.

[0095] Optionally, the device further includes:

[0096] The abnormal resource filtering module is used to perform abnormal resource filtering on the second request resource according to a preset abnormal filtering rule to obtain a filtered second request resource.

[0097] The first screen loading resource determination device provided by the embodiment of the present invention can execute the first screen loading resource determination method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0098] Example 4

[0099] Figure 4A schematic diagram of the structure of a server 40 that can be used to implement an embodiment of the present invention is shown. The server is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The server can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0100] like Figure 4 As shown, the server 40 includes at least one processor 41 and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. Various programs and data required for the operation of the server 40 can also be stored in the RAM 43. The processor 41, ROM 42 and RAM 43 are connected to each other via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0101] Several components in the server 40 are connected to the I / O interface 45, including an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a magnetic disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the server 40 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0102] The processor 41 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as the method for determining resources loaded on the first screen.

[0103] In some embodiments, the method for determining resources for first-screen loading may be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the server 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the method for determining resources for first-screen loading described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the method for determining resources for first-screen loading by any other appropriate means (e.g., by means of firmware).

[0104] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0105] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0106] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on a server having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the server. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0108] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0109] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0110] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0111] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for determining resources loaded on the first screen, characterized in that: Applicable to servers, including: Obtain at least one requested resource of the page to be loaded during the page loading process; Performing field filtering on each requested resource according to resource information of each requested resource to obtain a first requested resource; After the page to be loaded is loaded, performing at least two image filtering operations on the first requested resource whose image resource information has been loaded, to obtain a filtered first requested resource; Performing resource comparison on the requested resources in each of the first requested resources obtained after the at least two filtering operations; The requested resources with the same resource comparison results are used as the second requested resources; According to the second requested resource, a first-screen loading resource of the to-be-loaded page is determined, and is used to control the client to cache and load the first-screen loading resource.

2. The method according to claim 1, characterized in that The resource information includes resource type and field information; Correspondingly, filtering each requested resource according to the resource information of each requested resource to obtain the first requested resource includes: Performing dynamic resource filtering on each of the requested resources according to the resource type to obtain static requested resources; The static request resource is filtered according to the field information corresponding to the static request resource to obtain the first request resource.

3. The method according to claim 1, characterized in that The performing at least two image filtering operations on the first requested resource after the image resource information is loaded to obtain the filtered first requested resource includes: Obtaining image resource information obtained after the resource information of the first requested resource is loaded; According to the image resource information, the first requested resource is filtered for non-first screen image resources at least twice to obtain a filtered first requested resource.

4. The method according to claim 1, wherein After performing at least two image filtering operations on the first requested resource after the image resource information is loaded to obtain the filtered first requested resource, the method further includes: According to the status code information in the field information, the request resources in the filtered first request resources that do not meet the preset status code judgment condition are filtered to update the filtered first request resources.

5. The method according to any one of claims 1 to 4, characterized in that After filtering the first requested resource after loading the image resource information to obtain the second requested resource, the method further includes: According to a preset abnormal filtering rule, abnormal resource filtering is performed on the second requested resource to obtain a filtered second requested resource.

6. A device for determining resources loaded on the first screen, characterized in that: Applicable to servers, including: A request resource acquisition module is used to acquire at least one request resource of a page to be loaded during the page loading process; A first requested resource determination module, configured to perform field filtering on each requested resource according to resource information of each requested resource to obtain a first requested resource; A second requested resource determination module is configured to, after the page to be loaded is loaded, perform image filtering on the first requested resource whose image resource information has been loaded to obtain a second requested resource; a first-screen loading resource determination module, configured to determine the first-screen loading resource of the page to be loaded according to the second requested resource, and to control the client to cache and load the first-screen loading resource; The second request resource determination module includes: a first request resource filtering unit, configured to perform at least two image filters on the first request resource after image resource information is loaded, to obtain a filtered first request resource; A second requested resource determining unit, configured to determine a second requested resource based on at least two of the filtered first requested resources; The second requested resource determining unit includes: a resource comparison subunit, configured to compare the requested resources in each of the first requested resources obtained after the at least two filtering operations; The second requested resource determining subunit is configured to use the requested resources with the same resource comparison result as the second requested resources.

7. A server, characterized in that: The server includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining first screen loading resources according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining first screen loading resources according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Method and device for loading first screen of page by browser application

    CN111339455A

  • First screen time calculation method and device

    CN112507261A