CN115905118A - Resource processing method and device and electronic equipment - Google Patents

Resource processing method and device and electronic equipment Download PDF

Info

Publication number
CN115905118A
CN115905118A CN202211160861.7A CN202211160861A CN115905118A CN 115905118 A CN115905118 A CN 115905118A CN 202211160861 A CN202211160861 A CN 202211160861A CN 115905118 A CN115905118 A CN 115905118A
Authority
CN
China
Prior art keywords
target
resource
party
page
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211160861.7A
Other languages
Chinese (zh)
Inventor
杨泽伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202211160861.7A priority Critical patent/CN115905118A/en
Publication of CN115905118A publication Critical patent/CN115905118A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a resource processing method, a device and electronic equipment, which are used for acquiring a target resource code related to a routing page and determining a resource name of a target third-party resource used by the routing page; generating a target corresponding relation between the routing page and a target third-party resource file; and generating a file path of the target third-party resource file used by each routing page, so that the target third-party resource file is loaded based on the file path of the target third-party resource file when the routing page is triggered. Because the target third-party resource used by each routing page is part of all the third-party resources, only the resource file of the target third-party resource is generated, so that when the target project is operated, the corresponding resource file is loaded according to the currently triggered routing page, the problem of loading and analyzing all the resource files when the first page is opened is solved, the request pressure of the server and the waste of network resources are reduced, and the operating efficiency of the project is improved.

Description

Resource processing method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a resource processing method and apparatus, and an electronic device.
Background
Currently, most projects such as websites are developed on the basis of a modular manner, and a conventional website project usually includes a folder for storing project resources and a folder for storing third-party resources. When the project resources are packaged, the construction codes in the folders for storing the project resources can be combined into one file, such as manifest. However, with continuous iteration of project requirements, the volume of a project source code is larger and larger, which generally results in a larger vector/bundle.js file, and since the vector/bundle.js file is loaded when the head page of the website and each subnet page are opened when third-party resources are used, the loading and analysis of the head page of the website are affected, the request pressure of the server is also larger, network resources are wasted, and the operating efficiency of the website is affected.
Disclosure of Invention
In view of this, an object of the present invention is to provide a resource processing method and apparatus, and an electronic device, which enable a resource file of a target third-party resource used by a routing page to be loaded according to a currently triggered routing page when a project is run, avoid the problem of loading and analyzing all resource files when a first page is opened, reduce request pressure of a server and waste of network resources, and further improve running efficiency of the project.
In a first aspect, an embodiment of the present invention provides a resource processing method, where the method is applied to a terminal device, and the terminal device is configured with multiple resource folders of a target item, where resource codes of the target item are stored in the multiple resource folders, and the method includes: acquiring target resource codes stored in a target resource folder related to the routing page from the plurality of resource folders, and determining a resource name of a target third-party resource used by the routing page based on the target resource codes; generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project; and issuing the target corresponding relation to a corresponding server, and generating a file path of a target third-party resource file used by each routing page, so that when a target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file.
In a second aspect, an embodiment of the present invention provides a resource processing apparatus, which is applied to a terminal device, where multiple resource folders of a target item are configured in the terminal device, and resource codes of the target item are stored in the multiple resource folders, and the apparatus includes: the determining module is used for acquiring target resource codes stored in a target resource folder related to the routing page from the plurality of resource folders and determining the resource name of a target third-party resource used by the routing page based on the target resource codes; the generating module is used for generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project; and the loading module is used for publishing the target corresponding relation to the corresponding server and generating a file path of the target third-party resource file used by each routing page, so that when the target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the resource processing method of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the resource processing method of the first aspect.
The embodiment of the invention has the following beneficial effects:
the invention provides a resource processing method, a device and electronic equipment, which are used for acquiring a target resource code related to a routing page and determining a resource name of a target third-party resource used by the routing page; generating a target corresponding relation between the routing page and a target third-party resource file; and generating a file path of the target third-party resource file used by each routing page, so that when the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file. Because the target third-party resource used by each routing page is part of all the third-party resources, only the resource file of the target third-party resource is generated, so that when the target project is operated, the corresponding resource file is loaded according to the currently triggered routing page, the problem of loading and analyzing all the resource files when the first page is opened is avoided, the request pressure of a server and the waste of network resources are reduced, and the operating efficiency of the project is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a resource processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a routing path of a target resource folder according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a resource processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, most projects such as websites and the like are developed on the basis of a modularization mode, resource files are divided in a folder mode in the development stage, and codes are coded in a modularization file mode. A conventional website project typically includes a folder that stores project resources, and a folder that stores third party resources. When the project resources are packaged, the construction codes in the folders for storing the project resources can be combined into one file, such as manifest.
For example, a conventional project directory, all resource files are typically placed in the src folder, including but not limited to apis interface, assets resources, components, flow flows, hooks, layout of layout, store data, utilities tools, views view, etc. All third party modules are stored in the node _ modules folder, and items depend on some third party modules, such as: acts, vue, jquery, day, moment, ant-design, vant and the like, and the modules extracted according to package json are installed into the node _ modules folder one by one when the third-party module is installed. The modular files in the src folder continuously refer to a third-party module in the node _ modules folder, when codes which can run on the line are finally packaged and output, the constructed codes are combined into a file name. Three bundle files are inserted into an HTML structure of the website, and when the webpage is loaded and operated, the whole website function can take effect. However, as the project requirements are continuously iterated, the size of the source codes of the website is larger and larger, which usually results in larger files of vendor.
In the related art, the JavaScript standard provides a standard syntax for dynamically importing a file, and this syntax can enable JavaScript code to be introduced into a portal file in an asynchronous manner. For example, codes of all web pages may be introduced by dynamically importing import () and, when designing a web page route hop, codes of a specific web page are bound according to a URL (Uniform Resource Locator) path of the web page. When the project resource is packaged, a bundle file is separately generated by the code file corresponding to the URL path in the import () form, and each bundle file corresponds to a web page or a triggered function module and belongs to a service code. The bundle.js can be split into a plurality of bundle files, and when a user clicks a link to enter different sub-webpages, the bundle files of different service codes are loaded, so that the effect of loading as required is realized.
However, the above method can only process the service code, and cannot solve the problem of vendor. Bundle. Js, that is, storing a file of a third party resource, where the third party resource usually exists as a single individual, and if it is necessary to display different webpages in a project resource, one or more function modules in the third party resource may need to be loaded, so that the third party resource cannot be split, and if the third party resource is split, an internal code may be decomposed, resulting in operation failure. For example, the file, bundle, js consists of exact + exact-dom + exact-route + choice + axios + day + prop-types + swiper + vconsole, and the splitting of the index, bundle, js is such that no single individual with the smallest number of modules exists, or in short, the swiper is split to different pages or modules. However, if the third-party resource file is not split, it means that the first page and each sub-web page are loaded in advance when the third-party resource file is used by the first page, and if the sub-web pages are not opened subsequently, the third-party resource file loaded on the first page is loaded in advance even if not used, which may affect the loading and analysis of the first page of the website, seriously affect the user experience, make the request pressure of the server higher, and also waste network resources and affect the operating efficiency of the website. Based on this, the resource processing method, the resource processing device and the electronic device provided by the embodiment of the invention can be applied to terminal devices such as mobile phones, tablet computers and computers, and can be particularly applied to resource preloading of websites.
To facilitate understanding of the present embodiment, a detailed description is first made of a resource processing method disclosed in an embodiment of the present invention, where the method is applied to a terminal device, and a plurality of resource folders of a target item are configured in the terminal device, and resource codes of the target item are stored in the plurality of resource folders, as shown in fig. 1, the method includes:
step S102, acquiring target resource codes stored in a target resource folder related to a routing page from a plurality of resource folders, and determining the resource name of a target third-party resource used by the routing page based on the target resource codes;
the target item may generally refer to a website item, which includes a first webpage and other sub-webpages, where different webpages perform different functions, for example, other sub-webpages may be login pages or personal center pages. The resource folders refer to folders storing resource codes of target projects, and the resource codes may be construction codes, codes of third-party modules, or business codes. The target resource code specifically refers to a code of a third-party module, that is, a third-party resource code, which is stored in the target resource folder. Illustratively, as shown in fig. 2, the front-end item includes a plurality of resource folders, such as an src folder, a package folder, a readme folder, etc., and the target resource folder related to the routing page may be a home folder, a login folder, an auth folder, etc.
The third-party resource generally refers to a module with a certain function downloaded from a network resource, for example, the third-party module may be understood as a module written by a non-target project developer, similar to a plug-in developed at a front end. The resource name may generally refer to a name of a third-party module used by the routing page, such as exact, classnames, day, and the like. The routing pages described above are typically for intranet links, which are views switched in one web page, which are still on the same page after switching, and in order to distinguish the switched views, the switched views are suffixed to the URL, e.g., a domain name of a website is https:// xyz.com, a login page is https:// xyz.com/login, a related page is https:// xyz.com/about, a personal hub page is https:// xyz.com/center, and so on.
For example, the target resource code in the home folder, login folder, and about folder associated with the home page, login page, and routing page related to the page, etc. may be obtained from a plurality of resource folders in the target project. And then, based on the target resource code, extracting a resource name of the third-party resource in the target resource code in a code conversion mode, wherein the extracted resource name can be determined as the resource name of the target third-party resource used by the routing page. Or the resource name of the internal resource belonging to the target project in the extracted resource names can be deleted, so that the more accurate resource name of the target third-party resource used by the routing page can be obtained. Of course, the resource name of the published third-party resource in the extracted resource names can be deleted, and the more accurate resource name of the target third-party resource used by the routing pages such as the home page, the login page, the related page and the like can be determined.
Step S104, generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project;
the previously generated third-party resource file may generally refer to a file generated by packaging all third-party resources of a target project, and may be generally expressed as a vendor. The target third-party resource file may generally refer to a file generated by packaging part of third-party resources of the target item, and is usually disassembled and packaged according to third-party resources corresponding to different routing pages, so that the content of the target third-party resource file may be further reduced, for example, the content includes a home. The target corresponding relationship generally refers to a corresponding relationship between a routing page and one or more target third-party resource files, if the routing page corresponds to one target third-party resource, the target third-party resource may include a plurality of third-party resources corresponding to resource names, that is, a plurality of third-party modules, and if the routing page corresponds to a plurality of target third-party resources, each target third-party resource may include a third-party resource corresponding to a resource name, that is, a third-party module. It should be noted that the resource names of the target third-party resources used by different routing pages may be the same, and therefore, the target third-party resource files corresponding to a plurality of different routing pages may be the same.
Specifically, the third-party resource matched with the resource name can be divided from the pre-generated third-party resource file according to the resource name of the target third-party resource used by the routing page, and then the third-party resource is combined into the corresponding target third-party resource file, so that the target corresponding relationship between the routing page and the target third-party resource file is generated. Since the third party resources used by different routing pages may be the same, in order to load unnecessary resources, deduplication processing may be performed according to the page function of each routing page and the resource name of the target third party resource used by each routing page in advance, and the resource name of the target third party resource used by the designated routing page. And then generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page after the duplicate removal processing and the pre-generated third-party resource file.
For example, if the resource name of the target third-party resource used by the home page (home) is called act and swap, for the home page, the third-party resource whose resource name is act and swap may be obtained from a pre-generated third-party resource file, and the third-party resource whose resource name is act and swap is packaged and the like to obtain a corresponding target third-party resource, and one target third-party resource file may be obtained by packaging together, and a plurality of target third-party resource files may be obtained by separately packaging, for example, the target third-party resource file may be represented as home. The finally generated target correspondence may be expressed as home: home. Vendor. Bundle. Js.
Step S106, the target corresponding relation is issued to the corresponding server, and a file path of the target third-party resource file used by each routing page is generated, so that when the target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file.
The file path of the target third-party resource file generally refers to a storage path for issuing a target correspondence to a server, and each generated routing page is used for storing the target third-party resource file, and the storage path can also be understood as an extranet link URL.
In actual implementation, the target corresponding relationship is issued to the corresponding server, that is, the target third-party resource file used by each routing page is stored in the server. And then, the target third-party resource file corresponding to each routing page in the target corresponding relation is replaced and generated into a file path in the server. That is, a correspondence of the routing page and the file path is generated.
In the operation stage of the target project, if the routing page is triggered, a file path corresponding to the routing page can be obtained, a target third-party resource file under the file path is obtained from the server based on the file path, and the target third-party resource file is loaded into the currently triggered routing page. For example, if the routing page is home and the domain name of the server is http:// static. Xyz. Com/battle, the file path corresponding to the routing page may be generated as http:// static. Xyz. Com/battle/home.
The resource processing method comprises the steps of obtaining target resource codes stored in a target resource folder related to a routing page from a plurality of resource folders, and determining the resource name of a target third-party resource used by the routing page based on the target resource codes; generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project; and issuing the target corresponding relation to a corresponding server, and generating a file path of a target third-party resource file used by each routing page, so that when a target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file. Because the target third-party resource used by each routing page is part of all the third-party resources, only the resource file of the target third-party resource is generated, so that when the target project is operated, the corresponding resource file is loaded according to the currently triggered routing page, the problem of loading and analyzing all the resource files when the first page is opened is solved, the request pressure of the server and the waste of network resources are reduced, and the operating efficiency of the project is improved.
According to the step S102, a step of obtaining a target resource code stored in a target resource folder related to the routing page from the plurality of resource folders, and determining a resource name of a target third-party resource used by the routing page based on the target resource code, is one possible implementation:
step 1, obtaining a routing path of each target resource folder in a first resource folder; the first resource folder is stored with a plurality of target resource folders, and each target resource folder is provided with a corresponding routing page;
step 2, acquiring a target resource code stored in the target resource folder according to the routing path, and converting the target resource code into a character string;
and 3, determining a target character string in a specified form from the character string, and determining the resource name of the target third-party resource used by the routing page from the target character string.
The first resource folder specifically refers to a folder including a routing page in the root directory, and as an example, as shown in fig. 2, the view folder may also be set as a pages folder, and may also be set by self-definition as a name of the folder of the routing page. The routing path is usually preset for each target resource folder, and may be set by adding a backslash "/" before the name of the target resource folder, or may be configured in advance before the code is written, as shown in fig. 2, "/" indicates the routing path of the top page, and "/logic" indicates the routing path of the login page.
For example, as shown in fig. 2, a plurality of resource folders are stored under the src root directory, where a views folder is a first resource folder, and a plurality of target resource folders, such as the folders of home, login, auth, and mine shown in fig. 2, are stored in the views folder. The relevant files of all routing pages can then be processed using the FS module of nodjs (abbreviation for filesystem, used to provide access to the file system). Specifically, a readdirSync function may be used to read a routing path of each target resource folder in the views folders, and then a readFileSync function may be used to read target resource codes stored in each target resource folder according to the routing path, and convert the target resource codes from a binary coding form into a text form of a character string. Further, a target character string in a specified form is determined from the character string, and the specified form of the target character string is usually import xxx from xyz, where xyz is the resource name of the target third-party resource used by the routing page. Where xxx represents a module, it is usually the default to find the xxx module from the node modules folder. After the module xyz is subjected to a series of screening, the resource name of the target third-party resource used by the routing page can be determined.
For example, for a target routing page, such as a home page, a target resource code stored in a target resource folder is obtained, and the target resource code is converted into a character string; determining a target character string with a specified form from the character string, wherein the target character string with the specified form can be:
import React from“react”;
import Classnames from“classnames”;
import Swiper from“swiper”;
import{GetData}react from“../../apis”;
import Modal from“../../components/modal”;
according to the target character string in the specified form, the resource names of the target third-party resources used by the target routing page can be determined as "exact", "classnames", "swiper", "./apis", and "./components/modal", or "exact", "classnames", "swiper".
In the above manner, the accurate resource name can be obtained by obtaining the routing path of the target resource folder, reading the target resource code and converting the target resource code into the target character string in the specified form, and determining the resource name of the target third-party resource according to the target character string in the specified form.
Further, according to the step 3, a step of determining a resource name of a target third-party resource used by the routing page from the target string is provided, which is one possible implementation:
determining an initial resource name from the target character string, deleting the resource name containing the specified content in the initial resource name, and obtaining a middle resource name; deleting the resource name of the resource file which is not published in the appointed website in the intermediate resource names to obtain a target resource name; and determining the target resource name as the resource name of the target third-party resource used by the routing page.
The initial resource name described above generally refers to a resource name derived from a target string of a specified form. The intermediate resource name is generally the resource name determined after deleting the resource name containing the code content written by the developer in the target project from the initial resource name. The target resource name is generally a resource name of a third-party resource that is determined after deleting a resource name of a resource file that has not been published by the designated website, from the intermediate resource name. The designated website may be an Npm (Node Package Manager) official website.
Specifically, for a target character string converted from a target resource code, an xyz module in the code in the form of import xxx from xyz can be extracted through a regular expression, and the name of the xyz module is the initial resource name. The method for constructing the regular expression is the prior art, and is not described herein again.
And then deleting the resource names containing the path starting forms of './' and './' in the initial resource name to obtain an intermediate resource name. Wherein "./" and "./" both represent code content in the target item that the developer has written to be completed. Further, it is also necessary to query whether the resource file corresponding to the intermediate resource name is published before on the Npm official website, and if so, that is, the intermediate resource name exists, the intermediate resource name is retained; if not, namely the intermediate resource name does not exist, deleting the intermediate resource name, so as to determine which third party Npm modules are used by the routing page, namely the target third party resource file, and further obtain a target resource name, namely the resource name of the target third party resource used by the routing page. The Npm is a package management tool in the JavaScript programming world and is a default package management tool of a node.js platform; and codes can be installed, shared and distributed through the Npm, and the project dependency relationship can be managed. Finally, the target resource name obtained through the screening process can represent the resource name of the target third-party resource used by the routing page.
For example, assume that the specified form of the target strings of the route pages home, login, and mine in the views folder are:
import React from“react”;
import Classnames from“classnames”;
import Swiper from“swiper”;
import{GetData}from“../../apis”;
import Modal from“../../components/modal”。
the target character string in the specified form can be extracted through the regular expression to obtain an initial resource name: "act", "classnames", "swiper", ""/, "/api", and "./components/modal", then delete the resource name containing the specified content in the original resource name, i.e., "/./api", and "/components/modal" get the intermediate resource name: "acts", "classnames", and "swiper"; deleting the resource name of the resource file which is not published in the specified website in the intermediate resource names, and if the 'swiper' is not published in the specified website, deleting the 'swiper' to obtain the target resource name: "act" and "classnames"; the target resource names "exact" and "classnames" are determined as the resource names of the target third party resources used by the routing page. Can be expressed as home: [ "exact", "classnames" ].
In the above manner, the initial resource name is determined from the target character string, and then the resource name of the target third-party resource used by the routing page is screened and determined, so that the invalid resource name of the third-party resource is deleted, the accuracy of the resource name is improved, and the file size of the third-party resource is further reduced.
Continuing to describe step S104, a possible implementation manner is that, according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file, the step of generating the target corresponding relationship between the routing page and the target third-party resource file is performed:
generating a first corresponding relation between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page; and according to the first corresponding relation, acquiring a target third-party resource file used by the routing page from the third-party resource file, and generating a target corresponding relation between the routing page and the target third-party resource file.
The first corresponding relation is generated according to the resource name of the target third-party resource used by each routing page, the resource name of the target third-party resource can be one or more, and the first corresponding relation is obtained by dividing and combining the resource names of the third-party resources through a specified rule.
For example, the resource name of the target third-party resource used by the home page home in the routing page, the resource name of the target third-party resource used by the login page login, the resource names of the target third-party resource used by the personal central page mine are real, clssnames and day, so that according to the resource name and the page type of the routing page, a first corresponding relationship between the routing page and the resource name of the target third-party resource can be generated, such as home: [ "real", "swiper" ], login: [ "classnames" ], mine: [ [ "classnames" ], [ "day" ] ]. According to the resource name in the first corresponding relationship, the target third-party resource file used by each routing page can be obtained from the third-party resource file, such as: home. Vendor. Bundle. Js; logic: common, video, bundle, js and mine, video, bundle, js, to generate a target correspondence:
home:home.vendor.bundle.js;
login:common.vendor.bundle.js;
and (5) mine: common. Video. Bundle. Js and mine.
In the above manner, the resource names of the target third-party resources in the set are divided and combined to obtain the first corresponding relationship between the routing page and the resource names, and the target corresponding relationship between the routing page and the target third-party resource files is generated, so that the problem of loading and analyzing all resource files when the home page is opened is solved.
Further, a step of generating a first corresponding relationship between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page, which is one possible implementation manner:
generating an initial corresponding relation with a first specified data structure according to the resource name of the target third-party resource used by the routing page; wherein the initial correspondence is used for: one or more target third-party resource files are correspondingly generated on each routing page in a packaging result obtained by packaging the third-party resource files based on the initial corresponding relation;
processing the initial corresponding relation to generate a first corresponding relation; wherein the first correspondence is to: and correspondingly generating one or more target third-party resource files in each routing page in a packaging result obtained by packaging the third-party resource files based on the first corresponding relation.
The initial correspondence relationship generally refers to a correspondence relationship between a routing page and a resource name of a used third-party resource file. The first specified data structure generally refers to a data structure form of an initial correspondence generated by storing a resource name of a target third-party resource in a tuple and corresponding the tuple to a corresponding routing page, and the specific form may be { routing page: [ "resource name of target third party resource file" ] }.
Specifically, the file name of the target third-party resource file included in each routing page may be stored in a set, for example, a set S may be customized. If exact and swiper are used at home, exact and classnames are used at login page location, exact, classnames and day are used at personal hub page mine, then the initial correspondence with the first specified data structure is const S = { home: [ "real", "swiper" ], login: "acts", "classnames" ], mine [ "acts", "classnames", "day" ] }, wherein each routing page may use one or more target third party resources, and correspondingly generate one or more target third party resource files.
From the above content analysis, each routing page contains a real, which is extracted as an essential loading item for rendering the first screen in the first page, and in addition, both a logic and a mine contain classnames, but the real appears in the two routing pages, and in order to prevent the modules from being repeatedly loaded due to the fact that both the logic and the mine are added to the classnames when entering the two web pages, the real is extracted as an individual loading item of the two web pages, and finally, the S becomes the following data structure:
home:[“react”,“swiper”],login:[“classnames”],mine:[[“classnames”],[“day”]]。
based on the first corresponding relationship, the new data structure may be disassembled and distributed to a packing tool, for example, webpack, and the disassembled structure may be packed to obtain a packed result, where the packed result stores one or more target third-party resource files corresponding to the routing page.
In the above manner, the first corresponding relationship is obtained by processing the resource names which are overlapped in the initial corresponding relationship, and the problem of repeated loading when a page is opened for the same third-party resource file is avoided by the relationship between the routing page and the target third-party resource file which is obtained based on the first corresponding relationship.
To further explain the specified rule in the above processing method, the following describes the step of processing the initial correspondence to generate the first correspondence, and a possible implementation manner is as follows:
if the resource names of the target third-party resources used by each routing page in the initial corresponding relation have the same first resource name, deleting the first resource names corresponding to the sub-pages except the head page in the routing page;
and if the resource names of the target third-party resources used by the target sub-pages in the sub-pages except the head page in the routing page in the initial corresponding relation have the same second resource name, setting the resource names corresponding to the target sub-pages into a specified format, and generating the first corresponding relation.
The target third-party resource generally represented by the first resource name is an essential loading item of the target project, and can be independently placed in a first page of the target project which is just opened by a user for loading. The second resource name is usually a resource name of the same target third-party resource used by multiple target sub-pages, and the resource name corresponding to each target sub-page is set to a specified format, so as to be distinguished from other target third-party resources in the target sub-web page. In actual implementation, for the initial correspondence, for example, if the home page includes the target third-party resource act and the swiper, the login page includes the target third-party resource act and classnames, and the personal center page includes the target third-party resource act, classnames and day, and each routing page includes the first resource name "act", the act may be retained only on the home page, and the acts corresponding to the login page and the personal center page may be deleted.
In addition, according to the initial correspondence, if the login page and the personal center page in the sub-pages except the top page include the same second resource name "classnames", the resource names corresponding to the login page and the personal center page are set to a specified format, which may be a square bracket added to the resource name, such as [ "classnames" ], and then the first correspondence is generated.
In the above manner, the resource name coinciding with the home page in the sub-page is deleted, and the appointed format is set for the coinciding resource name in the sub-page, so that the duplicate removal effect can be achieved, the repeated loading of the target third-party resource is avoided, and the request pressure of the server is further reduced.
Further, a step of obtaining a target third-party resource file used by the routing page from the third-party resource file according to the first corresponding relationship, and generating a target corresponding relationship between the routing page and the target third-party resource file, is one possible implementation manner:
judging whether the resource name corresponding to the routing page in the first corresponding relation is in a specified format or not; if yes, respectively acquiring target third-party resources matched with the resource names corresponding to the routing pages from the third-party resource files, respectively packaging each target third-party resource, and generating a plurality of target third-party resource files corresponding to the routing pages; if not, acquiring a target third-party resource matched with the resource name corresponding to the routing page from the third-party resource file, packaging the target third-party resource, and generating a target third-party resource file corresponding to the routing page.
In actual implementation, the resource name corresponding to the routing page in the first corresponding relationship is obtained, whether the resource name is in a specified format or not is judged, and the resource is packaged as a target third-party resource of the routing page according to the judgment result.
If the routing page is in the specified format, namely the resource name corresponding to the routing page in the first corresponding relation is in the specified format, acquiring a target third-party resource matched with the resource name corresponding to the routing page from a third-party resource file for each routing page, packaging each target third-party resource, and packaging the target third-party resources with the same resource name in the specified format in different pages to obtain the same packaging result. And finally, generating a plurality of target third-party resource files corresponding to each routing page.
If not, namely the resource name corresponding to the routing page in the first corresponding relation is not in the specified format, that is, the target third-party resources required to be used by the routing page only appear once, the target third-party resources matched with each resource name corresponding to the routing page are obtained from the third-party resource files, and all the target third-party resources are packaged as a whole to generate a target third-party resource file corresponding to the routing page. For example, if the first page uses the swiper + axios, then the folder.
In the above manner, whether the resource name corresponding to the routing page is in the designated format is judged, and the target third-party resource is packaged in two cases, so that repeated loading of the target third-party resource is further avoided, and the request pressure of the server is further reduced.
In order to further improve the user experience, if the routing page is triggered when the target project is run, the target third-party resource file is loaded based on the file path of the target third-party resource file, which is a possible implementation manner:
(1) Displaying a page in a target project through terminal equipment, and reading a specified label in the currently displayed page; wherein the designated tag is for: responding to the trigger operation aiming at the specified label, and displaying a routing page corresponding to the specified label;
(2) Monitoring operation behaviors aiming at the specified tags, responding to that a target specified tag in the specified tags is displayed in a specified area of a browsing window, suspending a mouse pointer at the target specified tag, and acquiring a file path of a target third-party resource file used by a routing page corresponding to the target specified tag from a target corresponding relation;
(3) And loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in the memory of the browser.
The designated label is generally an a label with a routing page feature, and the trigger operation for the designated label may be a click operation for the designated label, and may jump (or switch a page) to a corresponding routing page according to a routing path carried by the designated label. Wherein a is an HTML language tag; the a-tag defines a hyperlink for linking from one page to another. The target designated tag is specifically a designated tag which is in accordance with a designated area of a browser window and satisfies that a mouse pointer is suspended in the area where the mouse pointer is located, and one or more target designated tags can be provided.
Specifically, the user clicks the route page entry, displays the route page of the target item on the terminal device, and reads all a tags having the route page feature of the current page, which can be understood as clickable elements of the route page. The target designation tab of the designation tabs displayed in the designated area of the browser window may be understood as a target designation tab that conforms to the cross behavior, for example, the target designation tab is located at a certain position of the current page, and when the page is scrolled, the top or bottom of the browser window coincides with the target designation tab, which may be regarded as triggering the cross behavior. The mouse pointer is suspended on the target specific tag, which may be understood as the target specific tag conforms to mouse suspension behavior, such as the mouse pointer sliding over or the mouse pointer suspending at the target specific tag. If the cross behavior and the mouse suspension behavior are triggered according to the operation behavior of the user on the browser page, the browser accesses the server, and obtains a file path of a target third-party resource file used by the routing page corresponding to the target designated label from the target corresponding relation, at this time, the obtained file path of the target third-party resource file is a file array corresponding to the routing page, the file array is only a file URL (uniform resource locator) included by the array, and the array is used for wrapping so as to load in batch.
Furthermore, according to the acquired file path, a target third-party resource file stored before is loaded from the server, and a copy file of the target third-party resource file is stored in a memory of the browser, so that a corresponding route page can be called at any time for rendering.
In the above manner, the target third-party resource file corresponding to the routing page is loaded in advance by monitoring the target designation label triggered by the user, so that the function of preloading the target third-party resource to be used in the webpage can be achieved, and the request pressure of the server is reduced.
According to the step (2), a possible implementation manner of the step of reading the designated tag in the currently displayed page is as follows:
reading a language tag in a currently displayed page, and acquiring an href attribute of the language tag; based on the href attribute, a specified tag in the language tags is determined.
The language tags specifically refer to all the tags a, the tags a can be characters and pictures, and the routing page can be switched by clicking the tags a. The href attribute may specify the URL of the hyperlink target, and is used to determine whether the language tag has the route page feature, and the href attributes of a tags having the route feature are all in the form of/xxx, so that reading such a tag is the clickable element of the route page. The types of href elements are many, for example, the target element may be a presentation title, or a document, a button, or an input box.
In actual implementation, all the a tags in the current page are read first, the href attribute of the a tags is obtained, then whether the language tag has the routing page feature or not can be determined, the a tags without the routing page feature are deleted, and the rest are the a tags with the routing page feature.
In the above manner, all the a tags are read, and then the designated tag with the routing page feature can be screened out based on the href attribute, so as to designate the link destination.
According to the step (3), a possible implementation manner is that, in the step of loading the target third-party resource file from the server based on the file path and storing the target third-party resource file in the memory of the browser:
judging whether a browser memory stores a target third-party resource file used by a routing page corresponding to a target designated tag; and if not, loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in the memory of the browser.
In practical implementation, under the condition that a target specified label is displayed in a specified area of a browser window and a mouse pointer is suspended on the target specified label, whether copies of one or more target third-party resource files used by a routing page corresponding to the target specified label are stored in a browser memory is judged, if not, the server is requested to be accessed, target third-party resource files which are lacked in the corresponding routing page are loaded from a file path stored in the server before, wherein the file path exists in the server in a URL (uniform resource locator) form, the target third-party resource files can be downloaded by loading the URL, and the target third-party resource files are stored in the browser memory as the copies after the loading is completed. It should be noted that, at this time, the single target third party resource file itself is subjected to batch loading.
For example, target designation tabs of a page a, a page B, and a page C are displayed in the current page. The page A needs to load the target third-party resource files 1 and 3, the page B needs to load the target third-party resource files 2 and 4, and the page C needs to load the target third-party resource files 3, 4 and 5. At this time, the mouse pointer is suspended in the target designated tag areas of the page a and the page B in the browser window, and the target third-party resource files 1, 2, 3, and 4 are loaded by using a script tag (for defining a client script, such as JavaScript), but the mouse pointer slides away after staying in the target designated tag area for a short time, slides and suspends at the target designated tag area of the page C. Since the target third-party resource files 3 and 4 corresponding to the C page are already stored in the memory of the browser, only one script tag needs to be dynamically created for loading the target third-party resource file 5 corresponding to the C page.
In the above manner, whether the target third-party resource file corresponding to the routing page exists in the memory of the browser is judged, so that repeated requests for the server to load the target third-party resource file are avoided, the pressure of the server is relieved, the use of network resources is maximized, and the operation efficiency of the website is improved.
In order to further improve the utilization rate of the browser and the user experience, after the step of loading the target third-party resource file based on the file path of the target third-party resource file if the routing page is triggered when the target project is operated, the method further comprises the following steps:
and responding to the trigger operation aiming at the target specified label, loading a target third-party resource file used by the routing page corresponding to the target specified label from the memory of the browser, and displaying the routing page based on the target third-party resource file.
In practical implementation, the triggering operation generally refers to a clicking operation for a target designated tag, and when a user clicks the target designated tag and switches a current page of a browser to a corresponding routing page, because a target third-party resource file used by the routing page corresponding to the target designated tag is already stored in a memory of the browser, a copy of the corresponding target third-party resource file is directly found from the memory of the browser during rendering of the web page, and is directly and quickly rendered, so that the corresponding routing page is displayed in the browser page of the terminal device.
In the above manner, the effect of displaying the routing page through fast rendering can be achieved by directly searching the target third-party resource of the routing page to be displayed from the memory of the browser.
In order to further improve the utilization rate of the browser, the method further comprises the following steps: and deleting the files stored in the memory of the browser at regular time.
Specifically, when the designated tag is monitored, a target designated tag which is likely to be clicked is calculated through the operation behavior of the user, and the target third-party resource file corresponding to the routing page is preloaded, so that the preloaded target third-party resource file is stored in the memory of the browser and is reserved as a copy file. If the duplicate file is not used in the later period, the prejudgment fails, and the user does not click the target appointed label to switch the webpage view to the routing page, the generated target third-party resource file is stored in the memory of the browser and can be used at any time. If the browser is not used, the browser can delete the files stored in the memory at regular time, and the browser can also be understood to have a garbage collection mechanism for cleaning the memory, so that the duplicate files can be cleaned at regular time, and the rendering and running processes of the browser cannot be influenced.
In the mode, the memory is cleaned regularly by the browser, so that the memory space of the browser can be reduced, and the running efficiency of the browser is improved.
For the above method embodiment, referring to fig. 3, a resource processing apparatus is shown, which is applied to a terminal device, in which a plurality of resource folders of a target item are configured, and resource codes of the target item are stored in the plurality of resource folders, and the apparatus includes:
a determining module 31, configured to obtain, from the multiple resource folders, a target resource code stored in a target resource folder related to the routing page, and determine, based on the target resource code, a resource name of a target third-party resource used by the routing page;
a generating module 32, configured to generate a target corresponding relationship between the routing page and a target third-party resource file according to a resource name of the target third-party resource used by the routing page and a pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project;
and the loading module 33 is configured to issue the target correspondence to the corresponding server, and generate a file path of the target third-party resource file used by each routing page, so that when the target item is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file.
The resource processing device acquires target resource codes stored in a target resource folder related to the routing page from the plurality of resource folders, and determines the resource name of a target third-party resource used by the routing page based on the target resource codes; generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project; and issuing the target corresponding relation to a corresponding server, and generating a file path of a target third-party resource file used by each routing page, so that when a target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file. Because the target third-party resource used by each routing page is part of all the third-party resources, only the resource file of the target third-party resource is generated, so that when the target project is operated, the corresponding resource file is loaded according to the currently triggered routing page, the problem of loading and analyzing all the resource files when the first page is opened is avoided, the request pressure of a server and the waste of network resources are reduced, and the operating efficiency of the project is improved.
The determining module is further configured to: acquiring a routing path of each target resource folder in a first resource folder; the first resource folder is stored with a plurality of target resource folders, and each target resource folder is provided with a corresponding routing page; according to the routing path, acquiring a target resource code stored in a target resource folder, and converting the target resource code into a character string; and determining a target character string in a specified form from the character string, and determining a resource name of a target third-party resource used by the routing page from the target character string.
The determining module is further configured to: determining an initial resource name from the target character string, deleting the resource name containing the specified content in the initial resource name, and obtaining a middle resource name; deleting the resource name of the resource file which is not published in the appointed website in the intermediate resource names to obtain a target resource name; and determining the target resource name as the resource name of the target third-party resource used by the routing page.
The generating module is further configured to: generating a first corresponding relation between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page; and according to the first corresponding relation, acquiring a target third-party resource file used by the routing page from the third-party resource file, and generating a target corresponding relation between the routing page and the target third-party resource file.
The generating module is further configured to: generating an initial corresponding relation with a first specified data structure according to the resource name of the target third-party resource used by the routing page; wherein the initial correspondence is used for: one or more target third-party resource files are correspondingly generated on each routing page in a packaging result obtained by packaging the third-party resource files based on the initial corresponding relation; processing the initial corresponding relation to generate a first corresponding relation; wherein the first correspondence is to: and correspondingly generating one or more target third-party resource files in each routing page in a packaging result obtained by packaging the third-party resource files based on the first corresponding relation.
The generating module is further configured to: if the resource names of the target third-party resources used by each routing page in the initial corresponding relation have the same first resource name, deleting the first resource names corresponding to the sub-pages except the head page in the routing page; and if the resource names of the target third-party resources used by the target sub-pages in the sub-pages except the first page in the initial corresponding relation have the same second resource name, setting the resource names corresponding to the target sub-pages into a specified format, and generating the first corresponding relation.
The generating module is further configured to: judging whether the resource name corresponding to the routing page in the first corresponding relation is in a specified format or not; if yes, respectively acquiring target third-party resources matched with the resource names corresponding to the routing pages from the third-party resource files, respectively packaging each target third-party resource, and generating a plurality of target third-party resource files corresponding to the routing pages; if not, acquiring a target third-party resource matched with the resource name corresponding to the routing page from the third-party resource file, packaging the target third-party resource, and generating a target third-party resource file corresponding to the routing page.
The loading module is further configured to: displaying a page in a target project through terminal equipment, and reading a specified label in the currently displayed page; wherein the designated tag is for: responding to the trigger operation aiming at the specified label, and displaying a routing page corresponding to the specified label; monitoring operation behaviors aiming at the specified tags, responding to that a target specified tag in the specified tags is displayed in a specified area of a browsing window, suspending a mouse pointer at the target specified tag, and acquiring a file path of a target third-party resource file used by a routing page corresponding to the target specified tag from a target corresponding relation; and loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in a memory of the browser.
The loading module is further configured to: reading a language tag in a currently displayed page, and acquiring an href attribute of the language tag; based on the href attribute, a specified tag in the language tags is determined.
The loading module is further configured to: judging whether a target third-party resource file used by a routing page corresponding to the target specified label is stored in a memory of the browser; and if not, loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in the memory of the browser.
The above-mentioned device still includes: a display module to: and responding to the trigger operation aiming at the target specified label, loading a target third-party resource file used by the routing page corresponding to the target specified label from the memory of the browser, and displaying the routing page based on the target third-party resource file.
The above-mentioned device still includes: a cleaning module to: and deleting the files stored in the memory of the browser at regular time.
The resource processing device provided by the embodiment of the invention has the same technical characteristics as the resource processing method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment also provides an electronic device, which comprises a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to realize the resource processing method. The electronic device may be a server or a terminal device.
Referring to fig. 4, the electronic device includes a processor 100 and a memory 101, the memory 101 stores machine executable instructions capable of being executed by the processor 100, the processor 100 executes the machine executable instructions to implement the resource processing method, the method is applied to a terminal device, a plurality of resource folders of a target item are configured in the terminal device, and resource codes of the target item are stored in the resource folders, the method includes the following steps:
acquiring target resource codes stored in a target resource folder related to the routing page from the plurality of resource folders, and determining a resource name of a target third-party resource used by the routing page based on the target resource codes; generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project; and issuing the target corresponding relation to a corresponding server, and generating a file path of a target third-party resource file used by each routing page, so that when a target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file. Because the target third-party resource used by each routing page is part of all the third-party resources, only the resource file of the target third-party resource is generated, so that when the target project is operated, the corresponding resource file is loaded according to the currently triggered routing page, the problem of loading and analyzing all the resource files when the first page is opened is avoided, the request pressure of a server and the waste of network resources are reduced, and the operating efficiency of the project is improved.
The step of obtaining the target resource code stored in the target resource folder related to the routing page from the multiple resource folders, and determining the resource name of the target third-party resource used by the routing page based on the target resource code includes: acquiring a routing path of each target resource folder in a first resource folder; the first resource folder is stored with a plurality of target resource folders, and each target resource folder is provided with a corresponding routing page; according to the routing path, acquiring a target resource code stored in a target resource folder, and converting the target resource code into a character string; and determining a target character string in a specified form from the character string, and determining a resource name of a target third-party resource used by the routing page from the target character string. In the method, the accurate resource name can be obtained by acquiring the routing path of the target resource folder, reading the target resource code and converting the target resource code into the target character string in the specified form, and determining the resource name of the target third-party resource according to the target character string in the specified form.
The step of determining the resource name of the target third-party resource used by the routing page from the target character string includes: determining an initial resource name from the target character string, deleting the resource name containing the specified content in the initial resource name, and obtaining a middle resource name; deleting the resource name of the resource file which is not published in the appointed website in the intermediate resource names to obtain a target resource name; and determining the target resource name as the resource name of the target third-party resource used by the routing page. In the method, the initial resource name is determined from the target character string, the resource name of the target third-party resource used by the routing page is further screened and determined, the invalid resource name of the third-party resource is deleted, the accuracy of the resource name is improved, and the file size of the third-party resource is further reduced.
The step of generating the target corresponding relationship between the routing page and the target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file includes: generating a first corresponding relation between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page; and according to the first corresponding relation, acquiring a target third-party resource file used by the routing page from the third-party resource file, and generating a target corresponding relation between the routing page and the target third-party resource file. In the method, the resource names of the target third-party resources in the set are divided and combined to obtain the first corresponding relation between the routing page and the resource names, and the target corresponding relation between the routing page and the target third-party resource files is generated, so that the problem of loading and analyzing all resource files when a home page is opened is solved.
The step of generating the first corresponding relationship between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page includes: generating an initial corresponding relation with a first specified data structure according to the resource name of the target third-party resource used by the routing page; wherein the initial correspondence is used for: one or more target third-party resource files are correspondingly generated on each routing page in a packaging result obtained by packaging the third-party resource files based on the initial corresponding relation; processing the initial corresponding relation to generate a first corresponding relation; wherein the first correspondence is for: and correspondingly generating one or more target third-party resource files in each routing page in a packaging result obtained by packaging the third-party resource files based on the first corresponding relation. In the method, the first corresponding relation is obtained by processing the resource names which are overlapped in the initial corresponding relation, and the problem of repeated loading when the page is opened for the same third-party resource file is solved by the relation between the routing page and the target third-party resource file which is obtained based on the first corresponding relation.
The step of processing the initial correspondence to generate a first correspondence includes: if the resource names of the target third-party resources used by each routing page in the initial corresponding relation have the same first resource name, deleting the first resource names corresponding to the sub-pages except the head page in the routing page; and if the resource names of the target third-party resources used by the target sub-pages in the sub-pages except the head page in the routing page in the initial corresponding relation have the same second resource name, setting the resource names corresponding to the target sub-pages into a specified format, and generating the first corresponding relation. In the mode, the resource name coincident with the home page in the sub-page is deleted, and the designated format is set for the coincident resource name in the sub-page, so that the duplicate removal effect can be achieved, repeated loading of target third-party resources is avoided, and the request pressure of the server is further reduced.
The step of obtaining the target third-party resource file used by the routing page from the third-party resource file according to the first corresponding relationship and generating the target corresponding relationship between the routing page and the target third-party resource file includes: judging whether the resource name corresponding to the routing page in the first corresponding relation is in a specified format or not; if yes, respectively acquiring target third-party resources matched with the resource names corresponding to the routing pages from the third-party resource files, respectively packaging each target third-party resource, and generating a plurality of target third-party resource files corresponding to the routing pages; if not, acquiring a target third-party resource matched with the resource name corresponding to the routing page from the third-party resource file, packaging the target third-party resource, and generating a target third-party resource file corresponding to the routing page. In the method, whether the resource name corresponding to the routing page is in the specified format or not is judged, and the target third-party resource is packaged according to two conditions, so that repeated loading of the target third-party resource is further avoided, and the request pressure of the server is further relieved.
When the target project is operated, if the routing page is triggered, the step of loading the target third-party resource file based on the file path of the target third-party resource file comprises the following steps: displaying a page in a target project through terminal equipment, and reading a specified label in the currently displayed page; wherein the designated tag is for: responding to the trigger operation aiming at the specified label, and displaying a routing page corresponding to the specified label; monitoring operation behaviors aiming at the specified tags, responding to that a target specified tag in the specified tags is displayed in a specified area of a browsing window, suspending a mouse pointer at the target specified tag, and acquiring a file path of a target third-party resource file used by a routing page corresponding to the target specified tag from a target corresponding relation; and loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in the memory of the browser. In the method, the target third party resource file corresponding to the routing page is loaded in advance by monitoring the target appointed label triggered by the user, so that the function of preloading the target third party resource to be used in the webpage can be achieved, and the request pressure of the server is reduced.
The step of reading the designated tag in the currently displayed page includes: reading a language tag in a currently displayed page, and acquiring an href attribute of the language tag; based on the href attribute, a specified tag in the language tags is determined. In this way, all the a tags are read, and then the designated tags with the routing page characteristics can be screened out based on the href attribute, so as to designate the linked target.
The step of loading the target third-party resource file from the server based on the file path and storing the target third-party resource file in the memory of the browser includes: judging whether a target third-party resource file used by a routing page corresponding to the target specified label is stored in a memory of the browser; and if not, loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in the memory of the browser. In the method, whether the target third-party resource file corresponding to the routing page exists in the memory of the browser or not is judged, so that the repeated request of the server for loading the target third-party resource file is avoided, the pressure of the server is relieved, the use of network resources is maximized, and the operation efficiency of the website is improved.
After the step of loading the target third-party resource file based on the file path of the target third-party resource file if the routing page is triggered when the target project is operated, the method further includes: and responding to the trigger operation aiming at the target specified label, loading a target third-party resource file used by the routing page corresponding to the target specified label from the memory of the browser, and displaying the routing page based on the target third-party resource file. In the method, the target third-party resource of the routing page to be displayed is directly searched from the memory of the browser, so that the effect of displaying the routing page by fast rendering can be realized.
The method further comprises the following steps: and deleting the files stored in the memory of the browser at regular time. In the mode, the memory is cleaned regularly by the browser, so that the memory space of the browser can be reduced, and the running efficiency of the browser is improved.
Further, the electronic device shown in fig. 4 further includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103, and the memory 101 are connected through the bus 102.
The Memory 101 may include a Random Access Memory (RAM) and a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like may be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Processor 100 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 100. The Processor 100 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The present embodiments also provide a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the above-described resource processing method. The method is applied to a terminal device, a plurality of resource folders of a target project are configured in the terminal device, and resource codes of the target project are stored in the resource folders, and the method comprises the following steps:
acquiring target resource codes stored in a target resource folder related to the routing page from the plurality of resource folders, and determining a resource name of a target third-party resource used by the routing page based on the target resource codes; generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project; and issuing the target corresponding relation to a corresponding server, and generating a file path of a target third-party resource file used by each routing page, so that when a target project is operated, if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file. Because the target third-party resource used by each routing page is part of all the third-party resources, only the resource file of the target third-party resource is generated, so that when the target project is operated, the corresponding resource file is loaded according to the currently triggered routing page, the problem of loading and analyzing all the resource files when the first page is opened is solved, the request pressure of the server and the waste of network resources are reduced, and the operating efficiency of the project is improved.
The step of obtaining the target resource code stored in the target resource folder related to the routing page from the plurality of resource folders and determining the resource name of the target third-party resource used by the routing page based on the target resource code includes: acquiring a routing path of each target resource folder in a first resource folder; the first resource folder is stored with a plurality of target resource folders, and each target resource folder is provided with a corresponding routing page; according to the routing path, acquiring a target resource code stored in a target resource folder, and converting the target resource code into a character string; and determining a target character string in a specified form from the character string, and determining a resource name of a target third-party resource used by the routing page from the target character string. In the method, the accurate resource name can be obtained by obtaining the routing path of the target resource folder, reading the target resource code and converting the target resource code into the target character string in the specified form, and determining the resource name of the target third-party resource according to the target character string in the specified form.
The step of determining the resource name of the target third-party resource used by the routing page from the target character string includes: determining an initial resource name from the target character string, deleting the resource name containing the specified content in the initial resource name, and obtaining a middle resource name; deleting the resource name of the resource file which is not published in the appointed website in the intermediate resource names to obtain a target resource name; and determining the target resource name as the resource name of the target third-party resource used by the routing page. In the method, the initial resource name is determined from the target character string, the resource name of the target third-party resource used by the routing page is further screened and determined, the invalid resource name of the third-party resource is deleted, the accuracy of the resource name is improved, and the file size of the third-party resource is further reduced.
The step of generating the target corresponding relationship between the routing page and the target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file includes: generating a first corresponding relation between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page; and according to the first corresponding relation, acquiring a target third-party resource file used by the routing page from the third-party resource file, and generating a target corresponding relation between the routing page and the target third-party resource file. In the method, the resource names of the target third-party resources in the set are divided and combined to obtain the first corresponding relation between the routing page and the resource names, and the target corresponding relation between the routing page and the target third-party resource files is generated, so that the problem of loading and analyzing all resource files when the home page is opened is solved.
The step of generating the first corresponding relationship between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page includes: generating an initial corresponding relation with a first specified data structure according to the resource name of the target third-party resource used by the routing page; wherein the initial correspondence is used for: one or more target third-party resource files are correspondingly generated on each routing page in a packaging result obtained by packaging the third-party resource files based on the initial corresponding relation; processing the initial corresponding relation to generate a first corresponding relation; wherein the first correspondence is for: and correspondingly generating one or more target third-party resource files in each routing page in a packaging result obtained by packaging the third-party resource files based on the first corresponding relation. In the method, the first corresponding relation is obtained by processing the resource names which are overlapped in the initial corresponding relation, and the problem of repeated loading when the page is opened for the same third-party resource file is solved by the relation between the routing page and the target third-party resource file which is obtained based on the first corresponding relation.
The step of processing the initial correspondence to generate a first correspondence includes: if the resource names of the target third-party resources used by each routing page in the initial corresponding relation have the same first resource name, deleting the first resource names corresponding to the sub-pages except the head page in the routing page; and if the resource names of the target third-party resources used by the target sub-pages in the sub-pages except the head page in the routing page in the initial corresponding relation have the same second resource name, setting the resource names corresponding to the target sub-pages into a specified format, and generating the first corresponding relation. In the method, the resource name coincident with the home page in the sub-page is deleted, and the designated format is set for the coincident resource name in the sub-page, so that the duplicate removal effect can be achieved, the target third-party resource is prevented from being repeatedly loaded, and the request pressure of the server is further reduced.
The step of obtaining the target third-party resource file used by the routing page from the third-party resource file according to the first corresponding relationship and generating the target corresponding relationship between the routing page and the target third-party resource file includes: judging whether the resource name corresponding to the routing page in the first corresponding relation is in a specified format or not; if yes, respectively acquiring target third-party resources matched with the resource names corresponding to the routing pages from the third-party resource files, respectively packaging each target third-party resource, and generating a plurality of target third-party resource files corresponding to the routing pages; if not, acquiring a target third-party resource matched with the resource name corresponding to the routing page from the third-party resource file, packaging the target third-party resource, and generating a target third-party resource file corresponding to the routing page. In the method, whether the resource name corresponding to the routing page is in the designated format or not is judged, and the target third-party resource is packaged in two conditions, so that repeated loading of the target third-party resource is further avoided, and the request pressure of the server is further reduced.
When the target project is operated, if the routing page is triggered, loading the target third-party resource file based on the file path of the target third-party resource file, wherein the step comprises the following steps: displaying a page in a target project through terminal equipment, and reading a specified label in the currently displayed page; wherein the designated tag is for: responding to the trigger operation aiming at the specified label, and displaying a routing page corresponding to the specified label; monitoring operation behaviors aiming at the specified tags, responding to that a target specified tag in the specified tags is displayed in a specified area of a browsing window, suspending a mouse pointer at the target specified tag, and acquiring a file path of a target third-party resource file used by a routing page corresponding to the target specified tag from a target corresponding relation; and loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in the memory of the browser. In the method, the target third party resource file corresponding to the routing page is loaded in advance by monitoring the target appointed label triggered by the user, so that the function of preloading the target third party resource to be used in the webpage can be achieved, and the request pressure of the server is reduced.
The step of reading the designated tag in the currently displayed page includes: reading a language tag in a currently displayed page, and acquiring an href attribute of the language tag; based on the href attribute, a specified tag in the language tags is determined. In the mode, all the a labels are read, and the specified label with the routing page characteristic can be screened out based on the href attribute, so that the linked target is specified.
The step of loading the target third-party resource file from the server based on the file path and storing the target third-party resource file in the memory of the browser includes: judging whether a target third-party resource file used by a routing page corresponding to the target specified label is stored in a memory of the browser; and if not, loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in the memory of the browser. In the method, whether the target third-party resource file corresponding to the routing page exists in the memory of the browser is judged, so that repeated requests for the server to load the target third-party resource file are avoided, the pressure of the server is relieved, the use of network resources is maximized, and the operation efficiency of the website is improved.
After the step of loading the target third-party resource file based on the file path of the target third-party resource file if the routing page is triggered when the target project is operated, the method further includes: and responding to the trigger operation aiming at the target specified label, loading a target third-party resource file used by the routing page corresponding to the target specified label from the memory of the browser, and displaying the routing page based on the target third-party resource file. In the method, the target third-party resource of the routing page to be displayed is directly searched from the memory of the browser, so that the effect of displaying the routing page by fast rendering can be realized.
The method further comprises the following steps: and deleting the files stored in the memory of the browser at regular time. In the mode, the memory is cleaned regularly by the browser, so that the memory space of the browser can be reduced, and the running efficiency of the browser is improved.
The resource processing method, the resource processing apparatus, the electronic device, and the computer program product of the storage medium provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as being fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in a specific case to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the following embodiments are merely illustrative of the present invention, and not restrictive, and the scope of the present invention is not limited thereto: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (15)

1. A resource processing method applied to a terminal device, wherein a plurality of resource folders of a target item are configured in the terminal device, and resource codes of the target item are stored in the plurality of resource folders, the method comprising:
acquiring target resource codes stored in a target resource folder related to a routing page from the plurality of resource folders, and determining a resource name of a target third-party resource used by the routing page based on the target resource codes;
generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and a pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project;
and issuing the target corresponding relation to a corresponding server, and generating a file path of a target third-party resource file used by each routing page, so that when the target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file.
2. The method of claim 1, wherein obtaining a target resource code stored in a target resource folder associated with the routing page from the plurality of resource folders, and determining a resource name of a target third-party resource used by the routing page based on the target resource code comprises:
acquiring a routing path of each target resource folder in a first resource folder; a plurality of target resource folders are stored in the first resource folder, and each target resource folder is provided with a corresponding routing page;
acquiring a target resource code stored in the target resource folder according to the routing path, and converting the target resource code into a character string;
and determining a target character string in a specified form from the character string, and determining a resource name of a target third-party resource used by the routing page from the target character string.
3. The method of claim 2, wherein determining the resource name of the target third-party resource used by the routing page from the target string comprises:
determining an initial resource name from the target character string, deleting the resource name containing the specified content in the initial resource name, and obtaining a middle resource name;
deleting the resource names of the resource files which are not published in the appointed website in the intermediate resource names to obtain target resource names;
and determining the target resource name as the resource name of the target third-party resource used by the routing page.
4. The method according to claim 1, wherein the step of generating the target corresponding relationship between the routing page and the target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file comprises:
generating a first corresponding relation between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page;
and acquiring a target third-party resource file used by the routing page from the third-party resource file according to the first corresponding relation, and generating a target corresponding relation between the routing page and the target third-party resource file.
5. The method according to claim 4, wherein the step of generating the first corresponding relationship between the routing page and the resource name of the target third-party resource according to the resource name of the target third-party resource used by the routing page comprises:
generating an initial corresponding relation with a first specified data structure according to the resource name of the target third-party resource used by the routing page;
and processing the initial corresponding relation to generate the first corresponding relation.
6. The method of claim 5, wherein the step of processing the initial correspondence to generate the first correspondence comprises:
if the resource names of the target third-party resources used by each routing page in the initial corresponding relation have the same first resource name, deleting the first resource names corresponding to the sub-pages except the head page in the routing page;
and if the resource names of the target third-party resources used by the target sub-pages in the sub-pages except the head page in the initial corresponding relation have the same second resource name, setting the resource names corresponding to the target sub-pages into a specified format, and generating the first corresponding relation.
7. The method according to claim 4, wherein the step of obtaining a target third-party resource file used by the routing page from the third-party resource file according to the first corresponding relationship, and generating a target corresponding relationship between the routing page and the target third-party resource file comprises:
judging whether the resource name corresponding to the routing page in the first corresponding relation is in a specified format or not;
if yes, respectively acquiring target third-party resources matched with the resource names corresponding to the routing pages from the third-party resource files, respectively packaging each target third-party resource, and generating a plurality of target third-party resource files corresponding to the routing pages;
if not, acquiring a target third-party resource matched with the resource name corresponding to the routing page from the third-party resource file, packaging the target third-party resource, and generating a target third-party resource file corresponding to the routing page.
8. The method of claim 1, wherein the step of loading the target third-party resource file based on the file path of the target third-party resource file if the routing page is triggered while running the target project comprises:
displaying a page in the target project through the terminal equipment, and reading a specified label in the currently displayed page; wherein the designated tag is to: responding to the trigger operation aiming at the specified label, and displaying a routing page corresponding to the specified label;
monitoring the operation behavior aiming at the specified tags, responding to that the target specified tags in the specified tags are displayed in the specified area of a browsing window, and a mouse pointer is suspended on the target specified tags, and acquiring the file path of the target third-party resource file used by the routing page corresponding to the target specified tags from the target corresponding relation;
and loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in a browser memory.
9. The method of claim 8, wherein the step of reading the designated tag in the currently displayed page comprises:
reading a language tag in a currently displayed page, and acquiring an href attribute of the language tag;
determining the specified one of the language tags based on the href attribute.
10. The method of claim 8, wherein the step of loading the target third party resource file from the server based on the file path and storing the target third party resource file in a browser memory comprises:
judging whether a target third-party resource file used by a routing page corresponding to the target designated tag is stored in the memory of the browser;
and if not, loading the target third-party resource file from the server based on the file path, and storing the target third-party resource file in a browser memory.
11. The method of claim 8, wherein when the target project is executed, if the routing page is triggered, after the step of loading the target third party resource file based on the file path of the target third party resource file, the method further comprises:
and responding to the trigger operation aiming at the target specified label, loading a target third-party resource file used by a routing page corresponding to the target specified label from the memory of the browser, and displaying the routing page based on the target third-party resource file.
12. The method of claim 8, further comprising: and deleting the files stored in the browser memory at regular time.
13. A resource processing apparatus, which is applied to a terminal device in which a plurality of resource folders of a target item are configured, and in which resource codes of the target item are stored, the apparatus comprising:
the determining module is used for acquiring a target resource code stored in a target resource folder related to the routing page from the plurality of resource folders and determining a resource name of a target third-party resource used by the routing page based on the target resource code;
the generating module is used for generating a target corresponding relation between the routing page and a target third-party resource file according to the resource name of the target third-party resource used by the routing page and the pre-generated third-party resource file; the third-party resource file stores all third-party resources of the target project, and the target third-party resource file stores part of the third-party resources of the target project;
and the loading module is used for publishing the target corresponding relation to a corresponding server and generating a file path of a target third-party resource file used by each routing page, so that when the target project is operated and if the routing page is triggered, the target third-party resource file is loaded based on the file path of the target third-party resource file.
14. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the resource handling method of any one of claims 1-12.
15. A computer-readable storage medium having stored thereon computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the resource handling method of any of claims 1-12.
CN202211160861.7A 2022-09-22 2022-09-22 Resource processing method and device and electronic equipment Pending CN115905118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211160861.7A CN115905118A (en) 2022-09-22 2022-09-22 Resource processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211160861.7A CN115905118A (en) 2022-09-22 2022-09-22 Resource processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115905118A true CN115905118A (en) 2023-04-04

Family

ID=86481367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211160861.7A Pending CN115905118A (en) 2022-09-22 2022-09-22 Resource processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115905118A (en)

Similar Documents

Publication Publication Date Title
US10452765B2 (en) Web content rewriting, including responses
US8762556B2 (en) Displaying content on a mobile device
CN103176844B (en) The changing method of a kind of IE6 kernel and novel I E kernel and system
CN103605688B (en) Intercept method and intercept device for homepage advertisements and browser
CN108717435B (en) Webpage loading method, information processing method, computer equipment and storage medium
US10853319B2 (en) System and method for display of document comparisons on a remote device
CN108021598B (en) Page extraction template matching method and device and server
CN106126693A (en) The sending method of the related data of a kind of webpage and device
CN113703785B (en) Component-based platform deployment method, device, equipment and storage medium
CN110222251B (en) Service packaging method based on webpage segmentation and search algorithm
CN105141678B (en) The method and apparatus that a kind of pair of file is managed
JP2010170453A (en) Static web site construction method, static web site construction service providing method, dynamic/static conversion processor, and dynamic/static conversion processing program
WO2023092580A1 (en) Page display method and apparatus, storage medium, and electronic device
CN113127776A (en) Breadcrumb path generation method and device and terminal equipment
CN115080154A (en) Page display method and device, storage medium and electronic equipment
CN113656737A (en) Webpage content display method and device, electronic equipment and storage medium
CN111680247B (en) Local calling method, device and equipment of webpage character strings and storage medium
US10284628B2 (en) Distribution method and resource acquisition method
EP2711838A1 (en) Documentation parser
US20130132820A1 (en) Web browsing tool delivering relevant content
CN116451271A (en) Automatic privacy policy extraction method for application software
CN115905118A (en) Resource processing method and device and electronic equipment
CN112231599B (en) Method for collecting component types in component electronic commerce platform
CN114528510A (en) Webpage data processing method and device, electronic equipment and medium
CN114168875A (en) Page program generation method and device, computer equipment and storage medium

Legal Events

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