CN113392346B - Path processing method and device for resource file, electronic equipment and storage medium - Google Patents

Path processing method and device for resource file, electronic equipment and storage medium Download PDF

Info

Publication number
CN113392346B
CN113392346B CN202110668207.6A CN202110668207A CN113392346B CN 113392346 B CN113392346 B CN 113392346B CN 202110668207 A CN202110668207 A CN 202110668207A CN 113392346 B CN113392346 B CN 113392346B
Authority
CN
China
Prior art keywords
path
resource file
resource
absolute path
absolute
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.)
Active
Application number
CN202110668207.6A
Other languages
Chinese (zh)
Other versions
CN113392346A (en
Inventor
杨斌
黄克旺
陶云龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Doumen Information Technology Co ltd
Original Assignee
Beijing Doumen Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Doumen Information Technology Co ltd filed Critical Beijing Doumen Information Technology Co ltd
Priority to CN202110668207.6A priority Critical patent/CN113392346B/en
Publication of CN113392346A publication Critical patent/CN113392346A/en
Application granted granted Critical
Publication of CN113392346B publication Critical patent/CN113392346B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9558Details of hyperlinks; Management of linked annotations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

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

Abstract

The disclosure provides a path processing method and device of a resource file, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: acquiring a first absolute path of each resource file of a webpage item; carrying out serialization processing on the first absolute path according to a preset processing rule to obtain a second absolute path; determining a public path of each resource file based on the preconfigured domain name information and the second absolute path; and replacing the relative path in the resource files with the public path for the resource files containing the relative path. In the technical scheme, the problem of relative paths is not needed to be considered in the early-stage project development process, and the data packet which does not contain the relative path resource file is automatically generated after the project is packed, so that the workload of modifying the relative paths is reduced, and the risk of omission or mistakes is avoided.

Description

Path processing method and device for resource file, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of web page processing.
Background
With the development of computer technology and network technology, the internet changes the life style of people, and people can acquire various information by logging in various websites so as to meet the demands of daily life.
When the web page is put on a third party platform corresponding to each website for operation, in order to ensure the safety, the third party platform can conduct rule auditing on the links of the web page, and logic change (for example, changing the path of a resource file and the like) is conducted on the links which do not meet the rule requirements, and then a new link is generated for putting. Therefore, in order to meet the requirements of the third party platform, the web page put on the third party platform cannot have a relative path, however, because the relative path is easy to operate, most of resource files in project development can use the relative path, if the manual work is too large to change one by one, and the relative path of the resource files in the project is easy to miss or make mistakes, so that how to change the relative path of the resource files in the project efficiently becomes a problem to be solved.
Disclosure of Invention
The disclosure provides a path processing method and device of a resource file, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a path processing method of a resource file, the method being applied to a packaging tool of a web page item, the method including:
acquiring a first absolute path of each resource file of a webpage item;
carrying out serialization processing on the first absolute path according to a preset processing rule to obtain a second absolute path;
determining a public path of each resource file based on the preconfigured domain name information and the second absolute path;
and replacing the relative path in the resource files with the public path for the resource files containing the relative path.
According to another aspect of the present disclosure, there is provided a path processing apparatus for a resource file, the apparatus being applied to a packaging tool for a web page item, the apparatus comprising:
the acquisition module is used for acquiring a first absolute path of each resource file of the webpage item;
the processing module is used for carrying out serialization processing on the first absolute path according to a preset processing rule to obtain a second absolute path;
the determining module is used for determining a public path of each resource file based on the preconfigured domain name information and the second absolute path;
and the replacing module is used for replacing the resource files containing the relative paths in the resource files with the public paths.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method in any of the embodiments of the present disclosure.
The technical scheme solves the problems that the relative path of the resource files is large in workload and easy to miss or make mistakes when the resource files are manually changed one by one. In the technical scheme, the relative path in each resource file is uniformly replaced by the public path in the process of packaging the resource files in the webpage project by using the packaging tool, so that the webpage put on the third-party platform does not contain the relative path, the problem of the relative path is not required to be considered in the early-stage project development process, the data packet which does not contain the relative path resource file is automatically generated after the project is packaged, the workload of modifying the relative path is reduced, and the risk of omission or mistakes is avoided.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a path processing method of a resource file according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram of a path processing method of a resource file according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of a path processing device for a resource file according to an embodiment of the disclosure;
fig. 4 is a block diagram of an electronic device for implementing a path processing method of a resource file according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The technical scheme of the disclosure can be applied to a packing tool of webpage items, such as weback and the like. And in the process of packaging the resource files in the webpage project by using the packaging tool, uniformly replacing the relative path in each resource file by using the public path, automatically generating a package which does not contain the resource files of the relative path after the project is packaged, and directly putting the package into a third party platform, so that the package meets the requirement that the third party platform does not allow the relative path in the resource files of the webpage project.
The execution subject of the present disclosure may be any electronic device, for example, a terminal device of a packaging tool in which a web page item is installed, or the like. The path processing method of the resource file in the embodiment of the present disclosure will be described in detail below.
Fig. 1 is a schematic diagram of a path processing method of a resource file according to an embodiment of the disclosure. The method can be applied to a packing tool of webpage items, as shown in fig. 1, and the method can comprise the following steps:
step S101, obtaining a first absolute path of each resource file of a webpage item;
the resource files may include, but are not limited to, various types of files that may be included in a web page such as text, images, audio, video, and audio. The first absolute path may be configured according to specific needs.
Step S102, carrying out serialization processing on the first absolute path according to a preset processing rule to obtain a second absolute path;
among them, a Serialization (Serialization) process is a process of converting state information of an object into a form that can be stored or transmitted. During serialization, an object writes its current state to a temporary or persistent storage area. Later, the object may be recreated by reading or de-serializing the state of the object from the storage area.
The preset processing rules can be determined according to specific configuration files, and serialization processing rules corresponding to different configuration files can be different.
Step S103, determining a public path of each resource file based on the preconfigured domain name information and the second absolute path;
based on the domain name information and the second absolute path, a unified public path can be obtained, and the unified public path can be used for replacing the relative path in each resource file in the subsequent step. Wherein the domain name information may be preconfigured.
Step S104, for each resource file containing the relative path, the relative path is replaced by the public path.
Wherein the relative path is the path relative to the current file. If the webpage contains the relative path, the security of the webpage cannot be confirmed by the third party platform, so that the public path is utilized to uniformly replace the relative path of each resource file so as to meet the requirement of the third party platform.
According to the path processing method for the resource files, the relative paths in each resource file are uniformly replaced by the public paths in the process of packaging the resource files in the webpage project by using the packaging tool, so that the webpage put on the third-party platform does not contain the relative paths, the problem of the relative paths is not required to be considered in the early-stage project development process, the data packet which does not contain the relative path resource files is automatically generated after the project is packaged, the workload of modifying the relative paths is reduced, and the risk of omission or mistakes is avoided.
For a specific implementation of step S101, see the following embodiments.
In one possible implementation, obtaining a first absolute path of each resource file of the web page item includes:
and receiving a preconfigured first absolute path when the webpage item is a landing page item under the Vue frame, and adding the first absolute path into a first configuration file in the landing page item by using a node. Js script language, wherein the first configuration file is env.
Where Vue is a set of progressive frameworks used to build user interfaces. The landing page may also be called a landing page or a guide page, and may be a web page that is displayed to a user after the user clicks on an advertisement or searches using a search engine, and typically the page will display expanded content related to the clicked advertisement or a link to the search result.
The node is an event-driven I/O server JavaScript operating environment, and the Chrome V8 engine based on Google has the advantages of high speed and good performance when the V8 engine executes Javascript.
The first variable configuration file may be a configuration file located at the entry of the project, and the first absolute path incoming by the node.
For a specific implementation of step S102, see the following embodiments.
In one possible implementation manner, the serializing processing is performed on the first absolute path according to a preset processing rule to obtain a second absolute path, including:
carrying out serialization processing on the first absolute path through the first configuration file according to a processing rule corresponding to the first configuration file to obtain a processed first absolute path;
and carrying out serialization processing on the processed first absolute path through a second configuration file in the landing page item according to a processing rule corresponding to the second configuration file to obtain a second absolute path, wherein the second configuration file is vue.
The first configuration file and the second configuration file respectively correspond to the processing rules, and the first absolute path is correspondingly processed according to the corresponding processing rules so as to accord with the processing process of the packaging tool under the Vue frame.
For a specific implementation of step S103, see the following embodiment.
In one possible implementation, determining the common path of each resource file based on the preconfigured domain name information and the second absolute path includes:
and splicing the preconfigured domain name information with the second absolute path to obtain a public path.
In practical application, the second absolute path is spliced behind the preconfigured domain name information to obtain a unified public path of each resource file in the project, and the unified public path can be used for replacing the relative path in each resource file in the subsequent step.
For a specific implementation of step S104, see the following embodiment.
In one possible implementation, for each resource file that includes a relative path, replacing the relative path with a common path includes:
assigning the publicpath attribute in the packaging tool by using the public path to obtain an attribute value;
and replacing the resource files containing the relative paths with attribute values for the resource files containing the relative paths.
In practical application, the public path attribute is assigned to obtain the attribute value of the public path attribute, the attribute value of the public path attribute is used for replacing the relative path in the resource file for the resource file containing the relative path, and the replacement operation can be omitted for the resource file not containing the relative path. And after the project is packed, a data packet which does not contain the resource file of the relative path is automatically generated, so that the workload of modifying the relative path is reduced, and the risk of omission or mistakes is avoided.
In one possible implementation manner, for each resource file containing a relative path, replacing the relative path with an attribute value includes:
traversing each resource file in the resource files, and determining whether the access path of the resource file contains specific characters or not;
and replacing the position corresponding to the specific character in the access path by using the attribute value for the resource file containing the specific character in the access path.
In practice, each of the resource files of the web page project is traversed, each resource file having an access path according to which the resource file can be accessed. Identifying whether the access path of the resource file contains a specific character or not, wherein the specific character is used for indicating that the access path is a relative path, the specific character can include but is not limited to,/, if the access path contains the specific character, the access path of the resource file is indicated to be the relative path, and replacing the position corresponding to the specific character in the access path of the resource file, namely the position corresponding to the relative path, by using the attribute value of the publicpath attribute, thereby obtaining the data packet of the resource file which does not contain the relative path.
The implementation of the path processing method of the resource file in the present disclosure is described in the following by a specific embodiment. Fig. 2 is a schematic diagram of a path processing method of a resource file according to an embodiment of the disclosure.
In this embodiment, the packing tool is weback. As shown in fig. 2, the method in this embodiment includes:
step S201, adding the preconfigured first absolute path into an env.config.js file in a landing page project by using a node.js script language;
step S202, carrying out serialization processing on the first absolute path according to a processing rule corresponding to the first configuration file through an env.config.js file to obtain a processed first absolute path;
step S203, the processed first absolute path is subjected to serialization processing according to the processing rule corresponding to the second configuration file through the vue.config.js file, and a second absolute path is obtained;
step S204, splicing the domain name information and the second absolute path to obtain a public path;
step S205, the public path attribute in the weback is assigned by utilizing the public path;
step S206, traversing each resource file in the resource files, and determining whether the access path of the resource file contains specific characters;
step S207, for the resource file containing the specific character in the access path, replacing the position corresponding to the specific character in the access path of the resource file by the attribute value of the publicpath attribute.
According to the path processing method for the resource files, the relative paths in each resource file are uniformly replaced by the public paths in the process of packaging the resource files in the webpage project by using the packaging tool, so that the webpage put on the third-party platform does not contain the relative paths, the problem of the relative paths is not required to be considered in the early-stage project development process, the data packet which does not contain the relative path resource files is automatically generated after the project is packaged, the workload of modifying the relative paths is reduced, and the risk of omission or mistakes is avoided.
Fig. 3 is a schematic diagram of a path processing apparatus for a resource file according to an embodiment of the disclosure. The device is applied to a packing tool of webpage items, as shown in fig. 3, and the device can comprise:
an obtaining module 301, configured to obtain a first absolute path of each resource file of a web page item;
the processing module 302 is configured to perform serialization processing on the first absolute path according to a preset processing rule, so as to obtain a second absolute path;
a determining module 303, configured to determine a common path of each resource file based on the preconfigured domain name information and the second absolute path;
and the replacing module 304 is configured to replace, for each resource file that includes a relative path, the relative path in the resource file with a common path.
According to the path processing device for the resource files, the relative paths in each resource file are uniformly replaced by the public paths in the process of packaging the resource files in the webpage project by using the packaging tool, so that the webpage put into the third-party platform does not contain the relative paths, the problem of the relative paths is not required to be considered in the early-stage project development process, the package which does not contain the relative path resource files is automatically generated after the project is packaged, the workload of modifying the relative paths is reduced, and the risk of omission or mistakes is avoided.
In one possible implementation, the obtaining module 301 is specifically configured to:
and receiving a preconfigured first absolute path when the webpage item is a landing page item under the Vue frame, and adding the first absolute path into a first configuration file in the landing page item by using a node. Js script language, wherein the first configuration file is env.
In one possible implementation, the processing module 302 is specifically configured to:
carrying out serialization processing on the first absolute path through the first configuration file according to a processing rule corresponding to the first configuration file to obtain a processed first absolute path;
and carrying out serialization processing on the processed first absolute path through a second configuration file in the landing page item according to a processing rule corresponding to the second configuration file to obtain a second absolute path, wherein the second configuration file is vue.
In one possible implementation, the determining module 303 is specifically configured to:
and splicing the preconfigured domain name information with the second absolute path to obtain a public path.
In one possible implementation, the replacement module 304 includes an assignment unit and a replacement unit;
the assignment unit is used for assigning the publicpath attribute in the packaging tool by utilizing the public path to obtain an attribute value;
and the replacing unit is used for replacing the resource files containing the relative paths in the resource files with attribute values.
In one possible implementation, the replacement unit is specifically configured to:
traversing each resource file in the resource files, and determining whether the access path of the resource file contains specific characters or not;
and replacing the position corresponding to the specific character in the access path by using the attribute value for the resource file containing the specific character in the access path.
The functions of each unit, module or sub-module in each apparatus of the embodiments of the present disclosure may be referred to the corresponding descriptions in the above method embodiments, which are not repeated herein.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 4 illustrates a schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 4, the electronic device 400 includes a computing unit 401 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 may also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input output (I/O) interface 405 is also connected to bus 404.
Various components in electronic device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, etc.; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 401 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the respective methods and processes described above, for example, a path processing method of a resource file. For example, in some embodiments, the path processing method of the resource file may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the path processing method of the resource file described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the path processing method of the resource file in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (8)

1. A method for processing a path of a resource file, wherein the method is applied to a packaging tool of a webpage item, and the method comprises the following steps:
acquiring a first absolute path of each resource file of a webpage item;
carrying out serialization processing on the first absolute path according to a preset processing rule to obtain a second absolute path;
determining a public path of each resource file based on the preconfigured domain name information and the second absolute path;
replacing the resource files containing the relative paths in the resource files with the public paths;
the determining the public path of each resource file based on the preconfigured domain name information and the second absolute path comprises the following steps:
and splicing the preset domain name information with the second absolute path to obtain the public path.
2. The method of claim 1, wherein the obtaining a first absolute path of each resource file of a web page item comprises:
and receiving a preconfigured first absolute path when the webpage item is a landing page item under a Vue frame, and adding the first absolute path into a first configuration file in the landing page item by using a node. Js script language, wherein the first configuration file is env. Config. Js.
3. The method of claim 2, wherein the serializing the first absolute path according to a preset processing rule to obtain a second absolute path includes:
carrying out serialization processing on the first absolute path through a first configuration file according to a processing rule corresponding to the first configuration file to obtain a processed first absolute path;
and carrying out serialization processing on the processed first absolute path through a second configuration file in the landing page item according to a processing rule corresponding to the second configuration file to obtain a second absolute path, wherein the second configuration file is vue.
4. A method according to any one of claims 1-3, wherein said replacing the relative path of the resource files containing the relative path with the common path comprises:
assigning the publicpath attribute in the packaging tool by using the public path to obtain an attribute value;
and replacing the resource files containing the relative paths with the attribute values for the resource files containing the relative paths.
5. The method of claim 4, wherein replacing the resource file containing the relative path with the attribute value comprises:
traversing each resource file in the resource files, and determining whether the access path of the resource file contains specific characters or not;
and replacing the position corresponding to the specific character in the access path by using the attribute value for the resource file containing the specific character in the access path.
6. A path processing device for a resource file, wherein the device is applied to a packaging tool for a web page item, and the device comprises:
the acquisition module is used for acquiring a first absolute path of each resource file of the webpage item;
the processing module is used for carrying out serialization processing on the first absolute path according to a preset processing rule to obtain a second absolute path;
the determining module is used for determining a public path of each resource file based on the preconfigured domain name information and the second absolute path;
the replacing module is used for replacing the resource files containing the relative paths in the resource files with the public paths;
the determining module is specifically configured to:
and splicing the preset domain name information with the second absolute path to obtain the public path.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
8. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-5.
CN202110668207.6A 2021-06-16 2021-06-16 Path processing method and device for resource file, electronic equipment and storage medium Active CN113392346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110668207.6A CN113392346B (en) 2021-06-16 2021-06-16 Path processing method and device for resource file, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110668207.6A CN113392346B (en) 2021-06-16 2021-06-16 Path processing method and device for resource file, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113392346A CN113392346A (en) 2021-09-14
CN113392346B true CN113392346B (en) 2023-09-12

Family

ID=77621473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110668207.6A Active CN113392346B (en) 2021-06-16 2021-06-16 Path processing method and device for resource file, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113392346B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816407A (en) * 2022-05-24 2022-07-29 新奥数能科技有限公司 Component packaging method and device, electronic equipment and storage medium
CN115333836B (en) * 2022-08-12 2023-05-30 北京百度网讯科技有限公司 Verification file processing method and device, electronic equipment and readable storage medium
CN116301471B (en) * 2023-05-18 2023-09-01 深圳前海环融联易信息科技服务有限公司 Method for realizing automatic file insertion and automatic file insertion method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567373A (en) * 2010-12-23 2012-07-11 上海鸣啸信息科技发展有限公司 Self-service terminal for Jiangsu speedway
CN108228818A (en) * 2017-12-29 2018-06-29 网易(杭州)网络有限公司 Web page resources loading method and device, electronic equipment and storage medium
CN108804926A (en) * 2018-05-23 2018-11-13 腾讯科技(深圳)有限公司 A kind of common Web application Hole Detection, restorative procedure and device
CN111428209A (en) * 2019-01-10 2020-07-17 腾讯科技(深圳)有限公司 Application program obfuscation method and device and storage medium
CN112149035A (en) * 2020-09-23 2020-12-29 网易(杭州)网络有限公司 Website static resource processing method and device
CN112181432A (en) * 2020-10-13 2021-01-05 普元信息技术股份有限公司 System for realizing bundle modular packaging processing in ReactNative framework
CN112230927A (en) * 2020-09-17 2021-01-15 贝壳技术有限公司 File redirection method, code loading control method and device
CN112260988A (en) * 2020-09-16 2021-01-22 厦门网宿有限公司 Abnormal request processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040030741A1 (en) * 2001-04-02 2004-02-12 Wolton Richard Ernest Method and apparatus for search, visual navigation, analysis and retrieval of information from networks with remote notification and content delivery

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567373A (en) * 2010-12-23 2012-07-11 上海鸣啸信息科技发展有限公司 Self-service terminal for Jiangsu speedway
CN108228818A (en) * 2017-12-29 2018-06-29 网易(杭州)网络有限公司 Web page resources loading method and device, electronic equipment and storage medium
CN108804926A (en) * 2018-05-23 2018-11-13 腾讯科技(深圳)有限公司 A kind of common Web application Hole Detection, restorative procedure and device
CN111428209A (en) * 2019-01-10 2020-07-17 腾讯科技(深圳)有限公司 Application program obfuscation method and device and storage medium
CN112260988A (en) * 2020-09-16 2021-01-22 厦门网宿有限公司 Abnormal request processing method and device
CN112230927A (en) * 2020-09-17 2021-01-15 贝壳技术有限公司 File redirection method, code loading control method and device
CN112149035A (en) * 2020-09-23 2020-12-29 网易(杭州)网络有限公司 Website static resource processing method and device
CN112181432A (en) * 2020-10-13 2021-01-05 普元信息技术股份有限公司 System for realizing bundle modular packaging processing in ReactNative framework

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Hadoop的在线数据挖掘系统的设计与实现;袁野;《中国优秀硕士学位论文全文数据库 信息科技辑》;I138-634 *

Also Published As

Publication number Publication date
CN113392346A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN113392346B (en) Path processing method and device for resource file, electronic equipment and storage medium
CN113342345A (en) Operator fusion method and device of deep learning framework
CN113010827B (en) Page rendering method and device, electronic equipment and storage medium
CN112506602B (en) Page generation method and device, electronic equipment and computer readable medium
CN113836462A (en) Page description file generation method, device, equipment and storage medium
CN113905040B (en) File transmission method, device, system, equipment and storage medium
CN114546343A (en) Generation method and device of activity page
CN112861504A (en) Text interaction method, device, equipment, storage medium and program product
CN113360407B (en) Function positioning method and device, electronic equipment and readable storage medium
CN113361235B (en) HTML file generation method and device, electronic equipment and readable storage medium
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN116560847B (en) Task processing method, device, electronic equipment and storage medium
CN114428646B (en) Data processing method and device, electronic equipment and storage medium
CN113553489B (en) Method, device, equipment, medium and program product for capturing content
CN116578801A (en) Page rendering method and device, electronic equipment and storage medium
CN115344801A (en) Method, device, equipment and medium for updating webpage link
CN115202791A (en) Method and device for determining first screen loading resource, server and storage medium
CN116627924A (en) Data reading method, system, device and readable storage medium
CN115964024A (en) Component processing method, calling method, device, equipment and storage medium
CN116501284A (en) Voice control method, device, equipment, storage medium and program product
CN116339728A (en) Data processing method, device, equipment, system, storage medium and product
CN114564133A (en) Application program display method, device, equipment and medium
CN115600029A (en) Method, device, system, equipment and storage medium for displaying webpage
CN115455029A (en) Battery replacement data acquisition method and device, electronic equipment and storage medium
CN117873452A (en) Static variable management method, device, electronic 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
GR01 Patent grant
GR01 Patent grant