CN113076291A - File positioning method, device, equipment and storage medium - Google Patents
File positioning method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113076291A CN113076291A CN202110461038.9A CN202110461038A CN113076291A CN 113076291 A CN113076291 A CN 113076291A CN 202110461038 A CN202110461038 A CN 202110461038A CN 113076291 A CN113076291 A CN 113076291A
- Authority
- CN
- China
- Prior art keywords
- file
- target
- information
- plug
- address
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012544 monitoring process Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 238000011161 development Methods 0.000 description 5
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 244000035744 Hura crepitans Species 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000002860 competitive effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/144—Query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/168—Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
Abstract
The application discloses a file positioning method, a device, equipment and a storage medium, comprising the following steps: creating a target plug-in for positioning a file to be positioned in a target webpage in a browser plug-in creating mode; the file to be positioned is a project resource corresponding to the target webpage; acquiring information for representing the address of a file to be positioned in a target webpage by using a target plug-in to obtain target positioning information corresponding to the file to be positioned; and matching the target positioning information with positioning information of files prestored in a preset database, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information. According to the method and the device, the corresponding target positioning information is obtained by creating and utilizing the target plug-in to obtain the information which is used for characterizing the address of the file to be positioned in the target webpage, and then the address of the file to be positioned is accessed based on the target positioning information which is successfully matched with the positioning information of the file stored in advance, so that the addressing speed of the project resource is increased, and the positioning efficiency is improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for locating a file.
Background
With the increasing of the types and the quantity of internet products, the corresponding products and the corresponding project storage addresses are more and more, and more products are stored in different addresses. However, as a developer, it should not spend much time looking for tools, but rather use tools to achieve efficient work. Aiming at the storage addresses of increasingly complex project resources, the traditional file positioning method needs manual copying and searching, is relatively clumsy, and developers cannot quickly search the storage addresses of project projects and other related website storage addresses.
Therefore, the rapid positioning of project resource addresses is very important in the development process, and for a piece of finished project document, a lot of projects are arranged in the project document, and a relatively long time is needed to find the projects, so that the development efficiency is greatly reduced. In summary, it is important to find a more efficient method for locating the resource address of the project.
Disclosure of Invention
In view of the above, the present invention provides a file positioning method, device, apparatus and storage medium, which can increase the addressing speed of project resources to improve the positioning efficiency. The specific scheme is as follows:
a first aspect of the present application provides a file location method, including:
creating a target plug-in for positioning a file to be positioned in a target webpage in a browser plug-in creating mode; the file to be positioned is a project resource corresponding to the target webpage;
acquiring information representing the address of the file to be positioned in the target webpage by using the target plug-in to obtain target positioning information corresponding to the file to be positioned;
and matching the target positioning information with positioning information of a file prestored in a preset database, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information.
Optionally, the creating a target plug-in for locating a file to be located in a target webpage by creating a browser plug-in includes:
creating a manifest.
And configuring the metadata in the manifest json file according to target requirements, and configuring the default icon, the default page and the default shortcut of the plug-in to be created to obtain the target plug-in.
Optionally, before the obtaining, by using the target plug-in, the information characterizing the address of the file to be located in the target webpage, the method further includes:
and monitoring the target webpage by using a monitoring function, and when the target webpage is monitored to be switched, executing the step of acquiring the information representing the address of the file to be positioned in the target webpage by using the target plug-in.
Optionally, the obtaining, by using the target plug-in, information representing an address of the file to be located in the target webpage to obtain target location information corresponding to the file to be located includes:
reading information representing the address of the file to be positioned in the target webpage by using the API of the target plug-in so as to obtain target positioning information corresponding to the file to be positioned; the target positioning information is domain name information and port number information which represent the address of the file to be positioned.
Optionally, after the reading, by using the API of the target plug-in, the information characterizing the address of the file to be located in the target webpage, the method further includes:
extracting the domain name information and the port number information in the information for representing the address of the file to be positioned in the target webpage by using a regular expression so as to obtain the domain name information and the port number information corresponding to the file to be positioned.
Optionally, the matching the target location information with location information of a file pre-stored in a preset database includes:
and respectively matching the domain name information and the port number information corresponding to the file to be positioned with positioning information of a file pre-stored in a preset database, if the matching fails, judging that no corresponding project resource exists in the domain name information and the port number information in the target positioning information, and stopping positioning the file to be positioned.
Optionally, if the matching result is obtained, accessing the address of the file to be located based on the target location information includes:
and generating a jump link for accessing the address of the file to be positioned according to the successfully matched target positioning information, and displaying the jump link through a display interface provided by the target plug-in.
A second aspect of the present application provides a file positioning apparatus comprising:
the system comprises a creating module, a searching module and a positioning module, wherein the creating module is used for creating a target plug-in for positioning a file to be positioned in a target webpage in a browser plug-in creating mode; the file to be positioned is a project resource corresponding to the target webpage;
the acquisition module is used for acquiring information which is used for representing the address of the file to be positioned in the target webpage by using the target plug-in so as to obtain target positioning information corresponding to the file to be positioned;
and the matching module is used for matching the target positioning information with positioning information of a file stored in a preset database in advance, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information.
A third aspect of the application provides an electronic device comprising a processor and a memory; wherein the memory is used for storing a computer program which is loaded and executed by the processor to implement the aforementioned file location method.
A fourth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the foregoing file locating method is implemented.
In the method, a target plug-in used for positioning a file to be positioned in a target webpage is created in a browser plug-in creating mode; and the file to be positioned is a project resource corresponding to the target webpage. And then, acquiring information for representing the address of the file to be positioned in the target webpage by using the target plug-in to obtain target positioning information corresponding to the file to be positioned. And finally, matching the target positioning information with positioning information of a file pre-stored in a preset database, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information. According to the method and the device, the corresponding target positioning information is obtained by creating and utilizing the target plug-in to obtain the information which is used for characterizing the address of the file to be positioned in the target webpage, and then the address of the file to be positioned is accessed based on the target positioning information which is successfully matched with the positioning information of the file stored in advance, so that the addressing speed of the project resource is increased, and the positioning efficiency is improved.
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, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a file location method provided herein;
FIG. 2 is a folder directory of a target add-in provided by the present application;
FIG. 3 is a schematic diagram illustrating a method for installing a browser extension according to the present application;
FIG. 4 is a schematic diagram of a specific file location method provided herein;
FIG. 5 is a schematic diagram of a display interface of a jump link provided by a target plug-in provided by the present application;
FIG. 6 is a schematic structural diagram of a document positioning apparatus provided in the present application;
FIG. 7 is a block diagram of a file location electronic device according to the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Aiming at the storage addresses of increasingly complex project resources, the traditional file positioning method needs manual copying and searching, is relatively clumsy, and developers cannot quickly search the storage addresses of project projects and other related website storage addresses. In order to overcome the technical defects, the application provides a file positioning scheme, corresponding target positioning information is obtained by creating and utilizing a target plug-in to obtain information for characterizing the address of a file to be positioned in a target webpage, and then the address of the file to be positioned is accessed based on the target positioning information successfully matched with the positioning information of the file stored in advance, so that the addressing speed of project resources is increased, and the positioning efficiency is improved.
Fig. 1 is a flowchart of a file locating method according to an embodiment of the present application. Referring to fig. 1, the file locating method includes:
s11: creating a target plug-in for positioning a file to be positioned in a target webpage in a browser plug-in creating mode; and the file to be positioned is a project resource corresponding to the target webpage.
In this embodiment, a target plug-in for locating a file to be located in a target webpage is created by creating a browser plug-in, where the file to be located is a project resource corresponding to the target webpage, and the project resource is a storage address of a resource for running a project and a product in the target webpage. The browser plug-in is an auxiliary tool based on the original functions of the browser and additionally provided with new functions, and the development of the expansion plug-in is bound to become the competitive direction of all large browser manufacturers. Google browser (Google Chrome) attracts a large number of users due to its highly secure sandbox technology, multithreading, stealth, fast and efficient browser experience. The Google browser is greatly convenient for developers based on an extended development mode of HTML (Hyper Text Markup Language), and can improve user experience and even solve some practical problems encountered in the use process. And the expansion plug-in created based on the Google browser increases the experience of the browser, so that the browser tends to be convenient and personalized. In the embodiment of the application, the target plug-in used for positioning the file to be positioned in the target webpage can be created in a mode of creating the Google browser plug-in. The Google browser plug-in is in the Google browser, does not belong to one part of a webpage, but is another self-defined webpage, is convenient and quick to use, and can directly search out related resources according to a preset scene. The Google browser plug-in is used for addressing the project resources, so that the complex steps of building a webpage to realize chain skipping, deployment and arrangement are avoided, and the addressing efficiency is improved.
Specifically, the step of creating the target plug-in includes: creating a manifest. And configuring the metadata in the manifest json file according to target requirements, and configuring the default icon, the default page and the default shortcut of the plug-in to be created to obtain the target plug-in. Json file is used to describe metadata of plug-ins, configuration information of plug-ins defines name of current plug-ins, description version number and other information, and any plug-in must have this file. Adding a plug-in default configuration includes, but is not limited to, configuring a default icon (default _ icon) and a default page (default _ pop), and adding a default shortcut open mode (subscribed _ key). In the code writing level, after a manifest.json file is generated, a required configuration is added, a home page path "browse _ action" { "default _ pop": hello.html } is set, a hello.html is generated under a current file directory, the current file directory is initialized, the algorithms of step S12 and step S13 are written in a webpage, and the finally generated folder directory is as shown in fig. 2. And opening a google browser, and installing the compiled and configured browser extension as shown in fig. 3. Json folders, which previously had a manifest, were used in development mode, google browsers would automatically recognize and load json configuration files and custom hello.
S12: and acquiring information for representing the address of the file to be positioned in the target webpage by using the target plug-in to obtain target positioning information corresponding to the file to be positioned.
In this embodiment, after the target plug-in is created, the target plug-in is used to obtain information representing the address of the file to be located in the target webpage, so as to obtain target location information corresponding to the file to be located. Specifically, the API of the target plug-in is used to read information representing the address of the file to be positioned in the target webpage, so as to obtain target positioning information corresponding to the file to be positioned; the target positioning information is domain name information and port number information which represent the address of the file to be positioned. Through the API of google itself, we can conveniently obtain the information of the current webpage and some necessary parameters in the google browser, for example, by calling the function "chrome. The method for acquiring the URL of the current page in JS (JavaScript) specifically comprises the following steps: name. tab. getselected (null, function (tab) { console. log (tab. url) }).
Further, after reading the information characterizing the address of the file to be positioned in the target webpage by using the API of the target plug-in, the method may further include extracting the domain name information and the port number information in the information characterizing the address of the file to be positioned in the target webpage by using a regular expression, so as to obtain the domain name information and the port number information corresponding to the file to be positioned. Since the information obtained through domain is a long string, a corresponding regular expression is needed to match some information, and the regular expression in the embodiment of the present application may be "/(\\/([ < lambda >/>) (? V ", so that the domain name and port can be separated and then matched separately in the database.
Further, before the target plug-in is used for acquiring the information characterizing the address of the file to be positioned in the target webpage, the method further comprises the step of monitoring the target webpage by using a monitoring function, and when the target webpage is monitored for switching, the step of acquiring the information characterizing the address of the file to be positioned in the target webpage by using the target plug-in is executed. As shown in fig. 4, after the google browser is started, the script creates a front-end information monitoring function to load and complete monitoring, and obtains information for switching corresponding target web pages, when the target web pages are monitored to be switched, the page information is read by using the API of the google browser plug-in, and the domain name and port information are obtained by regular matching.
S13: and matching the target positioning information with positioning information of a file prestored in a preset database, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information.
In this embodiment, the target location information is matched with location information of a file pre-stored in a preset database, and if matching is successful, an address of the file to be located is accessed based on the target location information. The format of the preset database can be as follows, the URL and the port of the link are obtained according to the above steps to perform quick resource item traversal positioning, so that the convenience of manual search is saved, and of course, the data format can be changed into other database structures as well as more varieties, and the method in this embodiment can be implemented.
In a specific embodiment, the domain name information and the port number information corresponding to the file to be positioned are respectively matched with positioning information of a file pre-stored in a preset database, if matching fails, it is determined that no corresponding item resource exists in the domain name information and the port number information in the target positioning information, and positioning of the file to be positioned is stopped. Certainly, in the above steps, it is determined that there is no corresponding item resource in the current domain name and port number under the condition of final matching failure, and the file to be located is stopped being located, that is, all the location information in the preset database is only limited to the processing result after matching and searching.
In another specific embodiment, the target positioning information is matched with positioning information of a file pre-stored in a preset database, if the matching is successful, a jump link for accessing an address of the file to be positioned is generated according to the target positioning information successfully matched, and the jump link is displayed through a display interface provided by the target plug-in. And matching the obtained title, the domain name and the port number of the current label in a background database, and matching corresponding project engineering addresses, wherein one or more project engineering addresses may be displayed one by one through a display interface. It is easy to understand that the number of the item resource jump links displayed on the display interface can be set by the background configuration, or jump access can be directly performed on the address of the location file corresponding to the successfully matched target location information without displaying the jump links.
The display interface provided by the target plug-in can be generated by means of HTML, JS and CSS (Cascading Style Sheets), and then the project resource address can be quickly accessed by clicking the related jump link on the display interface. As shown in fig. 5, a specific display interface provided for the target plug-in, clicking the "open" button may open a new page by calling the "chrome. Therefore, the address of the project can be conveniently and quickly searched in real time by means of the Google browser plug-in a browser page opening mode to effectively position. By the method, the webpage attributes are obtained by the browser plug-in, the project engineering address is quickly searched in the background and finally displayed to the plug-in for page display, a user can control the browser to newly open a window so as to quickly locate the project resource address, the generated webpage and the related jump link are quickly located and jumped, manual searching and locating are not needed for jumping again, the intermediate process is omitted, and the whole process is automatically processed.
Therefore, in the embodiment of the application, a target plug-in for positioning a file to be positioned in a target webpage is created in a browser plug-in creating mode; and the file to be positioned is a project resource corresponding to the target webpage. And then, acquiring information for representing the address of the file to be positioned in the target webpage by using the target plug-in to obtain target positioning information corresponding to the file to be positioned. And finally, matching the target positioning information with positioning information of a file pre-stored in a preset database, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information. According to the method and the device for locating the address of the file to be located, the corresponding target locating information is obtained by creating and utilizing the target plug-in to obtain the information which characterizes the address of the file to be located in the target webpage, then the address of the file to be located is accessed based on the target locating information which is successfully matched with the locating information of the file stored in advance, the addressing speed of project resources is increased, and the locating efficiency is improved.
Referring to fig. 6, an embodiment of the present application further discloses a file positioning apparatus, which includes:
the creating module 11 is configured to create a target plug-in for positioning a file to be positioned in a target webpage by creating a browser plug-in; the file to be positioned is a project resource corresponding to the target webpage;
an obtaining module 12, configured to obtain, by using the target plug-in, information representing an address of the file to be located in the target webpage, so as to obtain target location information corresponding to the file to be located;
and the matching module 13 is configured to match the target positioning information with positioning information of a file pre-stored in a preset database, and if the matching is successful, access an address of the file to be positioned based on the target positioning information.
Therefore, in the embodiment of the application, a target plug-in for positioning a file to be positioned in a target webpage is created in a browser plug-in creating mode; and the file to be positioned is a project resource corresponding to the target webpage. And then, acquiring information for representing the address of the file to be positioned in the target webpage by using the target plug-in to obtain target positioning information corresponding to the file to be positioned. And finally, matching the target positioning information with positioning information of a file pre-stored in a preset database, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information. According to the method and the device for locating the address of the file to be located, the corresponding target locating information is obtained by creating and utilizing the target plug-in to obtain the information which characterizes the address of the file to be located in the target webpage, then the address of the file to be located is accessed based on the target locating information which is successfully matched with the locating information of the file stored in advance, the addressing speed of project resources is increased, and the locating efficiency is improved.
In some specific embodiments, the creating module 11 specifically includes:
the monitoring unit is used for monitoring the target webpage by using a monitoring function, and when the target webpage is monitored to be switched, the step of acquiring the information representing the address of the file to be positioned in the target webpage by using the target plug-in is executed;
the configuration unit is used for creating a manifest.json file containing metadata of the plug-in to be created, configuring the metadata in the manifest.json file according to target requirements, and configuring a default icon, a default page and a default shortcut of the plug-in to be created so as to obtain the target plug-in.
In some specific embodiments, the obtaining module 12 specifically includes:
the reading unit is used for reading the information which is used for representing the address of the file to be positioned in the target webpage by utilizing the API of the target plug-in so as to obtain target positioning information corresponding to the file to be positioned; the target positioning information is domain name information and port number information which represent the address of the file to be positioned;
and the extracting unit is used for extracting the domain name information and the port number information in the information for representing the address of the file to be positioned in the target webpage by using a regular expression so as to obtain the domain name information and the port number information corresponding to the file to be positioned.
In some specific embodiments, the matching module 13 specifically includes:
the first matching unit is used for respectively matching the domain name information and the port number information corresponding to the file to be positioned with positioning information of a file stored in a preset database in advance, if the matching fails, judging that no corresponding project resource exists in the domain name information and the port number information in the target positioning information, and stopping positioning the file to be positioned;
and the second matching unit is used for matching the target positioning information with positioning information of a file prestored in a preset database, if the matching is successful, generating a jump link for accessing the address of the file to be positioned according to the target positioning information successfully matched, and displaying the jump link through a display interface provided by the target plug-in.
Further, the embodiment of the application also provides electronic equipment. FIG. 7 is a block diagram illustrating an electronic device 20 according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 7 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein, the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the file locating method disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, target location information data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the processor 21 on the mass target positioning information data 223 in the memory 22, and may be Windows Server, Netware, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the file locating method disclosed in any of the foregoing embodiments and executed by the electronic device 20. Data 223 may include object location information data collected by electronic device 20.
Further, an embodiment of the present application further discloses a storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the steps of the file locating method disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the storage medium for locating files provided by the present invention are described in detail, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. A method for locating a file, comprising:
creating a target plug-in for positioning a file to be positioned in a target webpage in a browser plug-in creating mode; the file to be positioned is a project resource corresponding to the target webpage;
acquiring information representing the address of the file to be positioned in the target webpage by using the target plug-in to obtain target positioning information corresponding to the file to be positioned;
and matching the target positioning information with positioning information of a file prestored in a preset database, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information.
2. The file locating method according to claim 1, wherein the creating of the target plug-in for locating the file to be located in the target webpage by means of creating the browser plug-in comprises:
creating a manifest.
And configuring the metadata in the manifest json file according to target requirements, and configuring the default icon, the default page and the default shortcut of the plug-in to be created to obtain the target plug-in.
3. The method for locating files according to claim 1, wherein before the obtaining, by the target plug-in, the information characterizing the address of the file to be located in the target web page, the method further comprises:
and monitoring the target webpage by using a monitoring function, and when the target webpage is monitored to be switched, executing the step of acquiring the information representing the address of the file to be positioned in the target webpage by using the target plug-in.
4. The method for locating the file according to claim 1, wherein the obtaining, by using the target plug-in, information characterizing an address of the file to be located in the target webpage to obtain target location information corresponding to the file to be located includes:
reading information representing the address of the file to be positioned in the target webpage by using the API of the target plug-in so as to obtain target positioning information corresponding to the file to be positioned; the target positioning information is domain name information and port number information which represent the address of the file to be positioned.
5. The method for locating files according to claim 3, wherein after reading the information characterizing the address of the file to be located in the target webpage by using the API of the target plug-in, the method further comprises:
extracting the domain name information and the port number information in the information for representing the address of the file to be positioned in the target webpage by using a regular expression so as to obtain the domain name information and the port number information corresponding to the file to be positioned.
6. The method for locating files according to claim 4, wherein the matching of the target location information with location information of files pre-stored in a preset database comprises:
and respectively matching the domain name information and the port number information corresponding to the file to be positioned with positioning information of a file pre-stored in a preset database, if the matching fails, judging that no corresponding project resource exists in the domain name information and the port number information in the target positioning information, and stopping positioning the file to be positioned.
7. The file locating method according to any one of claims 1 to 6, wherein if the matching is successful, accessing the address of the file to be located based on the target locating information comprises:
and generating a jump link for accessing the address of the file to be positioned according to the successfully matched target positioning information, and displaying the jump link through a display interface provided by the target plug-in.
8. A document positioning apparatus, comprising:
the system comprises a creating module, a searching module and a positioning module, wherein the creating module is used for creating a target plug-in for positioning a file to be positioned in a target webpage in a browser plug-in creating mode; the file to be positioned is a project resource corresponding to the target webpage;
the acquisition module is used for acquiring information which is used for representing the address of the file to be positioned in the target webpage by using the target plug-in so as to obtain target positioning information corresponding to the file to be positioned;
and the matching module is used for matching the target positioning information with positioning information of a file stored in a preset database in advance, and if the matching is successful, accessing the address of the file to be positioned based on the target positioning information.
9. An electronic device, comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the file location method of any of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions which, when loaded and executed by a processor, carry out a file location method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110461038.9A CN113076291A (en) | 2021-04-27 | 2021-04-27 | File positioning method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110461038.9A CN113076291A (en) | 2021-04-27 | 2021-04-27 | File positioning method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113076291A true CN113076291A (en) | 2021-07-06 |
Family
ID=76618830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110461038.9A Pending CN113076291A (en) | 2021-04-27 | 2021-04-27 | File positioning method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113076291A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102346780A (en) * | 2011-10-18 | 2012-02-08 | 北龙中网(北京)科技有限责任公司 | Method and device for acquiring webpage address |
CN103064663A (en) * | 2012-11-19 | 2013-04-24 | 北京百度网讯科技有限公司 | Browser plug-in generating, issuing, loading and updating method and system |
CN107291429A (en) * | 2016-03-30 | 2017-10-24 | 阿里巴巴集团控股有限公司 | webpage generating method and device |
CN108932285A (en) * | 2018-05-22 | 2018-12-04 | 北京工业大学 | A kind of data grab method and system based on browser extension |
CN110263275A (en) * | 2019-06-14 | 2019-09-20 | 深圳前海桔子信息技术有限公司 | A kind of method, apparatus, mobile terminal and storage medium accessing webpage |
CN110276041A (en) * | 2019-07-01 | 2019-09-24 | 浪潮卓数大数据产业发展有限公司 | A kind of web data acquisition methods and system based on Google's browser plug-in |
-
2021
- 2021-04-27 CN CN202110461038.9A patent/CN113076291A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102346780A (en) * | 2011-10-18 | 2012-02-08 | 北龙中网(北京)科技有限责任公司 | Method and device for acquiring webpage address |
CN103064663A (en) * | 2012-11-19 | 2013-04-24 | 北京百度网讯科技有限公司 | Browser plug-in generating, issuing, loading and updating method and system |
CN107291429A (en) * | 2016-03-30 | 2017-10-24 | 阿里巴巴集团控股有限公司 | webpage generating method and device |
CN108932285A (en) * | 2018-05-22 | 2018-12-04 | 北京工业大学 | A kind of data grab method and system based on browser extension |
CN110263275A (en) * | 2019-06-14 | 2019-09-20 | 深圳前海桔子信息技术有限公司 | A kind of method, apparatus, mobile terminal and storage medium accessing webpage |
CN110276041A (en) * | 2019-07-01 | 2019-09-24 | 浪潮卓数大数据产业发展有限公司 | A kind of web data acquisition methods and system based on Google's browser plug-in |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3876116B1 (en) | Method and apparatus for running mini program, electronic device, and storage medium | |
CN102819561B (en) | Picture display method and device based on webpage | |
CN102508710B (en) | Method and system for switching between IE6 kernel and novel IE kernel | |
US8375325B2 (en) | Customizable, multi-function button | |
US7974832B2 (en) | Web translation provider | |
US9727354B2 (en) | System and methods for loading an application and its modules in a client device | |
US7228500B2 (en) | Web page rendering priority mechanism | |
US20050246444A1 (en) | Displaying a computer resource through a preferred browser | |
CN109522500B (en) | Webpage display method, device, terminal and storage medium | |
KR20120093421A (en) | Persistent saving portal | |
CN105095441A (en) | Information acquisition method and device | |
CN110321503B (en) | Web component caching method and device and electronic equipment | |
US20100031166A1 (en) | System and method for web browsing using placemarks and contextual relationships in a data processing system | |
US7895337B2 (en) | Systems and methods of generating a content aware interface | |
CN104899217B (en) | A kind of implementation method and device of custom feature | |
CN100458782C (en) | Display and installation of portlets on a client platform | |
Lathkar | Getting started with FastAPI | |
CN105354490A (en) | Method and device for processing hijacked browser | |
WO2011163315A2 (en) | Application integration of network data based on resource identifiers | |
CN104572753A (en) | Bookmark storage method and bookmark storage device | |
CN113076291A (en) | File positioning method, device, equipment and storage medium | |
CN105243134A (en) | Method and equipment for processing hijacked browser | |
CN103617079A (en) | Method and system for switching between IE6 kernel and novel IE kernel | |
CN109032924A (en) | Identify method, apparatus, equipment and the storage medium of resource type in the page | |
US9330173B2 (en) | Situational application creation based on observed user behavior |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210706 |