CN112269666B - Applet dead-link detection method and device, computing device and medium - Google Patents

Applet dead-link detection method and device, computing device and medium Download PDF

Info

Publication number
CN112269666B
CN112269666B CN202011245779.5A CN202011245779A CN112269666B CN 112269666 B CN112269666 B CN 112269666B CN 202011245779 A CN202011245779 A CN 202011245779A CN 112269666 B CN112269666 B CN 112269666B
Authority
CN
China
Prior art keywords
link
applet
page content
path
dead
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
CN202011245779.5A
Other languages
Chinese (zh)
Other versions
CN112269666A (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 CN202011245779.5A priority Critical patent/CN112269666B/en
Publication of CN112269666A publication Critical patent/CN112269666A/en
Application granted granted Critical
Publication of CN112269666B publication Critical patent/CN112269666B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/524Deadlock detection or avoidance
    • 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

Abstract

The disclosure provides an applet dead-chain detection method and device, a computing device and a medium, relates to the technical field of computers, and particularly relates to the technical field of applets. The small program dead-chain detection method comprises the following steps: obtaining path links from a applet link library; splicing the acquired path link information with corresponding preset instructions according to the type of the applet so as to obtain a link address to be detected; acquiring corresponding page contents according to the link address to be detected; and detecting the page content according to a preset detection rule, so as to judge whether the path link corresponding to the page content is a dead link or not based on a detection result.

Description

Applet dead-link detection method and device, computing device and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an applet dead-link detection method and apparatus, a computing device, and a medium.
Background
With the continuous popularization of the application of the applet, the occupation ratio of the applet in the search engine is larger and larger, the dead link problem of the applet is also highlighted along with the application, the applet is not opened, the dead link problem such as playing cannot be performed, the user experience is seriously affected, and finally the user loss is caused.
At present, a mature applet dead-link detection scheme is lacking, and dead-link information is recalled through dotting log information of mobile phone applications, so that the method is limited by the problems of versions, models, networks and the like of the mobile phone applications, and the data accuracy is insufficient and cannot be accurately identified.
Disclosure of Invention
According to one aspect of the present disclosure, there is provided an applet dead-link detection method comprising: obtaining path links from a applet link library; splicing the acquired path link information with corresponding preset instructions according to the type of the applet so as to obtain a link address to be detected; acquiring corresponding page contents according to the link address to be detected; and detecting the page content according to a preset detection rule, so as to judge whether the path link corresponding to the page content is a dead link or not based on a detection result.
According to another aspect of the present disclosure, there is provided an applet dead-link detection apparatus comprising: a first acquisition unit configured to acquire a path link from a applet link library; the splicing unit is configured to splice the acquired information of the path links with corresponding preset instructions according to the types of the applets so as to obtain a link address to be detected; the second acquisition unit is configured to acquire corresponding page contents according to the link address to be detected; and the first detection unit is configured to detect the page content according to a preset detection rule so as to judge whether the path link corresponding to the page content is a dead link or not based on a detection result.
According to yet another aspect of the present disclosure, there is provided a computing device comprising: a processor; and a memory storing a program comprising instructions that when executed by the processor cause the processor to perform the applet dead-line detection method described in the present disclosure.
According to yet another aspect of the present disclosure, there is provided a computer readable storage medium storing a program comprising instructions that, when executed by a processor of a computing device, cause the computing device to perform the applet dead-link detection method described in the present disclosure.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the applet dead-link detection method described in the present disclosure.
According to one aspect of the disclosure, the applet dead-link detection method does not depend on weblinks of applets, achieves dead-link detection of various types of applets, and improves the stability of dead-link detection.
These and other aspects of the disclosure will be apparent from and elucidated with reference to the embodiments described hereinafter.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a flowchart of an applet dead-link detection method according to an exemplary embodiment of the disclosure;
FIG. 2 illustrates a schematic diagram of page content including exemplary status codes and page elements in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 illustrates an exemplary flowchart of a method of applet dead-link detection in accordance with an exemplary embodiment of the present disclosure;
FIG. 4 shows a schematic diagram of a program dead-link detection apparatus according to an exemplary embodiment of the present disclosure; and
FIG. 5 illustrates a block diagram of an exemplary computing device that can be used to implement embodiments of the present disclosure.
Detailed Description
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
With the saturation of the mobile phone application market, most users have developed using habits, new mobile phone applications are difficult to generate in the market, and development and popularization costs are high. The applet has been created to achieve the dream of applying "tentacle reach". In order to improve the mobile phone searching experience of the user, most mobile phone applications gradually access the applet resource. As the distribution ratio of the applet in the search engine is larger and larger, the dead link problem of the applet is also highlighted, the applet cannot be opened, the dead link problem such as playing cannot be played, the user experience is seriously affected, and finally the user loss is caused.
It is typically possible to crawl an applet web page to determine if the corresponding web link is a dead link based on the crawl status code. However, not all applets support web, and applets without web links cannot be detected.
Thus, according to an embodiment of the present disclosure, there is provided an applet dead-link detection method, as shown in fig. 1, the applet dead-link detection method 100 including: obtaining path links from the applet link library (step 110); splicing the acquired path link information with corresponding preset instructions according to the type of the applet to obtain a link address to be detected (step 120); acquiring corresponding page contents according to the link address to be detected (step 130); and detecting the page content according to a preset detection rule, so as to judge whether the path link corresponding to the page content is a dead link or not based on the detection result (step 140).
According to the applet dead-chain detection method disclosed by the invention, the dead-chain detection of various types of applets is realized without depending on the weblinks of the applets, and the stability of the dead-chain detection is improved.
According to some embodiments, splicing the obtained information of the path link with a corresponding preset instruction according to the type of the applet to obtain the link address to be detected includes: and in response to the type of the applet being a webpage-free link and a computer-free end site, splicing the acquired path link with a call instruction of the mobile end application corresponding to the applet so as to obtain a link address to be detected.
According to some embodiments, obtaining the corresponding page content according to the link address to be detected includes: the obtained link address to be detected is sent to the mobile terminal, so that the mobile terminal application obtains the content of the applet page according to the link address to be detected; and receiving the applet page content sent by the mobile terminal to acquire the corresponding page content.
The applet is not webbed (applet webbed) and means that the applet which can only be run on the client can be run on the web side by constructing a webbed running environment. The computer-free site (pc-free site) refers to that some applets only have mobile-side applications, and no computer-side applications exist, that is, whether the applet resources are normal cannot be judged through the state of hypertext transfer protocol (http) links of the original site. A large number of end games, small games, etc. generally have no pc sites, while bar, bean paste, known, etc. have pc sites.
In some examples, the applet links are sequentially retrieved from a library of applet links, each path link corresponding to a page resource. Splicing the acquired path link with the call instruction of the mobile terminal application, for example, the acquired path link may be: 7dapi7.smart tags.cn/pages/hits id=7908e85c3ca 187ef491ad248, and the call-up command for mobile-side applications may be, for example: the baidbox app:// swan/$ { app id }/$ { path }, and the acquired path links are transmitted to { path } parameters in the call command of the mobile terminal application to generate a complete call command. After a complete call command is obtained, the call command is sent to the mobile terminal, so that the mobile terminal executes the call command to obtain application page resources corresponding to the call command, and the resources are analyzed and rendered to obtain page contents corresponding to the link address.
In some examples, the mobile end may be assisted by a respective web automation tool to execute a respective call-up command. For example, the web automation tool may be a Selenium to simulate the operation of a user clicking on a mobile end application. It should be understood that other tools or means that can be used in the detection method according to the present disclosure are also possible.
According to some embodiments, splicing the obtained information of the path link with a corresponding preset instruction according to the type of the applet to obtain the link address to be detected includes: responding to the type of the applet as a web page-based link or a computer-based site, and extracting key path information from the acquired path link; and splicing the extracted key path information with a source station path corresponding to the applet to obtain a link address to be detected.
According to some embodiments, obtaining the corresponding page content according to the link address to be detected includes: and acquiring the source station page content corresponding to the applet according to the link address to be detected so as to acquire the corresponding page content.
In some examples, the applet links are sequentially retrieved from the applet link library and critical path information is extracted from the retrieved path links. The critical path information may be, for example, critical page information containing a path ID. For example, the acquired path links are: in an embodiment of 7dapi7. Smart_pages/pages/hits = 7908e85c3ca187ef491ad248, the critical path information may be, for example: pages/granule/granule=7908e85c3ca 187ef491ad248. It should be appreciated that the critical path information described above is merely exemplary and that the extraction rules for critical path information may be specifically designed according to different applets. And splicing the extracted critical path information with the source station path corresponding to the applet. For example, the source station path corresponding to the hundred degree experience applet is: https:// jingan. Therefore, according to the link address to be detected obtained after the splicing, the resource corresponding to the link address to be detected is obtained, the resource is analyzed and rendered, and the page content corresponding to the link address is obtained. The above-described dead-link detection method according to the present disclosure may be particularly advantageous in cases where dynamic JS rendering of web pages is required. The method eliminates the limitation and influence of external factors such as mobile terminal application version, network, model and the like, and improves the stability of the dead-link detection of the small program.
In some examples, the source station part page may have a redirection skip, so tracking detection may be set to track the page content of the redirection page, so as to determine whether the acquired path link is a dead link according to the detection result of the redirection page.
In some examples, the resource corresponding to the link address to be detected may be obtained through libcurl. The libcurl has the main functions of connecting and communicating with different servers or devices by using different protocols, is highly portable, can work on different platforms, supports Windows, unix, linux and the like, and supports a plurality of transmission protocols. It should be understood that other tools or methods that may be used to obtain the resource corresponding to the link address to be detected are possible, such as, for example, curl, and are not limited thereto.
The method for detecting the dead chain of the small program has high detection accuracy and better detection performance, is not influenced by the type of the small program, can execute the dead chain detection on the small program of various types, and improves the user experience of the small program user.
It should be understood that, although the dead-link detection may be performed by splicing the key path information extracted from the acquired path link with the source station path corresponding to the applet when the applet is of the type having a web page link or a computer end site, the dead-link detection may also be performed by splicing the acquired path link with the call-up instruction of the mobile end application corresponding to the applet. In some examples, multiple tests may be performed in two sample modes, respectively, to test for higher efficiency and accuracy of dead-chain detection in which mode to determine a more appropriate way to perform dead-chain detection for the applet.
According to some embodiments, the preset detection rules include one or more of the following: status code detection, page element detection, and white screen detection. The dead link detection method based on the preset detection rules is high in accuracy and detection effect, and can meet the requirement of subsequent data analysis based on the link address.
According to some embodiments, detecting the page content according to a preset detection rule, so as to determine whether the path link corresponding to the page content is a dead link based on a detection result includes: responding to the detection of an abnormal state code in the page content, and judging that a path link corresponding to the page content is a dead link; responding to the detection of page elements representing error information in the page content, and judging that a path link corresponding to the page content is a dead link; and judging that the path link corresponding to the page content is a dead link in response to the white screen rate of the page content exceeding a threshold value ratio.
In some examples, the status code may include: "4xx", "5xx", etc. For example, detection of "404NotFound", "403Forbidden", etc. may be considered a dead chain. For example, a status code library may be preset to store the possible status codes representing the dead link status. When the status code contained in the status code library or the status code satisfying the preset condition (for example, 4 xx) is detected in the obtained page content, the corresponding path link can be judged as a dead link. As shown in fig. 2, when the status code 423 is detected in the obtained page content, it may be determined that the corresponding path link is a dead link.
In some examples, the page element may include: the method comprises the steps of 'article does not exist', 'deleted', 'temporarily incapable of playing', 'video loading fails', 'loading unsuccessful', 'web page incapable of opening', 'incapable of displaying the web page', and the like. For example, html page elements may be located and detected using xpath or the like. As shown in fig. 2, if the page element appears in the word "article does not exist", the word is determined to be a dead chain. For example, a page element library may be preset to store the above-described possible page elements representing the dead-link state. When the page elements contained in the page element library are detected in the obtained page content, the corresponding path links can be judged to be dead links.
In some embodiments, the page element may also include a page title, a text length, and the like, for example, if the page title is detected to be included in the page content, it may be determined that the path link corresponding to the page content is not a dead link, or is a dead link; and judging that the path link corresponding to the page content is a dead link if the text length in the page content is detected to be smaller than a certain threshold value, otherwise, not being the dead link, and the like.
In some examples, the acquired page may be divided into regions and a determination may be made as to whether each region is a white screen. And counting the white screen area and the total page area of the whole page area to obtain the white screen rate. When the white screen rate of the page is larger than a preset threshold value rate, the corresponding path link can be judged to be a dead link.
In some embodiments, a kernel of a headless browser may be used for rendering, and after capturing through the headless, a screenshot may be generated, and the regions are divided on the picture, and whether each region is a white screen is determined, so that the screen percentage of the picture is calculated.
In some embodiments, it is also possible to determine whether a path link is a dead link by crawling the log to analyze the log, for example, based on log information in the Logcat crawling application, to further detect the dead link of the applet.
It should be understood that it may be set that the path link corresponding to the page is only determined to be a dead link when a plurality of conditions in the preset detection rule are met, so as to further improve the detection accuracy. The satisfaction of the plurality of conditions in the preset detection rule may be expressed as satisfaction of a plurality of conditions such as status code detection, page element detection, and white screen detection, or satisfaction of a plurality of preset conditions in any one of the detection conditions. For example, when it is detected that the page contains a page element "deleted" and the white screen rate of the page exceeds a preset threshold rate, the corresponding path link may be determined to be a dead link. For another example, when it is detected that the page includes a page element that has been "deleted" and no page header is detected in the page, the corresponding path link may be determined to be a dead link. The detection rule and the condition for judging the dead link may be specifically set according to the actual situation, and are not limited herein.
In some examples, status codes and page elements in the page content may be identified based on OCR (Optical Character Recognition ) techniques, and the page white space rate may be further determined.
According to some embodiments, the method further comprises: responding to the loaded page content of the applet according to the acquired path link, and capturing interface parameters of the applet; and judging whether the path link is a dead link or not according to the interface parameters. For example, the captured applet interface parameters may be: { "status":1, "msg": "data acquisition success", "data" { "event": { "content": "}," events_str ": null }, and judging that the acquired path link is not a dead link according to the keyword of" data acquisition success "included therein, otherwise, marking the acquired path link as the dead link.
The preparation rate and efficiency of the dead-link detection of the data interface are higher, but the data interface is not applicable or takes more time when the interface is encrypted or the interface is dynamically checked.
According to some embodiments, the applet dead-link detection method according to the present disclosure further comprises: and in response to judging that the path link corresponding to the page content is a dead link, marking the path link in the applet link library as the dead link.
As shown in fig. 3, in response to the type of the applet being a web page-based link or a computer-based site, acquiring path information (path link) of the applet, and reading information corresponding to a link address to be detected by using libcurl; acquiring and judging a HTTPcode return state code, detecting whether a preset abnormal state code of '4 xx' and '5 xx' exists or not, and judging that the path of the applet is a dead chain when the abnormal state code is detected; if a normal status code such as 200 is detected, static page content can be further captured, an xpath is used for locating page elements, whether page element keywords such as a preset content does not exist or not is detected, if the keywords are detected, the applet path is judged to be a dead link, and meanwhile, in the process, a title, a white screen rate and the like can be extracted to assist in judging the page element content, so that the applet path is judged to be the dead link together with the keywords; if the key word is detected, the data interface for page rendering can be obtained through analysis by grabbing a packet, interface parameters are requested and parameter detection is carried out, when error information is matched in the parameters, the path of the small program is judged to be a dead link, and otherwise, the path of the small program is judged to be a normal link. The above process is merely an exemplary flow for implementing the method according to the present disclosure, and the execution order thereof may be adaptively adjusted according to actual circumstances or one or more steps thereof may be omitted, which is not limited herein.
In addition, the types of the applets are webless links and have computer end sites, and the dead-link detection method is similar to the above process, and will not be repeated here.
In some embodiments, when the corresponding path link is judged to be a dead link, the path link is deleted from the applet link library, so that the resource corresponding to the path link is prevented from being analyzed when the data analysis is performed later, and the waste of computing resources is avoided.
There is also provided, in accordance with an embodiment of the present disclosure, an applet dead-end detection apparatus 400, as shown in fig. 4, comprising: a first obtaining unit 410 configured to obtain a path link from a applet link library; the splicing unit 420 is configured to splice the acquired information of the path link with a corresponding preset instruction according to the type of the applet so as to obtain a link address to be detected; a second obtaining unit 430, configured to obtain corresponding page content according to the link address to be detected; and a first detection unit 440 configured to detect the page content according to a preset detection rule, so as to determine whether the path link corresponding to the page content is a dead link based on the detection result.
According to some embodiments, the splice unit comprises: and in response to the type of the applet being a webpage-free link or a computer-free end site, splicing the acquired path link with a call instruction of the mobile end application corresponding to the applet so as to obtain a unit of a link address to be detected.
According to some embodiments, the second acquisition unit comprises: a unit for sending the obtained link address to be detected to the mobile terminal so that the mobile terminal application obtains the content of the applet page according to the link address to be detected; and a unit for receiving the applet page content sent by the mobile terminal to obtain the corresponding page content.
According to some embodiments, the splice unit comprises: a unit for extracting key path information from the acquired path links in response to the applet type being a web-linked or computer-side site; and splicing the extracted key path information with a source station path corresponding to the applet to obtain a unit of a link address to be detected.
According to some embodiments, the second acquisition unit comprises: and acquiring the source station page content corresponding to the applet according to the link address to be detected so as to acquire the corresponding page content unit.
According to some embodiments, the preset detection rules include one or more of the following: status code detection, page element detection, and white screen detection.
According to some embodiments, the first detection unit comprises: a unit for judging that a path link corresponding to the page content is a dead link in response to the detection of the abnormal state code in the page content; a unit for judging that a path link corresponding to the page content is a dead link in response to the detection of a page element representing error information in the page content; and a unit for judging that the path link corresponding to the page content is a dead link in response to the white screen rate of the page content exceeding a threshold rate.
According to some embodiments, the method further comprises a second detection unit configured to: responding to the applet to load page content according to the acquired path link, and capturing interface parameters of the applet; and judging whether the path link is a dead link or not according to the interface parameters.
According to some embodiments, the method further comprises a marking unit configured to: and in response to judging that the path link corresponding to the page content is a dead link, marking the path link in the applet link library as the dead link.
Here, the operations of the above units 410 to 440 of the applet dead-chain detection apparatus 400 are similar to the operations of the steps 110 to 140 described above, respectively, and are not repeated here.
According to yet another aspect of the present disclosure, there is provided a computing device comprising: a processor; and a memory storing a program comprising instructions that when executed by the processor cause the processor to perform the applet dead-line detection method described in the present disclosure.
According to yet another aspect of the present disclosure, there is provided a computer readable storage medium storing a program comprising instructions that, when executed by a processor of a computing device, cause the electronic device to perform the applet dead-link detection method described in the present disclosure.
With reference to fig. 5, a computing device 5000, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Computing device 5000 may be any machine configured to perform processes and/or calculations and may be, but is not limited to, a workstation, a server, a desktop computer, a laptop computer, a tablet computer, a personal digital assistant, a robot, a smart phone, an on-board computer, or any combination thereof. The applet dead-link detection methods described above may each be implemented in whole or at least in part by a computing device 5000 or similar device or system.
Computing device 5000 may include elements that are connected to bus 5002 or communicate with bus 5002 (possibly via one or more interfaces). For example, the computing device 5000 may include a bus 5002, one or more processors 5004, one or more input devices 5006, and one or more output devices 5008. The one or more processors 5004 may be any type of processor and may include, but are not limited to, one or more general purpose processors and/or one or more special purpose processors (e.g., special processing chips). Input device 5006 may be any type of device capable of inputting information to computing device 5000 and may include, but is not limited to, a mouse, keyboard, touch screen, microphone, and/or remote control. The output device 5008 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. The computing device 5000 may also include, or be connected to, non-transitory storage devices 5010, which may be non-transitory and which may enable any storage of data, and may include, but are not limited to, magnetic disk drives, optical storage devices, solid state memory, floppy diskettes, flexible disks, hard disks, magnetic tape, or any other magnetic medium, optical disks or any other optical medium, ROM (read only memory), RAM (random access memory), cache memory, and/or any other memory chip or cartridge, and/or any other medium from which a computer may read data, instructions, and/or code. The non-transitory storage device 5010 may be detachable from the interface. The non-transitory storage device 5010 may have data/program (including instructions)/code for implementing the methods and steps described above. The computing device 5000 may also include a communications device 5012. The communication device 5012 may be any type of device or system that enables communication with external devices and/or with a network and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication devices, and/or chipsets, such as bluetooth (TM) devices, 1302.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing device 5000 may also include a working memory 5014, which may be any type of working memory that may store programs (including instructions) and/or data useful for the operation of the processor 5004, and may include, but is not limited to, random access memory and/or read only memory devices.
Software elements (programs) may reside in the working memory 5014 including, but not limited to, an operating system 5016, one or more application programs 5018, drivers, and/or other data and code. Instructions for performing the above-described methods and steps may be included in one or more applications 5018, and the above-described applet dead-link detection methods may each be implemented by instructions of one or more applications 5018 read and executed by the processor 5004. More specifically, in the above-described applet dead-chain detection method, the steps 110 to 140 can be implemented by, for example, the processor 5004 executing the application 5018 having the instructions of the steps 110 to 140. Further, other steps in the applet dead-chain detection method described above may be implemented, for example, by the processor 5004 executing an application 5018 with instructions for executing the respective steps. Executable code or source code of instructions of the software elements (programs) may be stored in a non-transitory computer readable storage medium (e.g., the storage device 5010 described above) and may be stored (possibly compiled and/or installed) in the working memory 5014 when executed. Executable code or source code for instructions of software elements (programs) may also be downloaded from a remote location.
It should also be understood that various modifications may be made according to specific requirements. For example, custom hardware may also be used, and/or particular elements may be implemented in hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. For example, some or all of the disclosed methods and apparatus may be implemented by programming hardware (e.g., programmable logic circuits including Field Programmable Gate Arrays (FPGAs) and/or Programmable Logic Arrays (PLAs)) in an assembly language or hardware programming language such as VERILOG, VHDL, c++ using logic and algorithms according to the present disclosure.
It should also be appreciated that components of computing device 5000 may be distributed across a network. For example, some processes may be performed using one processor while other processes may be performed by another processor remote from the one processor. Other components of the computing system 5000 may be similarly distributed. As such, computing device 5000 may be interpreted as a distributed computing system which performs processing at multiple locations.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the disclosure.

Claims (16)

1. A method of applet dead-link detection comprising:
obtaining path links from a applet link library;
splicing the obtained path link information with a corresponding preset instruction according to the type of the applet to obtain a link address to be detected, wherein the method comprises the following steps:
responding to the type of the applet without the weblinking and without a computer terminal site, and splicing the acquired path link with a call instruction of the mobile terminal application corresponding to the applet so as to obtain a link address to be detected;
responding to the type of the applet as a website with a weblinking or a computer end, extracting key path information from the acquired path link, and splicing the extracted key path information with a source station path corresponding to the applet to obtain a link address to be detected;
acquiring corresponding page content according to the link address to be detected; and
and detecting the page content according to a preset detection rule, so as to judge whether the path link corresponding to the page content is a dead link or not based on a detection result.
2. The method of claim 1, wherein responding to the applet being of the type without a netpage link and without a computer end site, obtaining corresponding page content according to the link address to be detected comprises:
the obtained link address to be detected is sent to the mobile terminal, so that the mobile terminal application obtains the content of the applet page according to the link address to be detected; and
and receiving the applet page content sent by the mobile terminal to acquire the corresponding page content.
3. The method of claim 1, wherein responding to the type of the applet being a web-enabled link or a computer-side site, obtaining the corresponding page content according to the link address to be detected comprises:
and acquiring the source station page content corresponding to the applet according to the link address to be detected so as to acquire the corresponding page content.
4. The method of claim 1, the preset detection rules comprising one or more of: status code detection, page element detection, and white screen detection.
5. The method of claim 4, wherein detecting the page content according to a preset detection rule to determine whether a path link corresponding to the page content is a dead link based on a detection result comprises:
responding to the detection of an abnormal state code in the page content, and judging that a path link corresponding to the page content is a dead link;
responding to the detection of page elements representing error information in the page content, and judging that a path link corresponding to the page content is a dead link; and
and judging that the path link corresponding to the page content is a dead link in response to the fact that the white screen rate of the page content exceeds a threshold value ratio.
6. The method of claim 1, the method further comprising:
responding to the applet to load page content according to the acquired path link, and capturing interface parameters of the applet; and
and judging whether the path link is a dead link or not according to the interface parameters.
7. The method of claim 1, the method further comprising:
and in response to judging that the path link corresponding to the page content is a dead link, marking the path link in the applet link library as the dead link.
8. An applet dead-link detection apparatus comprising:
a first acquisition unit configured to acquire a path link from a applet link library;
the splicing unit is configured to splice the acquired information of the path link with a corresponding preset instruction according to the type of the applet so as to obtain a link address to be detected, and comprises the following steps:
responding to the type of the applet as a website without a weblinking link or a computer end, and splicing the acquired path link with a call instruction of a mobile end application corresponding to the applet to obtain a unit of a link address to be detected;
responding to the type of the applet as a website with a weblinking or a computer end, extracting key path information from the acquired path link, and splicing the extracted key path information with a source station path corresponding to the applet to obtain a link address to be detected; the second acquisition unit is configured to acquire corresponding page contents according to the link address to be detected; and
the first detection unit is configured to detect the page content according to a preset detection rule, so as to judge whether a path link corresponding to the page content is a dead link or not based on a detection result.
9. The apparatus of claim 8, wherein the second acquisition unit comprises:
responding to the type of the applet without a weblinking and without a computer terminal site, and sending the obtained link address to be detected to the mobile terminal so that the mobile terminal application obtains the content of the applet page according to the link address to be detected; and
and receiving the applet page content sent by the mobile terminal to obtain the corresponding page content unit.
10. The apparatus of claim 8, wherein the second acquisition unit comprises:
and responding to the type of the applet as a unit with a webpage link or a computer terminal site, and acquiring the source station page content corresponding to the applet according to the link address to be detected so as to acquire the corresponding page content.
11. The apparatus of claim 8, the preset detection rules comprising one or more of: status code detection, page element detection, and white screen detection.
12. The apparatus of claim 11, wherein the first detection unit comprises:
a unit for judging that a path link corresponding to the page content is a dead link in response to the detection of the abnormal state code in the page content;
a unit for judging that a path link corresponding to the page content is a dead link in response to the detection of a page element representing error information in the page content; and
and judging that the path link corresponding to the page content is a unit of dead link in response to the white screen rate of the page content exceeding a threshold value ratio.
13. The apparatus of claim 8, further comprising a second detection unit configured to:
responding to the applet to load page content according to the acquired path link, and capturing interface parameters of the applet; and
and judging whether the path link is a dead link or not according to the interface parameters.
14. The apparatus of claim 8, further comprising a marking unit configured to:
and in response to judging that the path link corresponding to the page content is a dead link, marking the path link in the applet link library as the dead link.
15. A computing device, comprising:
a processor; and
a memory storing a program comprising instructions that when executed by the processor cause the processor to perform the method of any of claims 1-7.
16. A computer readable storage medium storing a program, the program comprising instructions that when executed by a processor of a computing device cause the computing device to perform the method of any of claims 1-7.
CN202011245779.5A 2020-11-10 2020-11-10 Applet dead-link detection method and device, computing device and medium Active CN112269666B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011245779.5A CN112269666B (en) 2020-11-10 2020-11-10 Applet dead-link detection method and device, computing device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011245779.5A CN112269666B (en) 2020-11-10 2020-11-10 Applet dead-link detection method and device, computing device and medium

Publications (2)

Publication Number Publication Date
CN112269666A CN112269666A (en) 2021-01-26
CN112269666B true CN112269666B (en) 2023-07-25

Family

ID=74339756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011245779.5A Active CN112269666B (en) 2020-11-10 2020-11-10 Applet dead-link detection method and device, computing device and medium

Country Status (1)

Country Link
CN (1) CN112269666B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860566B (en) * 2021-03-02 2024-04-30 百度在线网络技术(北京)有限公司 Applet detection method, device, electronic equipment and readable medium
CN116644250B (en) * 2023-07-27 2023-10-20 太平金融科技服务(上海)有限公司 Page detection method, page detection device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025559A (en) * 2010-11-09 2011-04-20 百度在线网络技术(北京)有限公司 Method for detecting and processing dead links on basis of classification, and network equipment
CN102752154A (en) * 2012-07-29 2012-10-24 西北工业大学 Detecting method of dead link of Web site
CN104317938A (en) * 2014-10-31 2015-01-28 北京国双科技有限公司 Webpage validation method and device
CN104598458A (en) * 2013-10-30 2015-05-06 腾讯科技(深圳)有限公司 Page detection method and device
CN104869033A (en) * 2015-04-23 2015-08-26 百度在线网络技术(北京)有限公司 Method and apparatus for determining dead links
CN108062362A (en) * 2017-12-01 2018-05-22 北京小度互娱科技有限公司 Dead chain detection method and device
CN108304402A (en) * 2017-01-12 2018-07-20 广州市动景计算机科技有限公司 Exterior chain availability monitor method and monitoring device
CN111444408A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Network search processing method and device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7610267B2 (en) * 2005-06-28 2009-10-27 Yahoo! Inc. Unsupervised, automated web host dynamicity detection, dead link detection and prerequisite page discovery for search indexed web pages

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025559A (en) * 2010-11-09 2011-04-20 百度在线网络技术(北京)有限公司 Method for detecting and processing dead links on basis of classification, and network equipment
CN102752154A (en) * 2012-07-29 2012-10-24 西北工业大学 Detecting method of dead link of Web site
CN104598458A (en) * 2013-10-30 2015-05-06 腾讯科技(深圳)有限公司 Page detection method and device
CN104317938A (en) * 2014-10-31 2015-01-28 北京国双科技有限公司 Webpage validation method and device
CN104869033A (en) * 2015-04-23 2015-08-26 百度在线网络技术(北京)有限公司 Method and apparatus for determining dead links
CN108304402A (en) * 2017-01-12 2018-07-20 广州市动景计算机科技有限公司 Exterior chain availability monitor method and monitoring device
CN108062362A (en) * 2017-12-01 2018-05-22 北京小度互娱科技有限公司 Dead chain detection method and device
CN111444408A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Network search processing method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Web网站死链检测方法;姚卓;蔡皖东;姚烨;;微电子学与计算机(12);全文 *

Also Published As

Publication number Publication date
CN112269666A (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN108595583B (en) Dynamic graph page data crawling method, device, terminal and storage medium
WO2016173200A1 (en) Malicious website detection method and system
US8424004B2 (en) High performance script behavior detection through browser shimming
CN112269666B (en) Applet dead-link detection method and device, computing device and medium
CN110688307B (en) JavaScript code detection method, device, equipment and storage medium
CN114417197A (en) Access record processing method and device and storage medium
CN105205144A (en) Method and system used for data diagnosis and optimization
CN106528659A (en) A control method and device for jumping from a browser to an application program
CN111949522A (en) User interface automatic testing method and device
CN113704590A (en) Webpage data acquisition method and device, electronic equipment and storage medium
CN114528457A (en) Web fingerprint detection method and related equipment
CN113760763A (en) Software testing method, device, server and system
CN112363904B (en) Log data analysis positioning method and device and computer readable storage medium
CN113742551A (en) Dynamic data capture method based on script and puppeteer
CN112307386A (en) Information monitoring method, system, electronic device and computer readable storage medium
CN112436980A (en) Method, device and equipment for reading test data packet and storage medium
CN116451271A (en) Automatic privacy policy extraction method for application software
CN111125704A (en) Webpage Trojan horse recognition method and system
CN115130041A (en) Webpage quality evaluation method, neural network training method, device and equipment
US11550990B2 (en) Machine first approach for identifying accessibility, non-compliances, remediation techniques and fixing at run-time
CN110990558B (en) Electronic book content display method, computing equipment and computer storage medium
CN109597952B (en) Webpage information processing method, system, electronic equipment and storage medium
Panum et al. Kraaler: A user-perspective web crawler
CN112100156A (en) Method, device, medium and system for constructing knowledge base based on user behaviors
US11977435B2 (en) Access method, communication system, and non-transitory computer readable memory

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