CN110347955B - Resource detection method and device - Google Patents

Resource detection method and device Download PDF

Info

Publication number
CN110347955B
CN110347955B CN201910461625.0A CN201910461625A CN110347955B CN 110347955 B CN110347955 B CN 110347955B CN 201910461625 A CN201910461625 A CN 201910461625A CN 110347955 B CN110347955 B CN 110347955B
Authority
CN
China
Prior art keywords
resource
offline
referenced
published
cms
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
CN201910461625.0A
Other languages
Chinese (zh)
Other versions
CN110347955A (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.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies 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 Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to CN201910461625.0A priority Critical patent/CN110347955B/en
Publication of CN110347955A publication Critical patent/CN110347955A/en
Priority to PCT/CN2020/088786 priority patent/WO2020238567A1/en
Application granted granted Critical
Publication of CN110347955B publication Critical patent/CN110347955B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1466Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1483Countermeasures against malicious traffic service impersonation, e.g. phishing, pharming or web spoofing

Abstract

A resource detection method and device are used for automatically detecting dead links in webpages or documents. According to the method and the device, a detection device receives a first detection instruction for the resource to be issued, the URL link of the resource quoted in the resource to be issued is obtained according to the first detection instruction, the detection device can judge the state of the quoted resource according to the URL link of the quoted resource, if the quoted resource is in an offline state, the fact that the resource to be issued cannot jump normally due to the fact that the resource to be issued is shown, the detection device can generate first prompt information, and can also send the first prompt information to a CMS, wherein the first prompt information is used for prompting that the resource to be issued cannot jump normally due to the fact that the resource to be issued is issued and a failure URL link is generated. Before the resource to be published is published, a possible dead link condition of the resource to be published can be detected in advance, and under the condition that the dead link exists, the probability that the published webpage or document has the dead link can be effectively reduced, and the user experience can also be improved.

Description

Resource detection method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a resource detection method and apparatus.
Background
When a user browses a website or surfs the internet, the webpages can jump to display content required by the user, the jumping among the webpages is caused by reference relations among the webpages, and when the content on the webpages needs to be updated, such as original content deletion, new content addition and the like, the reference relations among the webpages may be changed.
When a web page which is not published or is offline exists in the web page referenced by the published web page, and when a user browses the published web page, if the user browses the web page referenced by the web page, a dead link occurs, that is, the user accesses a web page which does not exist, and returns to the state of 404, and the like, so that the user experience is influenced.
At present, a dead link detection mode mainly depends on user feedback, and if a user finds a dead link when browsing a webpage, the user feeds the dead link back to website maintenance personnel so as to repair the dead link. In this way, depending on the feedback of the user, the dead link is not found timely, the efficiency is low, and the user experience is also influenced.
Disclosure of Invention
The application provides a resource detection method and device, which are used for automatically detecting dead links in a webpage or a document.
In a first aspect, an embodiment of the present application provides a resource detection method, which may be executed by a detection apparatus, and may also be executed by a CMS, where the detection apparatus is taken as an example for description, where the method includes: when the CMS confirms that the resource to be issued needs to be issued under the trigger of the user, the CMS may send a first detection instruction for the resource to be issued to the detection apparatus, and the detection apparatus receives the first detection instruction, where the first detection instruction may carry related information of the resource to be issued, and may, for example, carry a URL link of the resource to be issued; the detection device may obtain, according to the first detection instruction, a URL link of a resource referred to in the resource to be issued, where the resource referred to in the resource to be issued may be referred to as a referred resource in this embodiment of the application; then, the detection device may determine the state of the referenced resource according to the URL link of the referenced resource, and if the referenced resource is in an offline state, it indicates that issuing the resource to be issued may cause the resource to be issued to jump abnormally, and the detection device may generate the first prompt information, and may also send the first prompt information to the CMS, where the first prompt information is used to prompt that issuing the resource to be issued may generate a failed URL link.
By the method, the possibly existing dead link condition of the resource to be published can be detected in advance before the resource to be published is published, the resource can be prevented from being published in time under the condition that the dead link exists, the probability of the dead link existing in the published webpage or document can be effectively reduced, and the user experience can be improved.
In a possible design, if the referenced resource goes offline at a future time, that is, the referenced resource goes offline at a later time, if the referenced resource goes offline, the to-be-published resource cannot jump normally after being published, and a dead link exists, the detecting device may generate second prompt information, and may also send the second prompt information to the CMS, where the second prompt information is used to prompt that the to-be-published resource will generate a dead URL link when arriving at the future time.
By the method, the resources with the offline time preset in the referenced resources are detected, and the problem that the to-be-issued resources generate invalid URL links after being issued can be avoided.
In a possible design, if the referenced resource is in an online state, that is, the referenced resource can be always checked, the resource to be published can jump normally after being published, and a dead link does not exist, the detection apparatus may generate third prompt information, and may further send the third prompt information to the CMS, where the third prompt information is used to prompt that the publishing of the resource to be published does not generate a dead URL link.
By the method, the resources to be issued can be issued under the condition that the referenced resources are in the online state, and the resources to be issued can jump normally after being issued.
In one possible design, after the to-be-issued resource is issued, the detection apparatus may save the reference relationship between the to-be-issued resource and the referenced resource, and the state information of the to-be-issued resource. For example, the detection apparatus may obtain the CMS path of the resource to be published according to the URL link of the resource to be published; and obtaining the CMS path of the referenced resource according to the URL link of the referenced resource; recording the reference relation between the CMS path of the resource to be published and the CMS path of the referenced resource, and recording the state of the resource to be published as the on-line state. And recording the corresponding relation between the CMS path of the resource to be published and the state of the resource to be published, wherein the state of the resource to be published is recorded as the on-line state.
By the method, each time the resource is released, the detection device can store the reference relationship between the released resource and the resource referred by the resource and the state information of the resource, and can subsequently check the resource state and the reference relationship between the resources.
In one possible design, the detection apparatus may record, before receiving a first detection instruction for the resource to be issued, triggered by a user, a reference relationship between the referenced resource and a resource referenced by the referenced resource after the referenced resource is issued; the state of the referenced resource may also be recorded; the scenario that the detection device records the state of the referenced resource is not limited to the scenario that the referenced resource is issued, and may also be in other scenarios, such as offline of the referenced resource, which is not limited in the embodiment of the present application. For example, when the detecting device records the state of the referenced resource, the detecting device may record the corresponding relationship between the CMS path of the referenced resource and the state of the referenced resource.
When the detection device judges the state of the referenced resource according to the URL link of the referenced resource, the CMS path of the referenced resource can be obtained according to the URL link of the referenced resource; then, the state of the referenced resource corresponding to the CMS path of the referenced resource is looked up from the correspondence.
By the method, the detection device can record the state of the quoted resource in advance, so that the state of the quoted resource can be conveniently determined according to the stored information before the to-be-published resource is published, and whether the to-be-published resource generates the invalid URL link after being published can be efficiently determined.
In one possible design, the type of the resource to be published is one of a network element and a document; that is, the resource to be published may be a single web page, or may include a document of a plurality of web pages; and the type of the referenced resource is one or both of a network element and a document, that is, the resource to be published can reference a single webpage or a document.
By the method, the resource detection method provided by the application is suitable for a single webpage publishing scene and a document publishing scene, and the application range can be effectively expanded.
In a second aspect, an embodiment of the present application provides a resource detection method, where the method may be executed by a detection apparatus, and may also be executed by a CMS, where the method is described by taking the detection apparatus as an example, and the method includes: when the CMS confirms that the resource to be offline needs to be offline under the triggering of the user, the CMS may send a second detection instruction for the resource to be offline to the detection device, and the detection device receives the second detection instruction, where the second detection instruction may carry related information of the resource to be offline, and for example, may carry a URL link of the resource to be offline; the detection device can obtain the URL link of the resource to be offline according to the second detection instruction; and then, judging the state of the resource (in the embodiment of the present application, the resource in the resource that refers to the URL link of the web page to be offline may be referred to as a reference resource), if the reference resource is in the online state, it is indicated that the resource that is offline to be offline can not be normally skipped to the resource that is offline, the detection device may generate fourth prompt information, and may also send the fourth prompt information to the CMS, where the fourth prompt information is used to prompt the resource that is offline to generate a failed URL link.
By the method, the possible dead link condition of the resource to be offline can be detected in advance before the resource to be offline is offline, if the dead link exists, the resource can be prevented from being offline in time, the probability of invalid URL links generated by the offline webpage or document can be effectively reduced, and the user experience can be effectively improved.
In a possible design, if the referenced resource is offline at a future time, that is, the referenced resource is offline at a certain later time, if the referenced resource is offline, the referenced resource cannot jump normally after the resource to be offline is offline and before the referenced resource is offline, a dead link exists, the detecting device may generate fifth prompt information, and may further send the fifth prompt information to the CMS, where the fifth prompt information is used to prompt that the resource to be offline is to generate a failed URL link when the resource to be offline arrives at the future time.
By the method, the resources with the offline time preset in the reference resources are detected, and the condition that the to-be-offline resources generate invalid URL links after being offline can be avoided.
In a possible design, if the referenced resource is in an offline state, that is, after the resource to be offline is offline, the referenced resource is not affected by the absence of a dead link in any of the referenced resources, the detection device may generate sixth prompt information, and may further send the sixth prompt information to the CMS, where the sixth prompt information is used to prompt that the resource to be released offline does not generate a dead URL link.
By the method, the resource to be offline can be offline under the condition that the quoted resource is offline, and dead links cannot be generated after the resource to be offline is offline.
In one possible design, before receiving the second detection instruction for the resource to be offline triggered by the user, the detection apparatus may record, after the reference resource is issued, a reference relationship between the reference resource and a resource referenced by the reference resource (e.g., the resource to be offline); the state of the referenced resource can also be recorded; the scenario in which the detection device records the state of the referenced resource is not limited to the scenario in which the referenced resource is issued, and may also be in other scenarios, which is not limited in the embodiment of the present application. For example, when the detecting device records the state of the referenced resource, it may record the reference relationship between the CMS path of the resource to be offline and the CMS path of the referenced resource; and recording the corresponding relation between the CMS path of the reference resource and the state of the reference resource.
When the detection device judges the state of the quote resource of the URL link which quotes the webpage to be offline, the CMS path of the resource to be offline can be obtained according to the URL link of the resource to be offline; then, acquiring a CMS path for quoting the resource from the quoting relationship according to the CMS path of the resource to be offline; and searching the state of the referenced resource corresponding to the CMS path of the referenced resource from the corresponding relation.
By the method, the detection device can record the state of the quoted resource in advance, so that the state of the quoted resource can be conveniently determined according to the stored information before the offline resource is offline subsequently, and whether the invalid URL link is generated after the offline resource is offline can be efficiently determined.
In a possible design, the type of the resource to be published is one of a webpage and a document, and the resource to be offline can be a single webpage or a document; the type of referenced resource is one or both of a web page and a document.
By the method, the resource detection method provided by the application is suitable for a scene of off-line of a single webpage and a scene of off-line of a document, and the application range can be effectively expanded.
In a third aspect, an embodiment of the present application further provides an apparatus, where the apparatus has a function of implementing behavior in the method example of the first aspect, and for beneficial effects, reference may be made to description of the first aspect, which is not described herein again. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. In a possible design, the structure of the apparatus includes a receiving unit, an obtaining unit, a determining unit, an information generating unit, and may further include a recording module, where these units may perform corresponding functions in the method example of the first aspect, for which specific reference is made to detailed description in the method example, and details are not repeated here.
In a fourth aspect, an embodiment of the present application further provides an apparatus, where the apparatus has a function of implementing behaviors in the method example of the second aspect, and for beneficial effects, reference may be made to description of the second aspect and details of the description are not repeated here. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions. In a possible design, the structure of the apparatus includes a receiving unit, an obtaining unit, a determining unit, and an information generating unit, and may further include a recording unit, where these units may perform corresponding functions in the method example of the second aspect, for which specific reference is made to the detailed description in the method example, and details are not repeated here.
In a fifth aspect, an embodiment of the present application further provides an apparatus, where the apparatus has a function of implementing the behavior in the method example of the first aspect, and for beneficial effects, reference may be made to the description of the first aspect and details are not repeated here. The structure of the detection apparatus comprises a processor and a memory, and the processor is configured to support the base station to perform corresponding functions in the method of the first aspect. The memory is coupled to the processor and holds the program instructions and data necessary for the communication device. The structure of the communication device also comprises a communication interface used for communicating with other equipment.
In a sixth aspect, an embodiment of the present application further provides an apparatus, where the apparatus has a function of implementing the behavior in the method example of the second aspect, and for beneficial effects, reference may be made to description of the second aspect and details are not repeated here. The communication device has a structure including a processor and a memory, and the processor is configured to support the base station to perform corresponding functions in the method of the second aspect. The memory is coupled to the processor and holds the program instructions and data necessary for the communication device. The structure of the communication device also comprises a communication interface used for communicating with other equipment.
In a seventh aspect, the present application further provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
In an eighth aspect, the present application also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above aspects.
In a ninth aspect, the present application further provides a computer chip, where the chip is connected to a memory, and the chip is used to read and execute a software program stored in the memory, and execute the method in the above aspects.
Drawings
FIG. 1 is a schematic diagram of a network system architecture according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a backend server provided in the present application;
fig. 3 is a schematic structural diagram of another back-end server provided in the present application;
fig. 4 is a schematic diagram of a resource detection method provided in the present application;
fig. 5 is a schematic diagram of a resource detection method provided in the present application;
FIG. 6 is a schematic view of a user interface provided herein;
FIG. 7 is a schematic diagram of a detection result provided herein;
FIG. 8 is a schematic illustration of another test result provided herein;
fig. 9 is a schematic diagram of a resource detection method provided in the present application;
fig. 10 is a schematic diagram of a resource detection method provided in the present application;
FIG. 11 is a schematic view of another user interface provided herein;
fig. 12 to 14 are schematic structural diagrams of a communication device according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in further detail with reference to the accompanying drawings. The particular methods of operation in the method embodiments may also be applied in device embodiments or system embodiments. In the description of the present application, the term "plurality" means two or more unless otherwise specified. In addition, it should be understood that the terms "first," "second," and the like in the description of the embodiments of the present application are used for distinguishing between descriptions and not necessarily for describing a sequential or chronological order, or for indicating or implying a relative importance.
Fig. 1 is a schematic diagram of a possible network architecture to which the present application is applied. The system includes a client 101, a Domain Name System (DNS) server 102, a web service node 103, and a backend server 104.
The client 101 is a device that can provide a web browsing service to a user, and may include, for example, a handheld device, a computer, a notebook computer, and the like, which have a transceiving function; may include mobile telephones (otherwise known as "cellular" telephones), portable, pocket, hand-held, computer-included mobile devices, and the like. The device type of the client 101 is not limited in the embodiments of the present application.
When detecting an operation of a user to browse a web page, the client 101 sends an Internet Protocol (IP) address request packet carrying a Uniform Resource Locator (URL) link (e.g., www.huawei.com) of the web page to the DNS server 102, where the IP address request packet is used to request to store an IP address of a web service node 103 of the web page, the DNS server 102 obtains an IP address corresponding to the URL link according to the IP address request packet, and sends an IP address response packet carrying the IP address to the client 101, where the IP address is an IP address of the web service node 103 storing the web page, the client 101 receives the IP address response packet, obtains the IP address from the IP address response packet, and sends a web page request packet to the web service node 103 based on the IP address, and the web page request packet is used to request the web service node 103 for a web page corresponding to a specific URL link. After acquiring the web page, the client 101 displays the web page locally.
The back-end server 104 is configured to provide background data for the web service node 103, and specifically, the back-end server 104 may be configured to control publishing and online of a web page or a document, and transmit the web page or the document to the web service node 103 when the web page or the document is online; when a web page or document comes down, the web page or document is deleted from the web service node 103.
Fig. 2 is a schematic structural diagram of a back-end server according to an embodiment of the present invention. As shown in fig. 2, the back-end server 200 includes a Content Management System (CMS) 201 and a detection apparatus 202.
The CMS201 may perform operations such as web page (or document) design, web page content update, and web page publishing or downloading; the CMS201 stores relevant files of web pages or documents, including content data of web pages or documents, i.e. content related to or shown in web pages or documents, the content data including but not limited to resources such as sites, columns, etc. in web pages or documents. The detecting device 202 is configured to perform dead link (i.e. failed URL link) detection on a resource (e.g. a resource to be issued or a resource to be offline) according to an instruction sent by the CMS201, and determine whether a failed URL link may exist.
In this embodiment of the present application, the CMS201 may send a detection instruction to the detection apparatus 202 before the web page or the document (in this embodiment, the web page, the document, and the like to be issued are collectively referred to as the resource to be issued) is issued, the detection apparatus 202 detects a possible dead link condition of the resource to be issued according to the received detection instruction, and sends a detection result to the CMS201, and the CMS201 determines whether to issue the resource to be issued according to the detection result.
In this embodiment of the present application, before a web page or a document (in this embodiment, documents such as a web page and a document to be published are collectively referred to as a resource to be offline) is offline, the CMS201 may send a detection instruction to the detection device 202, the detection device 202 detects a possible dead link condition of the resource to be offline according to the received detection instruction, and sends a detection result to the CMS201, and the CMS201 determines whether to offline the resource to be offline according to the detection result.
In this embodiment, the detection apparatus 202 may provide an Application Programming Interface (API) to the CMS201, and the user of the CMS201 may call the API in the control interface of the CMS201 to generate the dead-chain detection request.
Fig. 3 is a schematic structural diagram of another back-end server according to an embodiment of the present invention. As shown in fig. 3, the backend server 300 includes a CMS301, where the CMS301 has a function of the detecting apparatus 202 in fig. 2, and the CMS301 may detect the resource to be published or the resource to be offline after the resource to be published is published or before the resource to be offline is offline, determine a possibly stored dead link condition, and display a detection result thereof.
The following describes a resource detection method provided in the embodiment of the present application based on a network architecture and a backend server shown in fig. 1 to 3.
The embodiment of the application mainly relates to two resource detection methods which are respectively as follows:
firstly, before the resource is released, the resource to be released is detected, the state of the referred resource referred in the resource to be released is determined, whether the resource to be released can be released is determined according to the state of the referred resource, and whether an invalid URL link exists after the resource to be released is released.
By adopting the method, the possible dead link condition of the resource to be issued can be detected in advance before the resource is issued, and the issue of the resource can be prevented in time under the condition that the dead link exists; the method has the advantages that the dead link detection is not needed to be carried out manually after the resources are published, the probability of the dead link existing in the published webpage or document can be effectively reduced, and the user experience can also be improved.
And secondly, before the resources are offline, detecting the resources to be offline, determining the state of the resources in the resources to be offline, determining whether the resources to be offline can be offline or not according to the state of the referenced resources, and determining whether a failure URL link exists or not.
By adopting the method, before the resource is offline, the possible dead link condition of the resource to be offline can be detected in advance, and the resource offline process can be effectively stopped under the condition that the dead link exists; the probability of generating invalid URL links after the resources are offline is avoided, better webpage browsing experience can be provided for the user, and the user experience can be effectively improved.
The following describes the two resource detection methods:
based on the backend server shown in fig. 2, fig. 4 shows a resource detection method according to an embodiment of the present application, and as shown in fig. 4, the method includes:
step 401: the detection apparatus 202 receives a first detection instruction triggered by a user and aiming at a resource to be issued.
Before determining that the resource to be published needs to be published, the user may trigger a resource publishing process of the CMS201, so as to trigger a first detection instruction for the resource to be published; for example, in order to ensure that the resource to be issued has no dead chain after being issued, the CMS201 may send a first detection instruction for the resource to be issued to the detection apparatus 202.
Optionally, the first detection instruction may include the resource to be published or address information of the resource to be published, and for example, the first detection instruction may include an HTML file of the resource to be published, and may further include a URL link of the resource to be published.
Step 402: the detection apparatus 202 acquires the URL link of the referenced resource referenced in the resource to be issued according to the first detection instruction.
After receiving the first detection instruction, the detection apparatus 202 may obtain the resource to be issued from the first detection instruction, and determine, according to the resource to be issued, a URL link of a resource (which may be referred to as a referred resource in this embodiment) referred by the resource to be issued. For example, the detecting apparatus 202 may detect www. this keyword in the resource to be published, and determine the URL link of the referenced resource; for another example, the detecting apparatus 202 may obtain a URL link of a resource referred by the resource to be published by traversing an a tag in the resource to be published and obtaining a Hypertext Reference (HREF) attribute of the a tag.
In the embodiment of the application, the resources to be published comprise two types, one type is a webpage, and the other type is a document comprising a plurality of webpages; when the type of the resource to be published is a web page, which indicates that a single web page needs to be published, the detection apparatus 202 needs to determine a URL link of a resource referred by the web page to be published. When the type of the resource to be published is a document, it indicates that one document needs to be published, and multiple webpages need to be published simultaneously, the detection apparatus 202 needs to determine the URL link of the resource referred by each webpage in the document to be published. In some examples, the document includes multiple web pages, and in other examples, the document may also include other resources, such as pictures, portable Document Format (PDF) files, and so forth.
In the embodiment of the present application, the referenced resource may be other web pages, media files such as pictures and videos, PDF files, or documents composed of multiple web pages. The number of the referenced resources is not limited in the embodiments of the present application, and may be one or more.
Step 403: the detecting means 202 determines the state of the referenced resource based on the URL link of the referenced resource.
In the embodiment of the application, the states of the resources can be divided into an online state and an offline state. The online refers to that the resource is published into the public network and can be browsed or viewed by the user, and the online can also be called as published or online. The offline can be divided into two types, one type is not published, which means that the resource is not published in the network, cannot be browsed or checked by a user and needs to be published subsequently; the other type is offline after the resource is released, which means that the resource is deleted from the network when the resource needs to be adjusted or deleted after being released to the network. To distinguish the two types in the offline, the two types may be identified differently, and for example, the status of the unpublished resource may be identified as not published. The offline time of the released offline resource is identified to indicate that the resource has been offline in the offline time, or the offline resource may be directly deleted without identification, and if the state of the resource cannot be found, the resource may be considered offline.
Step 404: the detection device 202 generates first prompt information when confirming that the referenced resource is in the offline state, where the first prompt information is used to prompt that issuing the resource to be issued may generate a failed URL link.
If any resource in the referenced resources is in an offline state, it indicates that after the to-be-published resource is published, a user browses in the process of browsing the to-be-published resource, if the URL of the referenced resource is clicked, the referenced resource is jumped to, and if any resource in the referenced resource is offline, the user cannot check the offline resource in the referenced resource, and normal jump cannot be realized, so that a dead link is caused. To avoid this, before the detecting device 202 issues the resource to be issued, it sends a first prompt message to the CMS201 to notify that a failed URL link will be generated if the resource to be issued is issued, and the user may stop issuing the resource to be issued in the CMS201 according to the first prompt message.
After receiving the first prompting message, the CMS201 may prompt the user that there is a dead link if the resource is released; the first prompting message can also be directly displayed.
If any one of the referenced resources will be offline at a future time, illustratively, any one of the referenced resources is currently in a published state, but the offline time is marked, and the offline time is a future time, which indicates that any one of the referenced resources will be offline at a time indicated by the offline time later; so that there will also be dead chains after the resource to be published is published and arrives at a future time. To avoid this, the detecting device 202 sends a second prompt message to the CMS201, which informs that the failed URL link is generated if the resource to be published is published, and the time for generating the failed URL link is a time in the future, that is, a time for downloading any of the referenced resources, and the failed URL link is generated.
After receiving the second prompt message, the CMS201 may prompt the user that a dead link exists if the resource to be published is published, and may also prompt a time when the failed URL link is generated; the second prompting message can also be directly displayed.
If all the resources in the referenced resources are on-line, and the on-line state indicates that after the to-be-released resources are released, a user can normally jump to any one of the referenced resources in the process of browsing the to-be-released resources; in this case, the detecting device 202 may send a third prompt message to the CMS201, prompting that the publishing of the resource to be published will not generate a dead URL link.
After receiving the third prompt message, the CMS201 may prompt the user that the resource to be published may be published normally, may also publish the resource to be published directly, and prompt the user that the resource to be published has been published.
After the to-be-published resource is published, the CMS201 may send a publication message to the detecting apparatus 202, to notify that the detecting apparatus 202 that the to-be-published resource is published, and the detecting apparatus 202 may store the reference relationship between the to-be-published resource and the referenced resource, and may further record the state of the to-be-published resource as online.
Optionally, a mapping relationship between the URL link of the resource and a CMS path of the resource may be stored in the detection apparatus 202, where the CMS path of the resource is used to indicate a storage address of a file in the CMS201, such as an HTML file, a PDF, a Portable Network Graphics (PNG), and the like. Of course, the mapping relationship may also be stored in the CMS201, and the detecting device 202 may send a request message for acquiring the mapping relationship, and acquire the mapping relationship from the CMS 201.
As a possible implementation, the mapping relationship between the URL link of the resource and the CMS path of the resource may also be stored in a third-party database (not shown) accessible to both the detecting apparatus 202 and the CMS201, and both the detecting apparatus 202 and the CMS201 may obtain the mapping relationship from the database.
The detection apparatus 202 may obtain the CMS path of the resource to be published according to the URL link of the resource to be published; and obtaining the CMS path of the referenced resource according to the URL link of the referenced resource; recording the reference relationship between the CMS path of the resource to be published and the CMS path of the referenced resource, and recording the state of the resource to be published as the on-line state.
For example, the detecting device 202 may record a correspondence relationship between a CMS path of the resource to be published and a status of the resource to be published.
It should be noted that, the detecting apparatus 202 records, in a database, a reference relationship between the CMS path of the resource to be published and the CMS path of the referenced resource, and a state of the resource to be published; the reference relation and the state of the resource to be published can be conveniently checked subsequently.
In the embodiment of the present application, the amount of the referenced resources is not limited, and when the number of the referenced resources is greater than 1, the detection apparatus 202 needs to acquire the URL link of each referenced resource when acquiring the URL link of the referenced resource according to the first detection instruction; when recording the reference relationship between the resource to be published and the referenced resource, the CMS path of each referenced resource needs to be determined.
It should be noted that, if the type of the resource to be published is a document, the referenced resource corresponding to the document to be published may include a resource (such as a web page or a picture) included in the document to be published; that is, the web page in the document to be published may reference other resources in the document to be published. The detecting device 202 may ignore the status of the resource belonging to the document to be published in the referenced resource, and only determine whether any resource not belonging to the document to be published in the referenced resource is offline or will be offline at a future time, if any resource not belonging to the document to be published in the referenced resource is offline, the detecting device 202 may send a first prompt message to the CMS 201; if any of the referenced resources that do not belong to the document to be published will go offline at a future time, the detecting apparatus 202 may send a third prompting message to the CMS 201. If all the referenced resources belong to the document to be published, the detecting apparatus 202 may send a third prompt message to the CMS 201. The operations performed by the CMS201 after receiving the first prompting message, the second prompting message, or the third prompting message may refer to the foregoing description, and are not described herein again.
As will be understood from the foregoing description, the detection apparatus 202 will record that the status of the resource to be distributed is online after the resource to be distributed is distributed. Similarly, after the referenced resource is released, the detecting apparatus 202 may also record the state of the referenced resource as online.
For example, the detecting apparatus 202 may record the state of the resource, and may also record a corresponding relationship between a CMS path of the resource and the state of the resource (specifically, for example, may be recorded in a database); when the detecting device determines that a certain resource has been released (e.g., the CMS201 notifies the detecting device 202 that the resource has been released), the detecting device 202 may record the status of the resource as released; when the detecting device determines that a certain resource is offline (e.g., the CMS201 notifies the detecting device 202 that the resource is offline or not published after being published), the detecting device 202 may record the status of the resource as offline or offline in the future; for example, the detecting apparatus 202 may record the status of the unpublished resource as not published; the state of the published resources which are offline is not recorded, or the offline time of the published resources which are offline is recorded; a correspondence of the CMS path of the resource to the status of the resource may also be established.
It should be noted that, in the above embodiment, the referenced resource may be maintained by the CMS201 system, and in other embodiments of the present application, the referenced resource may also be maintained by other systems, and for the referenced resource maintained by other systems, the referenced resource belongs to a resource of an external network; if there is a resource belonging to the external network in the referenced resource, the detecting device 202 may determine the state of the resource belonging to the external network in the referenced resource through hypertext transfer protocol (HTTP) detection.
Illustratively, the detection device sends an http request to an external network according to a URL referencing a resource, receives an http response result fed back by the external network, and if the http response result is 404, it indicates that the resource is inaccessible, and issuing the resource to be issued may generate a dead link, and if the http response result is 200, it indicates that the resource is accessed normally, and the resource may not affect issuing the resource to be issued.
In the above embodiment, the detecting device provides the CMS with the dead-chain detection service, but in other embodiments of the present application, the detecting device may also be integrated into the CMS as shown in fig. 3, that is, the dead-chain detection is implemented in the CMS, which will be described in detail below.
Referring to fig. 5, fig. 5 is a flowchart illustrating a resource detection method according to another embodiment of the invention, where the method illustrated in fig. 5 includes:
step 501: the CMS301 receives a first detection instruction for a resource to be published triggered by a user.
Referring to fig. 6 in conjunction with fig. 6, fig. 6 is a schematic diagram of a user interface of the CMS301 according to an embodiment of the present application, as shown in fig. 6, a user may click on content check in a display interface of the CMS301, and the user triggers a first detection instruction for a resource to be published.
Step 502: the CMS301 obtains the URL link of the referenced resource referenced in the to-be-published resource according to the first detection instruction. The manner of the CMS301 acquiring the URL link of the referenced resource referenced in the to-be-published resource may refer to the manner of the detecting apparatus 202 acquiring the URL link of the referenced resource referenced in the to-be-published resource in the embodiment shown in fig. 4, and is not described herein again.
Step 503: the CMS301 determines the status of the referenced resource based on the URL link of the referenced resource, and generates the first prompt message when it is confirmed that the referenced resource is in the offline status.
The manner of the CMS301 determining the state of the referenced resource according to the URL link of the referenced resource may refer to the manner of the detecting apparatus 202 determining the state of the referenced resource according to the URL link of the referenced resource in the embodiment shown in fig. 4, and is not described herein again.
If the referenced resource is in the offline state, generating first prompt information; if the referenced resource comes off the line at the moment again, generating second prompt information; if the referenced resource is in an online state, generating third prompt information; the operations performed by the CMS301 after generating the first prompting message, the second prompting message, or the third prompting message may refer to the operations performed by the CMS301 after receiving the first prompting message, the second prompting message, or the third prompting message from the detecting apparatus in the foregoing description, and are not described herein again.
For example, when the first prompt message is generated, the CMS301 may display an interface as shown in fig. 7; when the third prompt is generated, the CMS301 may display an interface as shown in fig. 8.
Based on the backend server shown in fig. 2, referring to fig. 9, fig. 9 shows a resource detection method according to an embodiment of the present application, and as shown in fig. 9, the method includes:
step 901: the detection device 202 receives a second detection instruction triggered by the user and aiming at the resource to be offline.
Since the resource to be downloaded may be referred to by other resources, directly downloading the resource to be downloaded may cause that the resource referring to the resource to be downloaded (in the embodiment of the present application, the resource referring to the resource to be downloaded is simply referred to as a referred resource) cannot be browsed normally, and a jump to the resource to be downloaded cannot be made normally, which may generate a dead link.
Before the user needs to log off the resource to be logged off, the CMS201 may be triggered to send a second detection instruction for the resource to be logged off to the detection apparatus 202.
The second detection instruction may include an HTML file of the resource to be offline, a URL link of the resource to be offline, and other information indicating the resource to be offline.
Step 902: the detection device 202 acquires the URL link of the resource to be offline according to the second detection instruction.
Step 903: the detection means 202 determines the status of the referenced resource referring to the URL link of the web page to be downlinked.
Before the detecting device 202 determines the state of the resource to be referred to by the URL link of the web page to be downlinked, the detecting device 202 needs to determine the resource to be referred to, as can be seen from the embodiment shown in fig. 4, each time a resource is issued, the detecting device may record the reference relationship between the resource and the resource (referred resource) referred to by the web page, and may also record the state of the resource, and establish the corresponding relationship between the CMS201 link of the resource and the state of the resource; the detection device 202 may also record the offline status of the resource; that is to say, when the referenced resource is published, the detecting device 202 records the corresponding relationship between the CMS path of the referenced resource and the state of the referenced resource, records the state of the referenced resource as online, and establishes the corresponding relationship between the CMS path of the referenced resource and the state of the referenced resource. Accordingly, when the referenced resource is released or not released, the detecting device 202 may also record the status of the referenced resource as being released.
For example, the detecting device 202 may record a reference relationship between the CMS path of the resource to be offline and the CMS path of the referenced resource before receiving the second detection instruction for the resource to be offline triggered by the user;
the number of the referenced resources is not limited in the embodiments of the present application, and the referenced resources may be one or more.
When determining the state of the resource referenced by the URL link referencing the to-be-offline webpage, the detection device 202 may obtain, according to the URL link of the to-be-offline resource, the CMS201 path of the to-be-offline resource based on the mapping relationship between the URL link of the resource and the CMS path of the resource. The mapping relationship between the URL link of the resource and the CMS path of the resource may be locally stored by the detection apparatus 202, acquired by the detection apparatus 202 from the CMS, or stored in a database so that the detection apparatus 202 can acquire the mapping relationship. The detecting device 202 then obtains the CMS path referring to the resource from the reference relationship according to the CMS path of the resource to be downlinked; and searching the state of the reference resource from the corresponding relation between the CMS path of the reference resource and the state of the reference resource.
Step 904: the detecting device 202 generates fourth prompting information when it is determined that the referenced resource is in the online state, where the fourth prompting information is used to prompt that the offline resource to be offline generates a failed URL link.
If any resource in the referenced resources is on-line, it is indicated that the user views any resource in the referenced resources and views the content in the resource after the resource to be off-line is off-line; in the process of browsing the resource, the resource to be offline cannot be jumped to, so that a dead link is caused. To avoid this, the detecting device 202 sends a fourth prompting message to the CMS201, notifying that the resource to be offline will generate a failed URL link if the resource is offline.
The CMS201, after receiving the fourth prompting message, may prompt the user that there is a dead link if the offline resource is offline; the fourth prompting message may also be displayed directly. And under the condition that the referenced resource is confirmed to be offline at a future time, generating fifth prompt information, wherein the fifth prompt information is used for prompting that the offline resource to be offline is generated to be a dead URL link when arriving at the future time.
If any one of the referenced resources will go offline at a later time, illustratively, any one of the referenced resources is in a published state at present, but the offline time is marked, and the offline time is a certain future time, which indicates that any one of the referenced resources will go offline at a later time indicated by the offline time; if the resource to be offline is offline before any resource in the referenced resources, in a time period from the offline of the resource to the offline of any resource in the referenced resources, the user cannot normally jump to the resource to be offline when browsing any resource in the referenced resources, and a dead link also exists. For example, to avoid this situation, the detecting device 202 sends a fifth prompt message to the CMS201, and notifies that the resource to be downlinked will generate the failed URL link, and the time for generating the failed URL link is before a future time, that is, before the downline time of any resource in the referenced resources, the failed URL link will be generated.
After receiving the fifth prompting message, the CMS201 may prompt the user that a dead link exists in the offline resource if the offline resource is offline, and may also prompt a time for generating a failed URL link; the fifth prompting message can also be directly displayed.
It should be noted that, the CMS201 may send the second detection instruction to the detection device when the resource to be offline needs to be offline, and if any resource in the referenced resource will be offline at a future time, the detection device may send a fifth prompt message to the CMS 201. The CMS201 may also detect in advance whether there is a dead link in the resource to be offline at a future time (for convenience of description, the first time is used instead), and if any resource in the referenced resource is also offline at another future time (for convenience of description, the second time is used instead); if the second time is prior to the first time, namely any resource in the referenced resources is offline before the resource to be offline, the offline of the resource to be offline does not influence any resource in the referenced resources, and wireless link is not generated; if the second time is later than the first time, that is, any resource in the referenced resources is offline after the resource to be offline is offline, the offline of the resource to be offline affects any resource in the referenced resources, and in a time period from the offline of the resource to the offline of any resource in the referenced resources, a user cannot normally jump to the resource to be offline when browsing any resource in the referenced resources, so that a wireless link is generated; the detecting means 202 may send a fifth prompting message to the CMS 201.
And generating sixth prompt information under the condition that the referenced resource is confirmed to be in the offline state, wherein the sixth prompt information is used for prompting that the offline resource to be issued does not generate a dead URL link.
If all the resources in the referenced resources are all offline, it is indicated that the user does not browse any resource in the referenced resources and a dead link does not exist after the resources to be offline are offline. In this case, the detecting device 202 sends a sixth prompting message to the CMS201, which prompts that the offline resource will not generate a failed URL link.
After receiving the sixth prompting message, the CMS201 may prompt the user that the resource to be offline may be normally offline, or may directly offline the resource to be offline, and prompt the user that the resource to be offline is offline.
After the resource to be offline is offline, the CMS201 may send an offline message to the detection device 202, and notify that the resource to be offline has been offline to the detection device 202, and the detection device 202 may delete the stored reference relationship between the resource to be offline and the resource referenced by the resource to be offline, and may also record the state of the resource to be offline as offline, or delete and record the state of the resource to be offline.
It should be noted that, if the type of the to-be-offline resource is a document, the reference resource corresponding to the to-be-offline document may include a resource (such as a web page or a picture) included in the to-be-offline document; that is, a web page in the document to be offline may reference other resources in the document to be published. The detecting device 202 may ignore the device of the resource belonging to the document to be published in the referenced resource, and only determine whether any resource not belonging to the document to be downloaded in the referenced resource is on-line or will be off-line at a future time, if any resource not belonging to the document to be published in the referenced resource is on-line, the detecting device 202 may send a fourth prompting message to the CMS 201; if any resource in the referenced resource that does not belong to the document to be published will go offline at a future time, the detecting apparatus 202 may send a fifth prompting message to the CMS 201. If all the referenced resources belong to the document to be published, the detecting apparatus 202 may send a sixth prompt message to the CMS 201. The operations performed by the CMS201 after receiving the first prompting message, the second prompting message, or the third prompting message may refer to the foregoing description, and are not described herein again.
In the above embodiment, the detecting device provides the CMS with the dead-chain detection service, but in other embodiments of the present application, the detecting device may also be integrated into the CMS as shown in fig. 3, that is, the dead-chain detection is implemented in the CMS, which will be described in detail below.
Referring to fig. 10, fig. 10 is a flowchart illustrating a resource detection method according to another embodiment of the invention, where the method illustrated in fig. 10 includes:
step 1001: the CMS301 receives a second detection instruction for the resource to be offline triggered by the user.
For example, fig. 11 is a display interface of the CMS301 according to the embodiment of the application, as shown in fig. 11, a user may click on content check in the display interface in the CMS, and a second detection instruction for a resource to be offline is triggered by the user.
Step 1002: the CMS301 obtains the URL link of the resource to be offline according to the second detection instruction.
The manner for the CMS301 to obtain the URL link of the resource to be offline according to the second detection instruction may refer to the manner for the detection apparatus 202 to obtain the URL link of the resource to be offline according to the second detection instruction in the embodiment shown in fig. 9, which is not described herein again.
Step 1003: the CMS301 determines a state of a resource referenced by the URL link referencing the to-be-offline webpage, and generates fourth prompting information for prompting that the to-be-offline resource generates a failed URL link when it is determined that the referenced resource is in an online state.
For the way for the CMS301 to determine the state of the resource referencing the URL link of the to-be-downlinked webpage according to the embodiment shown in fig. 9, the detection apparatus 202 may determine the state of the resource referencing the URL link of the to-be-downlinked webpage, and details thereof are not repeated here.
If any resource in the referenced resources is in an on-line state, generating fourth prompt information; if any one of the referenced resources is offline at a future moment, generating fifth prompt information; if the referenced resources are all in the offline state, generating sixth prompt information; the operations performed by the CMS301 after generating the fourth prompting message, the fifth prompting message, or the sixth prompting message may refer to the operations performed by the CMS301 after receiving the fourth prompting message, the fifth prompting message, or the sixth prompting message from the detecting apparatus in the foregoing description, and are not described herein again.
As a possible implementation manner, when the type of the resource to be published is a document, the document to be published can replace a published document after being published, and one or more resources can be newly added compared with the published document, and in essence, the newly added one or more resources need to be published; one or more resources may also be reduced, essentially one or more resources that require a downline reduction. For example, the document to be published includes a web page 1, a web page 2, a web page 5 and a web page 6, the document to be published includes a web page 1, a web page 2, a web page 3 and a web page 4, and compared with the published document, the document to be published increases the web page 4 and the web page 5 and reduces the web page 3. When a document to be published is published, one or more newly added resources form a first resource to be published, and optionally, the first resource to be published may also include the same resource in the document to be published and the published document; the reduced one or more resources constitute the first to-be-offline resource. The embodiment shown in fig. 4 or 5 may be adopted for the first resource to be published to perform resource detection, and the embodiment shown in fig. 9 or 10 may be adopted for the first resource to be offline to perform resource detection.
Based on the same inventive concept as the method embodiment, an embodiment of the present application further provides a detection apparatus, which is used to execute the method executed by the detection device in the method embodiment shown in fig. 4, and related features may refer to the method embodiment described above, which is not described herein again, and it is to be noted that when the apparatus is applied to the backend server shown in fig. 3, the apparatus may also be used to execute the method executed by the CMS in the method embodiment shown in fig. 5.
As shown in fig. 12, the apparatus 1200 includes a receiving unit 1201, an acquiring unit 1202, a judging unit 1203, and an information generating unit 1204:
a receiving unit 1201, configured to receive a first detection instruction, triggered by a user, for a resource to be issued.
An obtaining unit 1202, configured to obtain, according to the first detection instruction, a URL link of a referenced resource referenced in the resource to be issued.
A determining unit 1203, configured to determine a state of the referenced resource according to the URL link of the referenced resource.
The information generating unit 1204 is configured to determine a state of the referenced resource according to the URL link of the referenced resource, and generate first prompt information when the referenced resource is determined to be in an offline state, where the first prompt information is used to prompt that issuing the resource to be issued may generate a failed URL link.
Optionally, the information generating unit 1204 may generate second prompt information in a case that the referenced resource is confirmed to be offline at a future time, where the second prompt information is used to prompt that the published resource to be published generates a failed URL link when arriving at the future time.
Optionally, the information generating unit 1204 is further configured to generate third prompt information when it is determined that the referenced resource is in an online state, where the third prompt information is used to prompt that issuing the resource to be issued does not generate a failed URL link.
Optionally, after the resource to be published is published, the obtaining unit 1202 may obtain, according to the URL link of the resource to be published, a CMS path of the content management system of the resource to be published; and obtaining the CMS path of the referenced resource according to the URL link of the referenced resource.
The apparatus further includes a recording unit 1205, where the recording unit 1205 may record a reference relationship between the CMS path of the resource to be published and the CMS path of the referenced resource, and record that the state of the resource to be published is an online state. And recording the corresponding relation between the CMS path of the resource to be published and the state of the resource to be published, wherein the state of the resource to be published is recorded as the on-line state.
Optionally, the recording unit 1205 may record the correspondence between the CMS path of the referenced resource and the state of the referenced resource before the receiving unit 1201 receives the first detection instruction for the resource to be issued, where the first detection instruction is triggered by the user.
Optionally, when determining the state of the referenced resource according to the URL link of the referenced resource, the determining unit 1203 may obtain the CMS path of the referenced resource according to the URL link of the referenced resource; the state of the referenced resource corresponding to the CMS path of the referenced resource is looked up from the correspondence.
Optionally, the type of the resource to be published is one of a network element and a document, and the type of the referenced resource is one of a network element and a document, where the document includes a plurality of web pages.
Based on the same inventive concept as the method embodiment, an embodiment of the present application further provides a detection apparatus, which is configured to execute the method performed by the detection device in the method embodiment shown in fig. 7, and related features may refer to the method embodiment described above, which are not described herein again, and it needs to be described that when the apparatus is applied to the backend server shown in fig. 3, the apparatus may also be used to execute the method performed by the CMS in the method embodiment shown in fig. 10.
As shown in fig. 13, the apparatus 1300 includes a receiving unit 1301, an obtaining unit 1302, a determining unit 1303, and an information generating unit 1304:
a receiving unit 1301, configured to receive a second detection instruction, triggered by the user, for the resource to be offline;
an obtaining unit 1302, configured to obtain a uniform resource locator URL link of a resource to be offline according to a second detection instruction;
a judging unit 1303, configured to judge a state of a reference resource that refers to a URL link of the to-be-offline webpage;
and an information generating unit 1304, configured to generate fourth prompting information in a case that the referenced resource is confirmed to be in an online state, where the fourth prompting information is used to prompt that the offline resource to be offline generates a failed URL link.
Optionally, the information generating unit 1304 may generate fifth prompting information in a case where it is confirmed that the referenced resource is offline at a future time, where the fifth prompting information is used to prompt that the offline resource to be offline will generate a failed URL link when the offline resource arrives at the future time.
Optionally, the information generating unit 1304 may generate sixth prompting information when it is determined that the referenced resource is in the offline state, where the sixth prompting information is used to prompt that the offline to-be-published resource does not generate a failed URL link.
Optionally, the apparatus further includes a recording unit 13051005, where the recording unit 1305 may record the reference relationship between the CMS path of the resource to be downlinked and the CMS path of the referenced resource before the receiving unit 1301 receives the second detection instruction for the resource to be downlinked, where the second detection instruction is triggered by the user; recording the corresponding relation between the CMS path of the referenced resource and the state of the referenced resource;
when the judging unit 1303 judges the state of the resource quoted by referring to the URL link of the to-be-offline webpage, the judging unit may obtain the CMS path of the to-be-offline resource according to the URL link of the to-be-offline resource; acquiring a CMS path for quoting the resources from the quoting relationship according to the CMS path of the resources to be offline; and searching the state of the reference resource corresponding to the CMS path of the reference resource from the corresponding relation.
Optionally, the type of the resource to be published is one of a web page and a document, and the type of the referenced resource is one or both of a web page and a document.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above-described embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded or executed on a computer, cause the flow or functions according to embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more collections of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a Solid State Drive (SSD).
In a simple embodiment, one skilled in the art can appreciate that the detection device in the embodiment shown in fig. 4 and 9 or the CMS in the embodiment shown in fig. 5 and 10 can be in the form shown in fig. 14.
The apparatus 1400 shown in fig. 14 comprises at least one processor 1401, a memory 1402, and optionally a communication interface 1403.
Memory 1402 may be a volatile memory, such as a random access memory; the memory may also be a non-volatile memory such as, but not limited to, a read-only memory, a flash memory, a Hard Disk Drive (HDD) or solid-state drive (SSD), or the memory 1402 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Memory 1402 may be a combination of the above.
Memory 1402 may be a volatile memory, such as a random access memory; the memory may also be a non-volatile memory such as, but not limited to, a read-only memory, a flash memory, a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Memory 1402 may be a combination of the above.
The embodiment of the present application does not limit the specific connection medium between the processor 1401 and the memory 1402.
The processor 1401 may be a CPU, and the processor 1401 may be other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, an artificial intelligence chip, a chip on a chip, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. The device has a data transceiving function, and can communicate with other devices, and in the apparatus as shown in fig. 12, a separate data transceiving module, such as a communication interface 1403, may also be provided for transceiving data; the processor 1201 may perform data transmission through the communication interface 1403, such as from receiving the first detection instruction or the second detection instruction, when communicating with other devices.
When the detection apparatus takes the form shown in fig. 14, the processor 1401 in fig. 14 may execute the instructions by calling a computer stored in the memory 1402, so that the detection apparatus may execute the method performed by the detection apparatus in any of the above-described method embodiments.
Specifically, the functions/implementation processes of the receiving unit, the obtaining unit, the judging unit, the information generating unit, and the recording unit in fig. 12 may be implemented by the processor 1401 in fig. 14 calling a computer execution instruction stored in the memory 1402. Alternatively, the functions/implementation procedures of the acquisition unit, the judgment unit, the information generation unit, and the recording unit in fig. 12 may be implemented by the processor 1401 in fig. 14 calling a computer-executable instruction stored in the memory 1402, and the functions/implementation procedures of the reception unit in fig. 12 may be implemented by the communication interface 1403 in fig. 14.
Specifically, the functions/implementation processes of the receiving unit, the obtaining unit, the judging unit, the information generating unit, and the recording unit in fig. 13 can be implemented by the processor 1401 in fig. 14 calling a computer execution instruction stored in the memory 1402. Alternatively, the functions/implementation procedures of the acquisition unit, the judgment unit, the information generation unit, and the recording unit in fig. 13 may be realized by the processor 1401 in fig. 14 calling a computer-executable instruction stored in the memory 1402, and the functions/implementation procedures of the reception unit in fig. 13 may be realized by the communication interface 1403 in fig. 14.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (24)

1. A method for resource detection, comprising:
receiving a first detection instruction which is triggered by a user and aims at a resource to be issued;
acquiring a Uniform Resource Locator (URL) link of a referenced resource referenced in the to-be-issued resource according to the first detection instruction;
judging the state of the referenced resource according to the URL link of the referenced resource, and generating first prompt information under the condition that the referenced resource is confirmed to be in an offline state, wherein the first prompt information is used for prompting that a failure URL link can be generated when the referenced resource is issued;
wherein the method further comprises:
after the resource to be published is published:
acquiring a CMS path of a content management system of the resource to be published according to the URL link of the resource to be published;
obtaining a CMS path of the referenced resource according to the URL link of the referenced resource;
recording a reference relationship between the CMS path of the resource to be published and the CMS path of the referenced resource, and recording a corresponding relationship between the CMS path of the resource to be published and the state of the resource to be published, wherein the state of the resource to be published is recorded as an online state.
2. The method of claim 1, further comprising:
and under the condition that the referenced resource is determined to be offline at a future time, generating second prompt information, wherein the second prompt information is used for prompting that the published resource to be published generates a failure URL link when the future time arrives.
3. The method of claim 1, further comprising:
and under the condition that the referenced resource is confirmed to be in an online state, generating third prompt information, wherein the third prompt information is used for prompting that invalid URL links cannot be generated when the referenced resource is issued.
4. The method according to any one of claims 1 to 3,
before the receiving a first detection instruction for a resource to be issued, which is triggered by a user, the method further includes:
recording the corresponding relation between the CMS path of the referenced resource and the state of the referenced resource;
the judging the state of the referred resource according to the URL link of the referred resource comprises the following steps:
acquiring a CMS path of the referenced resource according to the URL link of the referenced resource;
looking up the state of the referenced resource corresponding to the CMS path of the referenced resource from the correspondence.
5. The method according to any one of claims 1 to 3, wherein the types of the resources to be published comprise web pages and documents, and the types of the referenced resources comprise web pages and documents.
6. The method of claim 4, wherein the types of resources to be published comprise web pages and documents, and the types of referenced resources comprise web pages and documents.
7. A method for detecting resources, comprising:
receiving a second detection instruction which is triggered by a user and aims at the resource to be offline;
acquiring a Uniform Resource Locator (URL) link of the resource to be offline according to the second detection instruction;
judging the state of a quoted resource of the URL link which quotes the resource to be offline, and generating fourth prompt information under the condition that any resource in the quoted resource is confirmed to be in an online state, wherein the fourth prompt information is used for prompting that the resource to be offline is offline to generate a failed URL link;
wherein the content of the first and second substances,
before the receiving a second detection instruction for the resource to be offline triggered by the user, the method further includes:
recording the reference relation between the CMS path of the resource to be offline and the CMS path of the referenced resource;
recording the corresponding relation between the CMS path of the reference resource and the state of the reference resource;
the judging the state of the quoted resource of the URL link which quotes the resource to be offline comprises the following steps:
acquiring a CMS path of the resource to be offline according to the URL link of the resource to be offline;
acquiring the CMS path of the referenced resource from the reference relation according to the CMS path of the resource to be offline;
and searching the corresponding relation for the state of the reference resource corresponding to the CMS path of the reference resource.
8. The method of claim 7, further comprising:
and under the condition that any one of the referenced resources is determined to be offline at a future time, generating fifth prompt information, wherein the fifth prompt information is used for prompting that the offline resource to be offline will generate a failure URL link when the future time arrives.
9. The method of claim 7, further comprising:
and generating sixth prompt information under the condition that all the resources in the referenced resources are confirmed to be in the offline state, wherein the sixth prompt information is used for prompting that the offline resources to be offline do not generate invalid URL links.
10. The method according to any one of claims 7 to 9, wherein the types of the resources to be downloaded comprise web pages and documents, and the types of the referenced resources comprise web pages and documents.
11. An apparatus, comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a first detection instruction which is triggered by a user and aims at a resource to be issued;
the acquisition unit is used for acquiring a Uniform Resource Locator (URL) link of a referred resource referred in the to-be-issued resource according to the first detection instruction;
the judging unit is used for judging the state of the referred resource according to the URL link of the referred resource;
the information generating unit is used for generating first prompt information under the condition that the referenced resource is confirmed to be in the offline state, wherein the first prompt information is used for prompting that the invalid URL link can be generated when the referenced resource is issued;
wherein, after the resource to be published is published, the obtaining unit is further configured to:
acquiring a content management system CMS path of the resource to be published according to the URL link of the resource to be published;
acquiring a CMS path of the referenced resource according to the URL link of the referenced resource;
the device further includes a recording unit, where the recording unit is configured to record a reference relationship between the CMS path of the resource to be published and the CMS path of the referenced resource, record that the state of the resource to be published is an online state, and record a corresponding relationship between the CMS path of the resource to be published and the state of the resource to be published, where the state of the resource to be published is an online state.
12. The apparatus of claim 11, wherein the information generating unit is further configured to:
and under the condition that the referenced resource is determined to be offline at a future time, generating second prompt information, wherein the second prompt information is used for prompting that the published resource to be published generates a failure URL link when the future time arrives.
13. The apparatus of claim 11, wherein the information generating unit is further configured to:
and generating third prompt information under the condition that the referenced resource is confirmed to be in an on-line state, wherein the third prompt information is used for prompting that the to-be-issued resource is issued without generating a dead URL link.
14. The apparatus according to any one of claims 11 to 13, wherein the recording unit, before the receiving unit receives a first detection instruction for the resource to be issued, triggered by a user, is further configured to:
recording the corresponding relation between the CMS path of the referenced resource and the state of the referenced resource;
the judging unit is used for judging the state of the referred resource according to the URL link of the referred resource, and is specifically used for:
acquiring a CMS path of the referenced resource according to the URL link of the referenced resource;
and searching the corresponding relation for the state of the referenced resource corresponding to the CMS path of the referenced resource.
15. The apparatus according to any of claims 11 to 13, wherein the type of the resource to be published is one of a network element and a document, and the type of the referenced resource is one or both of a network element and a document, wherein the document comprises a plurality of web pages.
16. The apparatus of claim 14, wherein the type of the resource to be published is one of a network element and a document, and wherein the type of the referenced resource is one or both of a network element and a document, and wherein the document comprises a plurality of web pages.
17. An apparatus, comprising:
the receiving unit is used for receiving a second detection instruction which is triggered by a user and aims at the resource to be offline;
the acquisition unit is used for acquiring a Uniform Resource Locator (URL) link of the resource to be offline according to the second detection instruction;
the judging unit is used for judging the state of the quoted resource of the URL link which quotes the resource to be offline;
the information generating unit is used for generating fourth prompt information under the condition that any resource in the quoted resources is confirmed to be in an on-line state, and the fourth prompt information is used for prompting that the off-line resource to be off-line generates a failure URL link;
before the receiving unit receives a second detection instruction, triggered by the user, for the resource to be offline, the recording unit is further configured to:
recording the reference relation between the CMS path of the resource to be offline and the CMS path of the referenced resource;
recording the corresponding relation between the CMS path of the reference resource and the state of the reference resource;
the determining unit is specifically configured to, when determining the state of the referenced resource referring to the URL link of the resource to be downlinked,:
acquiring a CMS path of the resource to be offline according to the URL link of the resource to be offline;
acquiring the CMS path of the referenced resource from the reference relation according to the CMS path of the resource to be offline;
and searching the corresponding relation for the state of the reference resource corresponding to the CMS path of the reference resource.
18. The apparatus of claim 17, wherein the information generating unit is further configured to:
and under the condition that any one of the quoted resources is determined to be offline at a future time, generating fifth prompt information, wherein the fifth prompt information is used for prompting that the offline resource to be offline can generate a failure URL link when the future time arrives.
19. The apparatus of claim 17, wherein the information generating unit is further configured to:
and generating sixth prompt information under the condition that all the resources in the referenced resources are confirmed to be in the offline state, wherein the sixth prompt information is used for prompting that the offline resources to be offline do not generate invalid URL links.
20. The apparatus of any of claims 17 to 19, wherein the type of the resource to be downlinked is one of a web page and a document, and the type of the referenced resource is one of a web page and a document.
21. An apparatus comprising a memory and a processor; the memory stores program instructions that are executed by the processor to perform the method of any of claims 1-6.
22. An apparatus comprising a memory and a processor; the memory stores program instructions that are executed by the processor to perform the method of any of claims 7 to 10.
23. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to carry out the method of any one of claims 1 to 6.
24. A computer-readable storage medium having stored thereon instructions which, when run on a computer, cause the computer to perform the method of any one of claims 7 to 10.
CN201910461625.0A 2019-05-30 2019-05-30 Resource detection method and device Active CN110347955B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910461625.0A CN110347955B (en) 2019-05-30 2019-05-30 Resource detection method and device
PCT/CN2020/088786 WO2020238567A1 (en) 2019-05-30 2020-05-06 Method and apparatus for resource detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910461625.0A CN110347955B (en) 2019-05-30 2019-05-30 Resource detection method and device

Publications (2)

Publication Number Publication Date
CN110347955A CN110347955A (en) 2019-10-18
CN110347955B true CN110347955B (en) 2023-03-03

Family

ID=68174400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910461625.0A Active CN110347955B (en) 2019-05-30 2019-05-30 Resource detection method and device

Country Status (2)

Country Link
CN (1) CN110347955B (en)
WO (1) WO2020238567A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347955B (en) * 2019-05-30 2023-03-03 华为云计算技术有限公司 Resource detection method and device
US11196635B1 (en) * 2020-10-06 2021-12-07 Cyberpion Ltd Connection detection and prevention of dangling connections
CN113343030A (en) * 2021-07-07 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Data processing method and device, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530297A (en) * 2012-07-05 2014-01-22 北京百度网讯科技有限公司 Method and device capable of automatically carrying out website analysis
CN106407462A (en) * 2016-10-10 2017-02-15 北京恒华伟业科技股份有限公司 File processing method and system
CN107943811A (en) * 2016-12-22 2018-04-20 腾讯科技(北京)有限公司 The dissemination method and device of content
CN108304402A (en) * 2017-01-12 2018-07-20 广州市动景计算机科技有限公司 Exterior chain availability monitor method and monitoring device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739663A (en) * 2012-06-18 2012-10-17 奇智软件(北京)有限公司 Detection method and scanning engine of web pages
US9111110B2 (en) * 2013-02-09 2015-08-18 Dropbox, Inc. Retroactive shared content item links
US10467924B2 (en) * 2013-09-20 2019-11-05 Western Michigan University Research Foundation Behavioral intelligence framework, content management system, and tool for constructing same
CN103544308A (en) * 2013-11-04 2014-01-29 北京中搜网络技术股份有限公司 Verification method of information entry
CN104317938B (en) * 2014-10-31 2018-02-02 北京国双科技有限公司 Web page interlinkage validation verification method and device
CN105893534A (en) * 2016-03-31 2016-08-24 乐视控股(北京)有限公司 Media file deleting method and device
CN110347955B (en) * 2019-05-30 2023-03-03 华为云计算技术有限公司 Resource detection method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530297A (en) * 2012-07-05 2014-01-22 北京百度网讯科技有限公司 Method and device capable of automatically carrying out website analysis
CN106407462A (en) * 2016-10-10 2017-02-15 北京恒华伟业科技股份有限公司 File processing method and system
CN107943811A (en) * 2016-12-22 2018-04-20 腾讯科技(北京)有限公司 The dissemination method and device of content
CN108304402A (en) * 2017-01-12 2018-07-20 广州市动景计算机科技有限公司 Exterior chain availability monitor method and monitoring device

Also Published As

Publication number Publication date
WO2020238567A1 (en) 2020-12-03
CN110347955A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
US9628349B2 (en) Interactivity analyses of web resources based on reload events
US9888089B2 (en) Client side cache management
US10284446B2 (en) Optimizing content management
CN112073405B (en) Webpage data loading method and device, computer equipment and storage medium
JP4698756B2 (en) Offline execution of web-based applications
CN110347955B (en) Resource detection method and device
CN107181779B (en) Method, device and system for processing access request
EP2985705A2 (en) Webpage access method and apparatus, and router
US20080270412A1 (en) Tracking user clicks using ajax based beacons
KR102504075B1 (en) Matching and attributes of user device events
CN104754073A (en) Resource access method and device
CN105472035A (en) File transmission method and device
CN104735112A (en) Resource file sending method and resource file caching method and device
WO2014166265A1 (en) Method, terminal, cache server and system for updating webpage data
CN108804515B (en) Webpage loading method, webpage loading system and server
CN107135249B (en) Data downloading method and device
CN103347092A (en) Method and device for recognizing cacheable file
US20140310372A1 (en) Method, terminal, cache server and system for updating webpage data
CN111046310A (en) Page processing method, device, server and computer readable storage medium
CN105743945A (en) Method and system for downloading files on the basis of switching download sources
CN102567339A (en) Method, device and system for acquiring start page
CN105302801A (en) Resource caching method and apparatus
CN104219230A (en) Method and device for identifying malicious websites
EP3528474B1 (en) Webpage advertisement anti-shielding methods and content distribution network
CN108664493B (en) Method and device for counting validity of URL (Uniform resource locator), electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220216

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Applicant after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant