[go: up one dir, main page]

CN111026438B - Method, device, equipment and medium for extracting small program package and page key information - Google Patents

Method, device, equipment and medium for extracting small program package and page key information Download PDF

Info

Publication number
CN111026438B
CN111026438B CN201911207501.6A CN201911207501A CN111026438B CN 111026438 B CN111026438 B CN 111026438B CN 201911207501 A CN201911207501 A CN 201911207501A CN 111026438 B CN111026438 B CN 111026438B
Authority
CN
China
Prior art keywords
applet
page
index page
target
index
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
CN201911207501.6A
Other languages
Chinese (zh)
Other versions
CN111026438A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201911207501.6A priority Critical patent/CN111026438B/en
Publication of CN111026438A publication Critical patent/CN111026438A/en
Application granted granted Critical
Publication of CN111026438B publication Critical patent/CN111026438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • 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/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a method, a device, equipment and a medium for extracting small program packages and page key information, and relates to the field of intelligent searching. The specific implementation scheme is as follows: generating an applet index page corresponding to the target applet, wherein the applet index page comprises a plurality of information items, and the plurality of information items are respectively filled with page key information of each page in the target applet; constructing path information corresponding to the applet index page according to a preset path construction rule; and adding the applet index page into an applet source code packet of the target applet to obtain an applet packet. The scheme of the embodiment of the application realizes the rapid generation of the applet package containing the applet index page, and provides assistance for the subsequent recording of all page resources of the applet.

Description

Method, device, equipment and medium for extracting small program package and page key information
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to the field of intelligent searching, and specifically relates to a method, a device, equipment and a medium for extracting small program packages and page key information.
Background
With the continuous development of computer technology, application "applets" that can be used without downloading and installing are widely used.
At present, a search engine records applet page resources through applet web pages (web); specifically, the search engine has two main ways to record the applet page resources: finding sub-link resources of other pages through the recorded applet pages, and further excavating the sub-link resources of other pages to realize the recording of other pages of the applet; the other is that the applet actively provides an interface for submitting site resources to the resource party, which actively pushes the resources to the search engine through the interface.
Although the two methods in the prior art can realize the collection of the applet page resources, the two methods have more problems. In the first method, since some specific resources are only displayed by specific groups or specific regions in the small programs related to the user characteristics or the region characteristics, the search engine cannot record all the resources of the small programs; in the second approach, each resource party is allocated only a small commit limit per day due to limited storage and computing resources; for sites with larger resource amount, the submission period is long and the acceptance is slow.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a medium for extracting the small program package and page key information, which realize the recording of all page resources of the small program.
In a first aspect, an embodiment of the present application provides a method for generating an applet package, where the method includes:
generating an applet index page corresponding to a target applet, wherein the applet index page comprises a plurality of information items, and the information items are respectively filled with page key information of each page in the target applet;
constructing path information corresponding to the applet index page according to a preset path construction rule;
and adding the applet index page into an applet source code packet of the target applet to obtain the applet packet.
Optionally, the generating an applet index page corresponding to the target applet includes:
acquiring an index page template, wherein the index page template comprises at least one item to be filled;
and respectively adding page key information corresponding to each page in the target applet in at least one item of to-be-filled item of the index page template to generate an applet index page corresponding to the target applet.
The advantages of this arrangement are that: by acquiring the index page template and adding page key information corresponding to each page of the applet in at least one entry to be filled of the index page template, the applet index page corresponding to the target applet can be rapidly generated.
Optionally, the constructing path information corresponding to the applet index page according to a preset path construction rule includes:
and splicing the web domain name of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page.
The advantages of this arrangement are that: the path information corresponding to the applet index page is constructed through the preset path construction rule, so that the index page in the applet package can be conveniently confirmed, and the condition that the index page corresponding to the applet cannot be confirmed or cannot be found is avoided.
Optionally, the page key information includes: page path information.
In a second aspect, an embodiment of the present application further provides a method for extracting page key information, where the method includes:
acquiring an applet package of a target applet, and determining path information of an applet index page in the applet package according to a preset path construction rule;
Performing page grabbing on the applet index page according to the path information of the applet index page;
and acquiring page key information of each page in the target applet according to the fetched applet index page.
The advantages of this arrangement are that: the key information of all pages of the applet can be obtained through the applet index page, and the recording of all page resources of the applet can be realized.
Optionally, the determining path information of the applet index page in the applet package according to a preset path construction rule includes:
and splicing the web domain name of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page.
The advantages of this arrangement are that: through a path construction rule of a preset applet index page, the index page corresponding to the applet in the applet package can be rapidly determined.
Optionally, the obtaining, according to the crawled applet index page, page key information of each page in the target applet includes:
traversing and reading each information item in the applet index page to obtain page key information of each page in the target applet;
And grabbing each page in the target applet according to page path information included in the page key information, and recording grabbing results.
The advantages of this arrangement are that: the page key information of each page in the target applet can be obtained by traversing and reading each information item in the applet index page, and the recording of all page resources in the target applet can be realized by the path information in the page key information.
Optionally, after obtaining the page key information of each page in the target applet according to the fetched applet index page, the method further includes:
and grabbing the newly added page in the target applet in a polling comparison mode, and recording the grabbing result.
The advantages of this arrangement are that: and grabbing newly added pages in the small program package in a polling comparison mode, and recording grabbing results. The method realizes the recording of all resources of the applet, and even if the applet is updated, the updated content can be recorded.
In a third aspect, an embodiment of the present application further provides an apparatus for generating an applet package, where the apparatus includes:
The system comprises an applet index page generation module, a program index page generation module and a program index page generation module, wherein the applet index page generation module is used for generating an applet index page corresponding to a target applet, the applet index page comprises a plurality of information items, and the information items are respectively filled with page key information of each page in the target applet;
the path information construction module is used for constructing path information corresponding to the applet index page according to a preset path construction rule;
and the applet package generating module is used for adding the applet index page into the applet source code package of the target applet to obtain the applet package.
In a fourth aspect, an embodiment of the present application further provides an apparatus for extracting page key information, where the apparatus includes:
the small program package acquisition module is used for acquiring a small program package of a target small program and determining path information of a small program index page in the small program package according to a preset path construction rule;
the page grabbing module is used for grabbing pages of the applet index page according to the path information of the applet index page;
and the page key information acquisition module is used for acquiring page key information of each page in the target applet according to the fetched applet index page.
In a fifth aspect, embodiments of the present application further provide an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor;
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of generating the applet package according to any one of the embodiments of the present application or the method of extracting the page key information according to any one of the embodiments of the present application.
In a fourth aspect, embodiments of the present application further provide a non-transitory computer readable storage medium storing computer instructions, where the computer instructions are configured to cause the computer to execute the method for generating the applet package according to any embodiment of the present application or the method for extracting the page key information according to any embodiment of the present application.
One embodiment of the above application has the following advantages or benefits: constructing path information corresponding to the applet index page according to a preset path construction rule by generating the applet index page corresponding to the target applet; and adding the applet index page into an applet source code packet of the target applet to obtain an applet packet. The method and the device realize rapid generation of the applet package containing the applet index page, and provide assistance for the recording of all page resources of the subsequent applet.
Other effects of the above alternative will be described below in connection with specific embodiments.
Drawings
The accompanying drawings are included to provide a better understanding of the present disclosure, and are not to be construed as limiting the present disclosure, wherein:
FIG. 1 is a flow chart of a method of generating a applet package according to a first embodiment of the application;
fig. 2 is a flowchart of a method for extracting page key information according to a second embodiment of the present application;
FIG. 3 is a schematic diagram of a device for generating an applet package according to a third embodiment of the application;
fig. 4 is a schematic structural diagram of an apparatus for extracting page key information according to a fourth embodiment of the present application;
fig. 5 is a block diagram of an electronic device for implementing a method for generating an applet package or a method for extracting page key information according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application 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 application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example 1
Fig. 1 is a flowchart of a method for generating an applet package according to an embodiment of the present application, where the embodiment may be applied to a case where a search engine records all page resources of an applet, and the method may be performed by a device for generating an applet package, where the device may be implemented by software and/or hardware, and may generally be integrated in an electronic device for executing the method, where the electronic device may be a mobile phone, a computer, a server, or a tablet computer. Specifically, referring to fig. 1, the method specifically includes the following steps:
s110, generating an applet index page corresponding to the target applet, wherein the applet index page comprises a plurality of information items, and the information items are respectively filled with page key information of each page in the target applet.
Specifically, the applet is an application that can be used without downloading and installing, and the user can open the application by "sweeping" or "searching and clicking". It should be noted that, the applet may include a plurality of pages, for example, a first page of the applet and pages such as sub pages that can be jumped in the applet. By way of example, a video playback applet A may include the first page of applet A, and pages such as sub-pages of individual video plays that are jumpable by various jumping means. It should be noted that, the target applet referred to in the embodiment of the present application may be any applet, for example, may be a video playing applet, an express inquiry applet, or a learning applet, which is not limited in the embodiment of the present application.
It should be noted that, the applet index page referred to in the embodiment of the present application is essentially one page of the applet, which aggregates all page resources of the applet in the form of a list. Specifically, the applet index page comprises a plurality of information items, the plurality of information items are respectively filled with page key information of each page in the target applet, wherein the page key information of each page mainly comprises: the page path information may further include a page title, a page creation time, and the like. Each resource in the applet index page can be jump addressed, illustratively clicking on resource a in the applet index page, i.e. jumping to applet page a.
Alternatively, generating the applet index page corresponding to the target applet may include: acquiring an index page template, wherein the index page template comprises at least one item to be filled; and respectively adding page key information corresponding to each page in the target applet in at least one item to be filled of the index page template to generate an applet index page corresponding to the target applet.
Specifically, the manner of generating the applet index page corresponding to the target applet may be:
And acquiring an index page template, and respectively adding page key information corresponding to each page in the target applet in at least one item to be filled of the index page template to generate an applet index page corresponding to the target applet. For example, page path information corresponding to each page in the target applet can be added to at least one entry to be filled in the index page template, so as to generate an applet index page corresponding to the target applet.
In a specific example of this embodiment of the present application, the target applet is a video playing applet B, after an index page template is obtained according to a template adding instruction input by a user, page key information corresponding to each page in the video playing applet B is added to at least one entry to be filled in the index page template, respectively, and after filling all the information is completed, an applet index page corresponding to the video playing applet B is obtained.
In another specific example of the embodiment of the application, a developer platform provides an index page dynamic component in advance, and the developer platform packages logic codes for realizing basic functions of each page in the applet in advance in the index page dynamic component; the developer can directly refer to the index page dynamic component and add page key information corresponding to each page in the target applet, so as to generate the index page corresponding to the target applet.
For example, a filling area may be provided in the index page dynamic component, page key information of each page in the applet may be filled according to the entry, for example, contents such as a page path, a page title, a page creation time and the like corresponding to each page of the applet may be filled in the filling area, and finally, an index page corresponding to the target applet is generated.
S120, constructing path information corresponding to the applet index page according to a preset path construction rule.
Specifically, after the applet index page corresponding to the target applet is generated, path information may be configured for the applet index page corresponding to the target applet according to a preset path configuration rule.
In this embodiment, in order to enable the applet server to quickly locate to the applet index page after acquiring the applet package, the applet developer and the applet server are required to agree in advance on a path configuration rule of the applet index page, that is, how to configure the path information of the applet index page, so that the applet server can directly obtain the path information corresponding to the applet index page based on the same path configuration rule, and further can acquire the applet index page in the applet package. Specifically, the path construction rule may be a static setting rule, for example, a combination of a web domain name of the applet package and a set level keyword (fixed) is used as path information corresponding to the applet index page; alternatively, the path construction rule may be a dynamic setting rule, for example, at least one setting parameter of the applet package (different applet package parameters), for example, an applet id, a developer id, or the like may be obtained, and a combination of the web domain name of the applet package and the at least one setting parameter may be used as path information corresponding to the applet index page.
Optionally, constructing path information corresponding to the applet index page according to a preset path construction rule may include: and splicing the web domain name of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page. For example, if the web domain name of the target applet is "abc.com", the preset path level keyword may be swansitimap/index, and the path information corresponding to the index page of the target applet is: com+swansite map/index, the uniform resource locator (Uniform Resource Locator, URL) of the index page is 'http:// www.abc.com/swansite map/index', the index page corresponding to the target applet can be uniquely identified through the URL of the index page, and the condition that the index page of the target applet cannot be identified or an identification error cannot occur is avoided.
It should be noted that, the preset path level keywords related to the embodiment of the present application are not unique, and a developer may set any word as the preset path keywords, which is not limited in the embodiment of the present application.
Alternatively, at least one parameter corresponding to the applet package, such as parameter a (e.g., applet id) and parameter B (developer id), may be obtained according to a preset path construction rule, and the web domain name of the target applet is spliced with the at least one parameter to obtain path information corresponding to the applet index page, for example: "http:// www.abc.com/parameter A/parameter B.
It should be noted that, a person skilled in the art may choose at least one parameter according to the actual situation, and a combination manner of the at least one parameter, so long as the applet server and the applet developer obtain the same and clearly defined parameters.
S130, adding the applet index page into an applet source code packet of the target applet to obtain an applet packet.
Specifically, after constructing path information corresponding to the applet index page according to a preset path construction rule, the applet index page may be added to the target applet source code package to obtain a new applet package. The applet source code package can comprise various files such as pictures, applet configuration information, applet version information and the like, and the files are stored in a folder nested mode.
For example, in the embodiment of the present application, the applet index page may be added to the primary directory of the applet source code package; the applet index page may also be added to a specified folder of the applet source code package, for example, any folder in the applet source code package, such as pages folder or global folder, which is not limited in the embodiment of the present application.
According to the scheme of the embodiment, the path information corresponding to the applet index page is constructed by generating the applet index page corresponding to the target applet and according to a preset path construction rule; and adding the applet index page into an applet source code packet of the target applet to obtain an applet packet. The scheme of the embodiment of the application realizes the rapid generation of the applet package containing the applet index page, and provides assistance for the subsequent recording of all page resources of the applet.
Example two
Fig. 2 is a flowchart of a method for extracting page key information provided in the second embodiment of the present application, where the present embodiment may be applicable to a case where a search engine records all page resources of an applet, so as to quickly extract page key information of each page of the applet. Specifically, referring to fig. 2, the method specifically includes the following steps:
s210, acquiring a small program package of the target small program, and determining path information of a small program index page in the small program package according to a preset path construction rule.
Specifically, an applet package of a target applet provided by a developer platform is obtained, wherein the applet package comprises all resource information of the target applet and an index page corresponding to the target applet; after the applet package of the target applet is obtained, determining path information of an index page corresponding to the target applet in the applet package according to a preset path construction rule, that is, determining which resource in the applet package is the index page corresponding to the target applet according to the preset path construction rule, and determining the path information of the index page.
Optionally, determining path information of the applet index page in the applet package according to a preset path construction rule may include: and splicing the web domain name of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page.
Illustratively, if the path construction rule of the index page corresponding to the intelligent game applet a is: the web domain name of the intelligent game applet a+the preset path level keyword, wherein the preset path level keyword may be "swansite map/index", and then in the applet package of the intelligent game applet a, it may be determined that the page resource of the naming rule of "the web domain name of the intelligent game applet a+swansite map/index" is an index page corresponding to the intelligent game applet a.
In another specific example of the embodiment of the present application, the applet index page corresponding to the target applet in the applet package may be automatically identified by the identification class software. For example, all files in the applet package may be input into the recognition class software, and the recognition class software recognizes all files in the applet package, thereby recognizing an index page corresponding to the applet, and further may obtain path information corresponding to the index page corresponding to the applet.
S220, performing page grabbing on the applet index page according to the path information of the applet index page.
Specifically, after determining the path information of the applet index page in the applet package, page crawling may be performed on the applet index page according to the path information of the applet index page.
Optionally, in the embodiment of the present application, the page capturing may be performed directly by using the applet index page of the search engine, or may be performed by using third party software; probes may also be added to the applet package, and when the applet index page is identified, the applet index page may be automatically crawled.
S230, acquiring page key information of each page in the target applet according to the fetched applet index page.
Specifically, after the page grabbing is performed on the applet index page, page key information of each page in the applet can be obtained according to the grabbed applet index page; the page key information of each page of the applet may include path information of each page of the applet, and may further include information such as a title and creation time of each page.
Optionally, according to the captured applet index page, obtaining page key information of each page in the target applet may include: traversing and reading each information item in the applet index page to obtain page key information of each page in the target applet; and grabbing each page in the target applet according to page path information included in the page key information, and recording the grabbing result.
Specifically, page key information of each page in the applet can be obtained by traversing and reading each information item included in the applet index page, wherein each information item included in the applet index page is filled with page key information of each page in the target applet. After the page key information of each page in the applet is obtained, each page in the target applet can be grabbed according to the page path information included in the page key information, and the grabbing result is recorded.
By way of example, by traversing a plurality of information entries included in the index page of applet a, page key information of each page in applet a is obtained, for example, page path information of a first page in applet a is obtained as "x", page path information of a second page in applet a is obtained as "y", and page path information of a third page in applet a is obtained as "z"; according to the page path information 'x', 'y' and 'z', the first page, the second page and the third page in the applet A can be grabbed; and finally, the grabbing results can be recorded through a search engine.
It should be noted that, in the above example, the first page, the second page, and the third page in the applet a may be any one page in the applet a, and the applet a may further include other pages, and for convenience of description, only three pages of the applet a are listed in the above example, which is not a limitation of the embodiments of the present application.
According to the scheme of the embodiment, the path information of the applet index page in the applet package is determined by acquiring the applet package of the target applet and according to a preset path construction rule; according to path information of the applet index page, performing page grabbing on the applet index page; according to the captured applet index page, page key information of each page in the target applet is obtained, and the recording of all page resources of the applet is realized.
Optionally, after acquiring the page key information of each page in the target applet according to the crawled applet index page, the scheme of this embodiment may further include: and grabbing a new page in the target applet in a polling comparison mode, and recording the grabbing result.
Specifically, polling comparison can be performed on the applet package of the target applet within a set time interval, if a newly added page is found in the applet package, the newly added page is grabbed, and the grabbing result is recorded through a search engine. For example, the set time interval may be 1 minute, specifically, the applet package of the current time of the target applet may be compared with the applet package of the target applet before 1 minute, and if it is found that the applet package of the current time is newly added with the applet package before 1 minute, the newly added page a may be grabbed, and the grabbing result of the page a may be recorded.
In another specific example of the embodiment of the present application, a probe may be embedded in the target applet package, and a new page in the applet package of the target applet may be found through the probe, and once the new page is added in the target applet package, the new page in the applet package is automatically grabbed, and the grabbing result is recorded.
Based on the above embodiments, the newly added page in the applet package is grabbed by means of polling comparison, and the grabbing result is recorded. The method realizes the recording of all resources of the applet, and even if the applet is updated, the updated content can be recorded.
Example III
Fig. 3 is a schematic structural diagram of an apparatus for generating an applet package according to a third embodiment of the present application, where the apparatus may execute a method for generating an applet in any embodiment of the present application, and the apparatus may be implemented in software and/or hardware, and specifically, referring to fig. 3, the apparatus includes: an applet index page generation module 310, a path information construction module 320, and an applet package generation module 330.
The applet index page generation module 310 is configured to generate an applet index page corresponding to a target applet, where the applet index page includes a plurality of information entries, and the plurality of information entries are respectively filled with page key information of each page in the target applet;
a path information constructing module 320, configured to construct path information corresponding to the applet index page according to a preset path constructing rule;
the applet package generation module 330 is configured to add the applet index page to the applet source code package of the target applet to obtain the applet package.
According to the scheme of the embodiment, an applet index page corresponding to a target applet is generated through an applet index page generation module; constructing path information corresponding to the applet index page according to a preset path construction rule by a path information construction module; and adding the applet index page into the applet source code package through the applet package generating module to obtain the applet package.
Optionally, the applet index page generation module 310 may further include: the index page template acquisition unit is used for acquiring an index page template, wherein the index page template comprises at least one item to be filled; and respectively adding page key information corresponding to each page in the target applet in at least one item to be filled of the index page template to generate an applet index page corresponding to the target applet.
Optionally, the path information construction module 320 is specifically configured to splice the web domain name of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page.
Optionally, the page key information related in any embodiment of the present application includes: page path information.
The small program package generating device can execute the small program package generating method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the executing method. Technical details not described in detail in this embodiment may refer to the method for generating the applet package provided in any embodiment of the present application.
Example IV
Fig. 4 is a schematic structural diagram of an apparatus for extracting page key information according to a fourth embodiment of the present application, where the apparatus may execute the method for extracting page key information according to any embodiment of the present application, and the apparatus may be implemented by software and/or hardware, and specifically, referring to fig. 4, the apparatus includes: the applet package acquisition module 410, the page crawling module 420 and the page key information acquisition module 430.
The applet package obtaining module 410 is configured to obtain an applet package of a target applet, and determine path information of an applet index page in the applet package according to a preset path configuration rule;
the page grabbing module 420 is configured to grab a page of the applet index page according to path information of the applet index page;
the page key information obtaining module 430 is configured to obtain page key information of each page in the target applet according to the crawled applet index page.
According to the scheme of the embodiment, a small program package of the target small program is obtained through a small program package obtaining module, and path information of a small program index page in the small program package is determined according to a preset path construction rule; capturing an applet index page through a page capturing module, and acquiring page key information of each page in a target applet; and acquiring page key information of each page in the target applet according to the acquired applet index page by a page key information acquisition module. The method realizes the recording of all page resources of the applet.
Optionally, the applet package obtaining module 410 is specifically configured to splice the web domain name of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page.
Optionally, the page key information obtaining module 430 may further include: the grabbing result recording unit is used for traversing and reading each information item in the applet index page to obtain page key information of each page in the target applet; and grabbing each page in the target applet according to page path information included in the page key information, and recording the grabbing result.
Optionally, the device for extracting the page key information may further include: and the polling comparison module is used for grabbing a new page in the target applet in a polling comparison mode and recording the grabbing result.
The device for extracting the page key information can execute the method for extracting the page key information provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. Technical details which are not described in detail in the present embodiment can be referred to the extraction method of the page key information provided in any embodiment of the present application.
Example five
A fifth embodiment of the present application provides an electronic device and a readable storage medium. Fig. 5 is a block diagram of an electronic device for implementing the method for generating an applet package or the method for extracting page key information according to an embodiment of the present application, and as shown in fig. 5, is a block diagram of an electronic device according to the method for generating an applet package or the method for extracting page key information according to any embodiment of the present application. 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 application described and/or claimed herein.
As shown in fig. 5, the electronic device includes: one or more processors 501, memory 502, and interfaces for connecting components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 501 is illustrated in fig. 5.
Memory 502 is a non-transitory computer readable storage medium provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method for generating the applet package or the method for extracting the page key information provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute the method of generating the applet package or the method of extracting the page key information provided by the present application.
The memory 502 is used as a non-transitory computer readable storage medium, and may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program modules corresponding to the method of generating the applet package in the present application (e.g., the applet index page generation module 310, the path information configuration module 320, and the applet package generation module 330 shown in fig. 3), or the method of extracting page key information (e.g., the applet package acquisition module 410, the page crawling module 420, and the page key information acquisition module 430 shown in fig. 4). The processor 501 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 502, that is, implements the method of generating the applet package in the above-described method embodiment;
Namely: generating an applet index page corresponding to the target applet, wherein the applet index page comprises a plurality of information items, and the plurality of information items are respectively filled with page key information of each page in the target applet;
constructing path information corresponding to the applet index page according to a preset path construction rule;
and adding the applet index page into an applet source code packet of the target applet to obtain an applet packet.
Or a method for extracting page key information.
Namely: acquiring an applet package of a target applet, and determining path information of an applet index page in the applet package according to a preset path construction rule;
according to path information of the applet index page, performing page grabbing on the applet index page;
and acquiring page key information of each page in the target applet according to the grabbed applet index page.
Memory 502 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to a generation method of an applet package or the use of an electronic device of extraction of page key information, etc. In addition, memory 502 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected via a network to the electronic device that is the method of generation of the applet package or the extraction of the page key information. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method for generating the applet package or the method for extracting the page key information may further include: an input device 503 and an output device 504. The processor 501, memory 502, input devices 503 and output devices 504 may be connected by a bus or otherwise, for example in fig. 5.
The input device 503 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device for which the method of generating the applet package or the extraction of the page key information, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. The output devices 504 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), 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.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
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.
According to the technical scheme of the embodiment of the application, the problems that all resources cannot be recorded and the recording period is long and the recording is slow in the existing applet page resources are solved, the recording of all the applet page resources is realized, and updated contents can be recorded even if the applet is updated.
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 described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. 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 application are intended to be included within the scope of the present application.

Claims (10)

1. A method for generating a applet package, comprising:
generating an applet index page corresponding to a target applet, wherein the applet index page comprises a plurality of information items, and the information items are respectively filled with page key information of each page in the target applet;
splicing the web domain name of the webpage of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page;
And adding the applet index page into an applet source code packet of the target applet to obtain the applet packet.
2. The method of claim 1, wherein generating an applet index page corresponding to a target applet comprises:
acquiring an index page template, wherein the index page template comprises at least one item to be filled;
and respectively adding page key information corresponding to each page in the target applet in at least one item of to-be-filled item of the index page template to generate an applet index page corresponding to the target applet.
3. The method according to claim 1 or 2, wherein the page key information comprises: page path information.
4. The method for extracting the page key information is characterized by comprising the following steps of:
acquiring an applet package of a target applet, splicing a web domain name of the target applet with a preset path level keyword to obtain path information corresponding to an applet index page;
performing page grabbing on the applet index page according to the path information of the applet index page;
and traversing and reading each information item in the applet index page, and acquiring page key information of each page in the target applet.
5. The method according to claim 4, wherein the method further comprises:
and grabbing each page in the target applet according to page path information included in the page key information, and recording grabbing results.
6. The method according to claim 4, wherein the method further comprises:
and grabbing the newly added page in the target applet in a polling comparison mode, and recording the grabbing result.
7. An applet package generation apparatus, comprising:
the system comprises an applet index page generation module, a program index page generation module and a program index page generation module, wherein the applet index page generation module is used for generating an applet index page corresponding to a target applet, the applet index page comprises a plurality of information items, and the information items are respectively filled with page key information of each page in the target applet;
the path information construction module is used for splicing the web domain name of the target applet with a preset path level keyword to obtain path information corresponding to the applet index page;
and the applet package generating module is used for adding the applet index page into the applet source code package of the target applet to obtain the applet package.
8. An extracting device for page key information, which is characterized by comprising:
the applet package acquisition module is used for acquiring an applet package of a target applet, splicing the web domain name of the target applet with a preset path level keyword, and obtaining path information corresponding to the applet index page;
the page grabbing module is used for grabbing pages of the applet index page according to the path information of the applet index page;
and the page key information acquisition module is used for traversing and reading each information item included in the applet index page to acquire page key information of each page in the target applet.
9. 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 generating the applet package according to any one of claims 1-3 or the method of extracting the page key information according to any one of claims 4-6.
10. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method of generating the applet package according to any one of claims 1-3 or the method of extracting page key information according to any one of claims 4-6.
CN201911207501.6A 2019-11-29 2019-11-29 Method, device, equipment and medium for extracting small program package and page key information Active CN111026438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911207501.6A CN111026438B (en) 2019-11-29 2019-11-29 Method, device, equipment and medium for extracting small program package and page key information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911207501.6A CN111026438B (en) 2019-11-29 2019-11-29 Method, device, equipment and medium for extracting small program package and page key information

Publications (2)

Publication Number Publication Date
CN111026438A CN111026438A (en) 2020-04-17
CN111026438B true CN111026438B (en) 2023-08-04

Family

ID=70203648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911207501.6A Active CN111026438B (en) 2019-11-29 2019-11-29 Method, device, equipment and medium for extracting small program package and page key information

Country Status (1)

Country Link
CN (1) CN111026438B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708990A (en) * 2020-05-15 2020-09-25 支付宝(杭州)信息技术有限公司 Applet starting method, signature method, device, server and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083789A (en) * 2019-04-29 2019-08-02 百度在线网络技术(北京)有限公司 A kind of small routine page acquisition methods, server, client and electronic equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106980504B (en) * 2017-03-28 2022-07-01 腾讯科技(深圳)有限公司 Application program development method and tool and equipment thereof
CN108319483B (en) * 2018-01-30 2021-07-09 腾讯科技(深圳)有限公司 Webpage processing method, device, terminal and storage medium
CN108549569B (en) * 2018-04-26 2021-07-27 上海掌门科技有限公司 A method and device for searching information in an application program
CN109165050B (en) * 2018-07-05 2020-10-13 腾讯科技(深圳)有限公司 Program running method and device, computing equipment and storage medium
CN109558202A (en) * 2018-12-14 2019-04-02 平安城市建设科技(深圳)有限公司 Original list development approach, device, equipment and storage medium based on small routine
CN109962976A (en) * 2019-02-20 2019-07-02 深圳点猫科技有限公司 A kind of http caching method and device based on small routine framework
CN110209450B (en) * 2019-05-22 2025-03-25 腾讯科技(深圳)有限公司 Page generation method, device, storage medium and server
CN110333863B (en) * 2019-06-17 2023-05-30 无线生活(杭州)信息科技有限公司 Method and device for generating and displaying applet page
CN110427225A (en) * 2019-07-29 2019-11-08 阿里巴巴集团控股有限公司 A kind of method and apparatus starting small routine

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083789A (en) * 2019-04-29 2019-08-02 百度在线网络技术(北京)有限公司 A kind of small routine page acquisition methods, server, client and electronic equipment

Also Published As

Publication number Publication date
CN111026438A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN105938477B (en) Method and system for aggregating and formatting search results
US8762360B2 (en) Integrating applications within search results
US8468145B2 (en) Indexing of URLs with fragments
US20150106723A1 (en) Tools for locating, curating, editing, and using content of an online library
US10845950B2 (en) Web browser extension
KR20180008480A (en) System and method for extracting and sharing application-related user data
CN111582477B (en) Training method and device for neural network model
US20130173655A1 (en) Selective fetching of search results
US11361149B2 (en) Techniques for web framework detection
CN112015468B (en) Interface document processing method and device, electronic equipment and storage medium
CN105302461B (en) A kind of method and apparatus for the offer target pages in mobile application
CN108959294B (en) Method and device for accessing search engine
CN113326418A (en) Method and device for determining webpage information source and webpage quality
CN111752960B (en) Data processing method and device
JP6162134B2 (en) Social page trigger
CN110955833A (en) Searching method, searching device, server, terminal equipment and medium
CN111767442A (en) Data updating method and device, search server, terminal and storage medium
CN111026438B (en) Method, device, equipment and medium for extracting small program package and page key information
US20160188721A1 (en) Accessing Multi-State Search Results
CN113010811B (en) Webpage acquisition method and device, electronic equipment and computer readable storage medium
US20240095298A1 (en) Systems and methods for rendering interactive web pages
US20140359463A1 (en) Data templates for default data in data binding
US11983483B2 (en) Web site preview generation with action control
CN112445983B (en) Method, device and equipment for processing search results and computer readable storage medium
US11269961B2 (en) Systems and methods for App query driven results

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