WO2020238567A1 - 一种资源检测方法及装置 - Google Patents
一种资源检测方法及装置 Download PDFInfo
- Publication number
- WO2020238567A1 WO2020238567A1 PCT/CN2020/088786 CN2020088786W WO2020238567A1 WO 2020238567 A1 WO2020238567 A1 WO 2020238567A1 CN 2020088786 W CN2020088786 W CN 2020088786W WO 2020238567 A1 WO2020238567 A1 WO 2020238567A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- resource
- offline
- referenced
- cms
- published
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1441—Countermeasures against malicious traffic
- H04L63/1466—Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1441—Countermeasures against malicious traffic
- H04L63/1483—Countermeasures against malicious traffic service impersonation, e.g. phishing, pharming or web spoofing
Definitions
- This application relates to the field of communication technology, and in particular to a resource detection method and device.
- the method of detecting dead links mainly relies on user feedback. If users find dead links while browsing the web, they are reported to the website maintainer for repair. In this way, depending on user feedback, the detection of dead links is not timely, the efficiency is low, and the user experience is also affected.
- This application provides a resource detection method and device for automatically detecting dead links in web pages or documents.
- the embodiments of the present application provide a resource detection method, which can be executed by a detection device or by a CMS.
- the detection device is taken as an example for illustration.
- the method includes: when the CMS is triggered by a user When it is confirmed that the resource to be released needs to be released, a first detection instruction for the resource to be released may be sent to the detection device, and the detection device receives the first detection instruction, and the first detection instruction may carry relevant information of the resource to be released. , Can carry the URL link of the resource to be published; the detection device can obtain the URL link of the resource referenced in the resource to be published according to the first detection instruction.
- the resource referenced in the resource to be published can be called Reference resources; later, the detection device can determine the status of the referenced resource based on the URL link of the referenced resource. If the referenced resource is offline, it means that publishing the resource to be published will cause the resource to be published to fail to jump normally, and the detection device can When the first prompt information is generated, the first prompt information can also be sent to the CMS, where the first prompt information is used to prompt that the release of the resource to be published will generate an invalid URL link.
- the possible dead links of the resources to be released can be detected in advance.
- the release of resources can be prevented in time, which can effectively reduce the dead links of published web pages or documents.
- the probability can also improve user experience.
- the detection device can generate a second prompt message, and can also send the second prompt message to the CMS, where the second prompt information is used to prompt that the resource to be published will become invalid when it arrives in the future. URL link.
- detecting resources with preset offline moments in the referenced resources can prevent the resources to be published from generating invalid URL links after publishing.
- the referenced resource is online, that is to say, the referenced resource can always be viewed, and the resource to be published can jump normally after publishing, there is no dead link, and the detection device can generate a third prompt Information
- the third prompt information can also be sent to the CMS, where the third prompt information is used to prompt that publishing resources to be published will not generate invalid URL links.
- the detection device can save the reference relationship between the resource to be released and the referenced resource, and the status information of the resource to be released.
- the detection device can obtain the CMS path of the resource to be published according to the URL link of the resource to be published; and obtain the CMS path of the referenced resource according to the URL link of the resource to be published; record the CMS path of the resource to be published and the referenced resource
- the reference relationship of the CMS path recording the status of the resource to be released as the online status.
- the corresponding relationship between the CMS path of the resource to be published and the state of the resource to be published is recorded, and the state of the resource to be published is recorded as an online state.
- the detection device can save the reference relationship between the published resource and the resource referenced by the resource, as well as the status information of the resource, and can subsequently view the resource status and the reference relationship between the resources.
- the detection device may record the reference relationship between the referenced resource and the resource referenced by the referenced resource after the referenced resource is released.
- 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 where the referenced resource is released, and can also be in other scenarios, such as the referenced resource goes offline.
- the embodiments of this application do not Not limited.
- the detection device when the detection device records the status of the referenced resource, it may record the correspondence between the CMS path of the referenced resource and the status of the referenced resource.
- the detection device judges the status of the referenced resource according to the URL link of the referenced resource, it can obtain the CMS path of the referenced resource according to the URL link of the referenced resource; then, from the correspondence relationship, find the CMS path corresponding to the referenced resource The status of the referenced resource.
- the detection device can record the status of the referenced resource in advance, so that the status of the referenced resource can be easily determined based on the stored information before the release of the resource to be released, and then the status of the resource to be released can be efficiently determined after the release. Whether to generate invalid URL links.
- the type of the resource to be published is one of the network element and the document; that is, the resource to be published can be a single webpage or a document with multiple webpages; and the referenced resource
- the type is one or both of the network element and the document, that is, the resource to be published can refer to a single web page or a document.
- the resource detection method provided by this application is applicable to both the scenario of single webpage publishing and the scenario of document publishing, which can effectively expand the scope of application.
- the embodiments of the present application provide a resource detection method, which can be executed by a detection device or by CMS.
- the detection device is taken as an example for illustration.
- the method includes: when the CMS is triggered by the user to confirm the need
- a second detection instruction for the resource to be offline may be sent to the detection device, and the detection device receives the second detection instruction, and the second detection instruction may carry information about the resource to be offline.
- the detection device can carry the 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 determine the resource that references the URL link of the web page to be offline (referenced in the embodiment of this application)
- the resources in the resources to be offline can be referred to as reference resources). If the reference resources are in the online state, it means that the resources to be offline will cause the reference resources to fail to jump to the resources to be offline, and the detection device can generate Four prompt information.
- the fourth prompt information can also be sent to the CMS. The fourth prompt information is used to prompt that resources to be offline will cause invalid URL links.
- the possible dead links of the resources to be offline can be detected in advance. If there are dead links, the resources can be prevented from going offline in time, which can effectively reduce the generation of offline web pages or documents. The probability of invalid URL links can also effectively improve user experience.
- the detection device can generate the fifth prompt message, and can also send the fifth prompt message to the CMS, where the fifth prompt message is used to prompt the offline to be offline When resources arrive in the future, invalid URL links will be generated.
- detecting resources with preset offline moments in the referenced resources can prevent the resources to be offline from generating invalid URL links after they go offline.
- the detection device can generate the sixth prompt message
- the sixth prompt information can also be sent to the CMS, where the sixth prompt information is used to prompt that the resource to be released offline will not generate an invalid URL link.
- the detection device may record the referenced resource and the resource referenced by the referenced resource (such as the resource to be offline) after the referenced resource is released.
- the status of the referenced resource can also be recorded; the scenario in which the detection device records the status of the referenced resource is not limited to the scenario where the referenced resource is released, and can also be in other scenarios, which is not limited in the embodiment of the present application.
- the detection device when the detection device records the status of the referenced resource, it can record the reference relationship between the CMS path of the resource to be offline and the CMS path of the referenced resource; and record the correspondence relationship between the CMS path of the referenced resource and the status of the referenced resource.
- the detection device judges the status of the reference resource that refers to the URL link of the webpage to be offline, it can obtain the CMS path of the resource to be offline according to the URL link of the resource to be offline; then, according to the CMS path of the resource to be offline from the reference relationship Obtain the CMS path of the referenced resource; and find the status of the referenced resource corresponding to the CMS path of the referenced resource from the corresponding relationship.
- the detection device can record the status of the referenced resource in advance, so that the status of the referenced resource can be easily determined based on the stored information before the resource to be offline goes offline, and then it can be efficiently determined that the resource to be offline is offline Whether there will be invalid URL links afterwards. .
- the type of resource to be published is one of a webpage and a document
- the resource to be offline can be a single webpage or a document
- the type of resource to be cited is one of a webpage and a document or Both.
- the resource detection method provided by this application is applicable to both the offline scenario of a single webpage and the offline scenario of the document, which can effectively expand the application range.
- the embodiments of the present application also provide a device that has the function of realizing the behavior in the method example of the first aspect described above, and the beneficial effects can be referred to the description of the first aspect and will not be repeated here.
- the function can be realized by hardware, or by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above functions.
- the structure of the device includes a receiving unit, an acquiring unit, a judging unit, and an information generating unit. It may also include a recording module. These units can perform the corresponding functions in the above-mentioned method examples of the first aspect. For details, see The detailed description in the method example will not be repeated here.
- the embodiments of the present application also provide a device that has the function of realizing the behavior in the method example of the second aspect described above, and the beneficial effects can be referred to the description of the second aspect and will not be repeated here.
- the function can be realized by hardware, or by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above-mentioned functions.
- the structure of the device includes a receiving unit, an acquiring unit, a judging unit, and an information generating unit. It may also include a recording unit. These units can perform the corresponding functions in the above-mentioned method examples of the second aspect. For details, see The detailed description in the method example will not be repeated here.
- the embodiments of the present application also provide a device that has the function of realizing the behavior in the method example of the first aspect described above, and the beneficial effects can be referred to the description of the first aspect and will not be repeated here.
- the structure of the detection device includes a processor and a memory, and the processor is configured to support the base station to perform the corresponding functions in the above-mentioned method in the first aspect.
- the memory is coupled with the processor, and it stores program instructions and data necessary for the communication device.
- the structure of the communication device also includes a communication interface for communicating with other devices.
- the embodiments of the present application also provide a device, which has the function of realizing the behavior in the method example of the second aspect, and the beneficial effects can be referred to the description of the second aspect and will not be repeated here.
- the structure of the communication device includes a processor and a memory, and the processor is configured to support the base station to perform the corresponding function in the method of the second aspect described above.
- the memory is coupled with the processor, and it stores program instructions and data necessary for the communication device.
- the structure of the communication device also includes a communication interface for communicating with other devices.
- the present application also provides a computer-readable storage medium having instructions stored in the computer-readable storage medium, which when run on a computer, cause the computer to execute the methods described in the foregoing aspects.
- the present application also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the methods described in the foregoing aspects.
- the present application also provides a computer chip connected to a memory, and the chip is configured to read and execute a software program stored in the memory, and execute the methods described in the foregoing aspects.
- Figure 1 is a schematic diagram of a network system architecture according to an embodiment of the present invention.
- Figure 2 is a schematic structural diagram of a back-end server provided by this application.
- FIG. 3 is a schematic structural diagram of another back-end server provided by this application.
- Figure 4 is a schematic diagram of a resource detection method provided by this application.
- Figure 5 is a schematic diagram of a resource detection method provided by this application.
- Figure 6 is a schematic diagram of a user interface provided by this application.
- FIG. 7 is a schematic diagram of a detection result provided by this application.
- FIG. 8 is a schematic diagram of another test result provided by this application.
- FIG. 9 is a schematic diagram of a resource detection method provided by this application.
- FIG. 10 is a schematic diagram of a resource detection method provided by this application.
- FIG 11 is a schematic diagram of another user interface provided by this application.
- 12-14 are schematic diagrams of the structure of a communication device provided by this application.
- FIG. 1 for a schematic diagram of a possible network architecture applicable to this application.
- it includes a client 101, a domain name system (DNS) server 102, a web service node 103, and a back-end server 104.
- DNS domain name system
- the client 101 is a device that can provide users with web browsing services.
- it can include handheld devices, computers, notebooks, etc. with transceiver functions; it can include mobile phones (or "cellular" phones), portable, pocket-sized, Handheld, mobile devices built into computers, etc.
- the embodiment of the present application does not limit the device type of the client 101.
- IP internet protocol
- URL uniform resource locator
- IP address request message is used to request the IP address of the web service node 103 that saves the web page, and the DNS server 102 obtains the IP address corresponding to the URL link according to the IP address request message, and sends it to the client 101
- IP address response message carrying the IP address, where the IP address is the IP address of the web service node 103 that saves the web page, and the client 101 receives the IP address response message and obtains the IP address from the IP address response message
- a webpage request message is sent to the webpage service node 103, and the webpage request message is used to request the webpage service node 103 for a webpage corresponding to a specific URL link. After obtaining the webpage, the client 101 displays the webpage locally.
- the back-end server 104 is used to provide background data for the web service node 103. Specifically, the back-end server 104 can be used to control the publishing and online of web pages or documents, and transmit the web pages or documents to the web service when the web pages or documents are online. Node 103: When the webpage or document goes offline, delete the webpage or document from the webpage service node 103.
- Fig. 2 is a schematic structural diagram of a back-end server according to an embodiment of the present invention.
- the back-end server 200 includes a content management system (CMS) 201 and a detection device 202.
- CMS content management system
- CMS201 can perform operations such as web page (or document) design, web page content update, and web page publishing or offline; CMS201 stores related files of web pages or documents, including content data of web pages or documents, that is, web pages or documents. Involved or displayed content, content data includes but not limited to resources such as sites and columns in web pages or documents.
- the detection device 202 is configured to perform dead-link (ie, invalid URL link) detection on resources (such as resources to be released or resources to be offline) according to instructions sent by the CMS 201 to determine whether there will be invalid URL links.
- the CMS201 may send a detection instruction to the detection device 202 before publishing a webpage or document (in this embodiment of the application, the webpages, documents and other files to be published are collectively referred to as resources to be published), and the detection device 202 can send detection instructions to the detection device 202 according to the received
- the detection instruction detects the possible dead link status of the resource to be released, and sends the detection result to CMS201, and CMS201 determines whether to release the resource to be released according to the detection result.
- the CMS201 may send a detection instruction to the detection device 202 before the webpage or document (in this embodiment of the application, the webpages, documents, etc. to be published are collectively referred to as resources to be offline)
- the received detection instruction detects the possible dead link status of the resource to be offline, and sends the detection result to the CMS201, and the CMS201 determines whether to offline the resource to be offline according to the detection result.
- the detection device 202 may provide an application programming interface (application programming interface, API) to the CMS 201, and the user of the CMS 201 may call the API on the control interface of the CMS 201 to generate a dead link detection request.
- API application programming interface
- Fig. 3 is a schematic structural diagram of another back-end server according to an embodiment of the present invention.
- the back-end server 300 includes CMS301.
- CMS301 has the function of detection device 202 in Figure 2 built-in.
- CMS301 can perform resources to be released or resources to be offline after the resources to be released are released or before resources to be offline are offline. Perform detection to determine the possible storage of dead links and display the detection results.
- the following describes the resource detection method provided by the embodiment of the present application based on the network architecture and the back-end server as shown in FIGS. 1 to 3.
- the embodiments of this application mainly involve two resource detection methods, which are as follows:
- the first is to check the resource to be published before the resource is released, determine the state of the referenced resource in the resource to be published, and determine whether the resource to be published can be published according to the state of the resource to be published, and whether there is an invalid URL link after publishing .
- the possible dead-link status of the resource to be released can be detected in advance.
- the release of the resource can be prevented in time; there is no need to manually perform dead-link detection after the resource is released , Can effectively reduce the probability of dead links in published web pages or documents, and can also improve user experience.
- the possible dead link status of the resource to be offline can be detected in advance.
- the resource offline process can be effectively suspended; to avoid invalid URLs after the resource goes offline.
- the probability of a link can provide users with a better web browsing experience and can effectively improve user experience.
- FIG. 4 shows a resource detection method according to an embodiment of the present application. As shown in FIG. 4, the method includes:
- Step 401 The detection device 202 receives a first detection instruction for a resource to be released triggered by a user.
- the resource release process of CMS201 can be triggered, which can trigger the first detection instruction for the resource to be released; for example, CMS201 can ensure that there is no dead link after the release of the resource to be released.
- the first detection instruction for the resource to be released is sent to the detection device 202.
- the first detection instruction may include the resource to be published or the address information of the resource to be published.
- the first detection instruction may include the HTML file of the resource to be published, and may also include the URL link of the resource to be published .
- Step 402 The detection device 202 obtains the URL link of the cited resource cited in the resource to be released according to the first detection instruction.
- the detection device 202 can obtain the resource to be released from the first detection instruction, and determine the resource referenced by the resource to be released according to the resource to be released (in the embodiment of the application, it may be referred to as the cited resource for short. ) URL link.
- the detection device 202 can detect the keyword www. in the resource to be published to determine the URL link of the cited resource; for another example, the detection device 202 can obtain the hypertext reference of the A tag by traversing the A tag in the resource to be published The (hypertext reference, HREF) attribute is used to obtain the URL link of the resource referenced by the resource to be published.
- HREF hypertext reference
- the resources to be published include two types, one is a webpage, and the other is a document including multiple webpages; when the type of the resource to be published is a webpage, it indicates that a single webpage needs to be published, and the detection device 202 It is necessary to determine the URL link of the referenced resource of the web page to be published.
- the type of the resource to be published is a document, it indicates that a document needs to be published and multiple web pages need to be published at the same time.
- the detection device 202 needs to determine the URL link of the resource referenced by each web page in the document to be published.
- the document includes multiple web pages.
- the document may also include other resources, such as pictures, portable document format (PDF) files, and so on.
- PDF portable document format
- the cited resource can be other web pages, media files such as pictures, videos, etc., can also be PDF files, or can be documents composed of multiple web pages.
- the embodiments of this application do not limit the number of cited resources, and there may be one or more resources.
- Step 403 The detection device 202 judges the state of the referenced resource according to the URL link of the referenced resource.
- the status of the resource can be divided into two states: online and offline.
- Online means that the resource has been published to the public network and can be browsed or viewed by users. Online can also be called published or online.
- Offline can be divided into two categories, one is unpublished, which means that the resource has not been published to the network, cannot be browsed or viewed by users, and needs to be published later; the other is offline after being published, which refers to the resource After publishing to the network, when adjustment or deletion is required, the resource is deleted from the network.
- the two types can be identified differently. For example, the status of the unpublished resource can be identified as not published.
- the status of a resource that has been released after it is offline identifies its offline time to indicate that the resource has been offline during the offline time. You can also delete the offline resource directly without identifying it. If the offline resource cannot be found The status of the resource, the resource can be considered offline.
- Step 404 The detection device 202 generates first prompt information when confirming that the referenced resource is offline, and the first prompt information is used to prompt that publishing the resource to be published will generate an invalid URL link.
- the detection device 202 sends a first prompt message to the CMS201 before publishing the resource to be published, informing that if publishing the resource to be published will result in an invalid URL link, the user can stop publishing the resource in CMS201 according to the first prompt message. Publish resources.
- the CMS 201 can prompt the user that there will be a dead link if the resource is released; or directly display the first prompt message.
- any resource in the referenced resource will go offline at a future time, for example, any resource in the referenced resource is currently in the released state, but the offline time is marked, and the offline time is a certain future After a moment is indicated, any resource in the referenced resource will go offline at the time indicated by the offline time; in this way, a dead link will also exist after the resource to be released is released and arrives at a future time.
- the detection device 202 will send a second prompt message to the CMS201, informing that if the resource to be published is released, an invalid URL link will be generated, and the time when the invalid URL link is generated is at some point in the future, that is, it is being cited. When any resource in the resource goes offline, an invalid URL link will be generated.
- the CMS 201 can prompt the user that if there is a dead link in publishing the resource to be published, it can also prompt the time when an invalid URL link is generated; or it can directly display the second prompt message.
- the detection device 202 will send a third prompt message to the CMS 201, prompting that publishing resources to be published will not generate invalid URL links.
- the CMS 201 can prompt the user that the resource to be published can be published normally, or can directly publish the resource to be published, and prompt the user that the resource to be published has been published.
- the CMS 201 can send a release message to the detection device 202 to inform the detection device 202 that the resource to be released has been released.
- the detection device 202 can save the reference relationship between the resource to be released and the cited resource, and can also record the resource to be released The status is online.
- the mapping relationship between the URL link of the resource and the CMS path of the resource can be stored in the detection device 202, where the CMS path of the resource is used to indicate the related information of the resource, such as HTML file, PDF, portable network graphics (portable network graphics). Graphics, PNG) and other files are saved in CMS201.
- the mapping relationship may also be stored in the CMS 201, and the detection device 202 may send a request message for obtaining the mapping relationship to obtain the mapping relationship from the CMS 201.
- mapping relationship between the URL link of the resource and the CMS path of the resource can also be stored in a third-party database (not shown) that can be accessed by both the detection device 202 and CMS201. Both detection device 202 and CMS201 can Obtain the mapping relationship from the database.
- the detection device 202 can obtain the CMS path of the resource to be published according to the URL link of the resource to be published; and obtain the CMS path of the referenced resource according to the URL link of the resource to be published; record the CMS path of the resource to be published and the referenced resource
- the reference relationship of the CMS path records the status of the resource to be released as the online status.
- the detection device 202 may record the correspondence between the CMS path of the resource to be released and the state of the resource to be released.
- the detection device 202 records the reference relationship between the CMS path of the resource to be published and the CMS path of the referenced resource and the status of the resource to be published in the database; it is convenient to follow the reference relationship and the resource to be published To view the status.
- the number of cited resources is not limited.
- the detection device 202 needs to obtain each referenced resource when acquiring the URL link of the referenced resource according to the first detection instruction.
- the cited resource corresponding to the document to be published may include the resources (such as webpages or pictures) included in the document to be published; that is, the webpage in the document to be published You can reference other resources in the document to be published.
- the detection device 202 can ignore the status of the resource belonging to the document to be published in the referenced resource, and only determine whether any resource in the referenced resource that does not belong to the document to be published is offline or whether it will go offline in the future.
- the detection device 202 can send a first prompt message to the CMS 201; if any resource in the cited resource that does not belong to the document to be published will be When offline in the future, the detection device 202 may send a third prompt message to the CMS 201. If all the cited resources belong to the document to be published, the detection device 202 may send a third prompt message to the CMS 201.
- the detection device 202 may send a third prompt message to the CMS 201.
- the detection device 202 determines the status of the referenced resource. From the foregoing, it can be known that after the resource to be released is released, the detection device 202 will record that the status of the resource to be released is online. Similarly, after the referenced resource is published, the detection device 202 may also record the status of the referenced resource as being online.
- the detection device 202 can record the status of the resource, and can also record the correspondence between the CMS path of the resource and the status of the resource (specifically, it can be recorded in a database, for example); when the detection device determines that a certain resource has been released (For example, CMS201 informs the detection device 202 that the resource has been released), the detection device 202 can record the status of the resource as released; when the detection device determines that a certain resource is offline (for example, CMS201 informs the detection device 202 that the resource is released) Online or unpublished), the detection device 202 can record the status of the resource as offline or offline at a future time; for example, the detection device 202 can record the status of the unpublished resource as not published; The status of a resource that goes offline after publishing, or the offline time of a resource that goes offline after publishing; it can also establish the corresponding relationship between the resource's CMS path and the resource's state.
- CMS201 informs the detection device 202 that the resource has been released
- the detection device 202 can record the status of
- the cited resources may be maintained by the CMS201 system, while in other embodiments of the application, the cited resources may also be maintained by other systems.
- the referenced resource is a resource belonging to the external network; if there is a resource belonging to the external network in the referenced resource, the detection device 202 can detect the resource belonging to the external network through the hypertext transfer protocol (HTTP) detection status.
- HTTP hypertext transfer protocol
- the detection device sends an http request to the external network according to the URL of the referenced resource, and the detection device receives the http response result fed back by the external network. If the http response result is 404, it indicates that the resource is not accessible, and the release of the resource to be published will generate Dead link, if the http response result is 200, it indicates that the resource is accessed normally, and the resource will not affect the release of the resource to be released.
- the detection device provides dead link detection service for the CMS.
- the detection device can also be built-in and integrated into the CMS as shown in FIG. 3, that is, the dead link detection is implemented in the CMS. Give specific instructions.
- FIG. 5 is a flowchart of a resource detection method according to another embodiment of the present invention.
- the method shown in FIG. 5 includes:
- Step 501 CMS301 receives the first detection instruction for the resource to be released triggered by the user.
- FIG. 6 is a schematic diagram of the user interface of CMS301 according to an embodiment of the present application.
- the user can click on the content check in the display interface of CMS301, and the user can trigger the resource to be released.
- the first test instruction As shown in FIG. 6, the user can click on the content check in the display interface of CMS301, and the user can trigger the resource to be released.
- the first test instruction As shown in FIG. 6, the user can click on the content check in the display interface of CMS301, and the user can trigger the resource to be released.
- the first test instruction is a schematic diagram of the user interface of CMS301 according to an embodiment of the present application.
- Step 502 CMS301 obtains the URL link of the cited resource quoted in the resource to be published according to the first detection instruction.
- CMS301 obtains the URL link of the cited resource quoted in the resource to be published according to the first detection instruction.
- the detection device 202 obtains the URL link of the cited resource cited in the resource to be published in the embodiment shown in FIG. No longer.
- Step 503 CMS301 judges the status of the referenced resource according to the URL link of the referenced resource, and generates the first prompt message when confirming that the referenced resource is offline.
- CMS301 judges the status of the referenced resource based on the URL link of the referenced resource can refer to the way the detection device 202 judges the status of the referenced resource according to the URL link of the referenced resource in the embodiment shown in FIG. Repeat.
- the first prompt message is generated; if the referenced resource will go offline again, the second prompt message is generated; if the referenced resource is online, the third prompt message is generated; the first prompt is generated
- the operations performed by CMS301 after the message, the second prompt message, or the third prompt message refer to the operations performed by CMS301 after receiving the first prompt message, the second prompt message, or the third prompt message from the detection device in the foregoing content. I won't repeat them here.
- the CMS301 may display the interface as shown in FIG. 7; when the third prompt message is generated, the CMS301 may display the interface as shown in FIG. 8.
- Fig. 9 shows a resource detection method according to an embodiment of the present application. As shown in Fig. 9, the method includes:
- Step 901 The detection device 202 receives a second detection instruction for the resource to be offline triggered by the user.
- resources to be offline may be referenced by other resources, directly offline resources to be offline will result in quoting the resources of the resources to be offline (in the embodiment of this application, resources referencing resources to be offline are referred to as reference resources). If you browse normally, you can't jump to the resource to be offline normally, and an invalid link will occur.
- the CMS 201 can be triggered to send a second detection instruction for the resource to be offline to the detection device 202.
- the second detection instruction may include the resource to be offline or address information of the resource to be offline.
- the second detection instruction may include the HTML file of the resource to be offline, and may also include the URL of the resource to be offline.
- the link also includes other information indicating the resource to be offline.
- the embodiment of the application does not limit the information carried by the second detection instruction. Any information that can indicate the resource to be offline can be carried in the second detection instruction.
- Step 902 The detection device 202 obtains the URL link of the resource to be offline according to the second detection instruction.
- Step 903 The detection device 202 judges the status of the reference resource that references the URL link of the webpage to be offline.
- the detection device 202 Before the detection device 202 determines the status of the reference resource that refers to the URL link of the web page to be offline, the detection device 202 needs to determine the reference resource. As shown in the embodiment shown in FIG. 4, the detection device can record the resource each time a resource is released.
- the reference relationship between the resource and the resource referenced by the webpage can also record the status of the resource, and establish the corresponding relationship between the CMS201 link of the resource and the status of the resource; the detection device 202 can also record the offline status of the resource; That is, when the reference resource is released, the detection device 202 will record the correspondence between the CMS path of the reference resource and the state of the reference resource, record the status of the reference resource as online, and establish the correspondence between the CMS path of the reference resource and the state of the reference resource relationship.
- the detection device 202 can also record the status of the referenced resource as offline.
- the detection device 202 may record the reference relationship between the CMS path of the resource to be offline and the CMS path of the referenced resource;
- the embodiments of the present application do not limit the number of reference resources, and there may be one or more reference resources.
- the detection device 202 may obtain the resource to be offline based on the mapping relationship between the URL link of the resource and the CMS path of the resource, according to the URL link of the resource to be offline CMS201 path.
- the mapping relationship between the URL link of the resource and the CMS path of the resource may be stored locally by the detecting device 202, or obtained by the detecting device 202 from the CMS, or stored in a database for the detecting device 202 to obtain.
- the detection device 202 then obtains the CMS path of the referenced resource from the reference relationship according to the CMS path of the resource to be offline; searches for the state of the referenced resource from the corresponding relationship between the CMS path of the referenced resource and the state of the referenced resource.
- Step 904 The detection device 202 generates fourth prompt information when confirming that the reference resource is in the online state, and the fourth prompt information is used to prompt that the resource to be offline will cause an invalid URL link to be offline.
- any resource in the referenced resource is online, it means that after the resource to be offline goes offline, the user browses any resource in the referenced resource and will view the content in that resource; in the process of browsing the resource, Will not be able to jump to the resource to be offline, which will cause a dead link.
- the detection device 202 will send a fourth prompt message to the CMS 201 to inform that if the resource to be offline is offline, an invalid URL link will be generated.
- the CMS 201 can prompt the user that there will be a dead link if the offline resource goes offline; or directly display the fourth prompt message.
- a fifth prompt message is generated, and the fifth prompt information is used to prompt to go offline that the resource to be offline will generate an invalid URL link when it arrives at the future time.
- any resource in the referenced resource will go offline at a later time, for example, any resource in the referenced resource is currently in the published state, but the offline time is marked, and the offline time is a certain future Time, after indicating that, at the time indicated by the offline time, any resource in the referenced resource will go offline; if the resource to be offline goes offline before any resource in the referenced resource, it is under the resource to be offline In the time period from after going online to before any resource in the referenced resource goes offline, the user cannot normally jump to the resource to be offline when browsing any resource in the referenced resource, and there will also be a dead link.
- the detection device 202 will send a fifth prompt message to the CMS 201, informing that if the resource to be offline is offline, an invalid URL link will be generated, and the time when the invalid URL link is generated is before the arrival of a certain time in the future. That is, before the offline moment of any resource in the referenced resource, an invalid URL link will be generated.
- the CMS 201 can prompt the user that there will be a dead link if the resource to be offline goes offline, and can also prompt the time when the invalid URL link is generated; or directly display the fifth prompt message.
- CMS201 can send a second detection instruction to the detection device when it needs to offline resources to be offline at the moment. If any resource in the referenced resource will be offline at a future time, the detection device can send the detection device to CMS201 The fifth prompt message.
- CMS201 can also detect in advance whether there is a dead link in the offline resource at a certain time in the future (for the convenience of explanation, use the first time instead), if any resource in the referenced resource will be at another time in the future (For the convenience of explanation, use the second time instead) to go offline; if the second time is before the first time, that is, any resource in the referenced resource goes offline before the resource to be offline, then the resource to be offline is offline The line will not affect any resource in the referenced resource, and will not generate a wireless link; if the second time is later than the first time, that is, any resource in the referenced resource will go offline after the offline resource goes offline , The offline of the resource to be offline will affect any resource in the referenced resource.
- the detection device 202 may send a fifth prompt message to the CMS 201.
- sixth prompt information is generated, and the sixth prompt information is used to prompt that the resource to be published will not be offline to generate an invalid URL link.
- the detection device 202 will send a sixth prompt message to the CMS 201, prompting that the offline resource to be offline will not generate an invalid URL link.
- the CMS 201 can prompt the user that the resource to be offline can be normally offline, or can directly offline the resource to be offline, and prompt the user that the resource to be offline is offline.
- CMS 201 can send a offline message to the detection device 202 to inform the detection device 202 that the resources to be offline are offline, and the detection device 202 can delete the saved resources to be offline and references to resources to be offline.
- the reference relationship of the resource can also record the status of the resource to be offline as offline, or delete the record of the status of the resource to be offline.
- the referenced resource corresponding to the document to be offline may include the resources (such as web pages or pictures) included in the document to be offline; that is, the document to be offline
- the web pages in can reference other resources in the document to be published.
- the detection device 202 can ignore the device in the referenced resource that belongs to the resource of the document to be published, and only determine whether any resource in the referenced resource that does not belong to the document to be offline is online or whether it will be offline in the future.
- the detection device 202 can send a fourth prompt message to the CMS201; if any resource that does not belong to the document to be published in the referenced resource will go offline in the future, the detection device 202 may send a fifth prompt message to CMS201. If all the cited resources belong to the documents to be published, the detection device 202 may send a sixth prompt message to the CMS 201.
- the CMS 201 For operations performed by the CMS 201 after receiving the first prompt message, the second prompt message, or the third prompt message, refer to the foregoing description, and will not be repeated here.
- the detection device provides dead link detection service for the CMS.
- the detection device can also be built-in and integrated into the CMS as shown in FIG. 3, that is, the dead link detection is implemented in the CMS. Give specific instructions.
- FIG. 10 is a flowchart of a resource detection method according to another embodiment of the present invention.
- the method shown in FIG. 10 includes:
- Step 1001 CMS301 receives a second detection instruction for resources to be offline triggered by a user.
- FIG. 11 is a display interface of CMS301 according to an embodiment of the present application.
- the user can click Content Check on the display interface in the CMS, and the user triggers the second detection instruction for the resource to be offline .
- Step 1002 CMS301 obtains the URL link of the resource to be offline according to the second detection instruction.
- the manner in which CMS301 obtains the URL link of the resource to be offline according to the second detection instruction can refer to the manner in which the detection device 202 obtains the URL link of the resource to be offline according to the second detection instruction in the embodiment shown in FIG. Repeat.
- Step 1003 CMS301 judges the status of the referenced resource that references the URL link of the webpage to be offline, and when it is confirmed that the referenced resource is in the online state, the fourth prompt information is generated, and the fourth prompt information is used to prompt the offline site Described resources to be offline will generate invalid URL links.
- CMS 301 For the CMS 301 to determine the status of the referenced resource that references the URL link of the webpage to be offline, refer to the manner in which the detection device 202 in the embodiment shown in FIG. 9 judges the status of the referenced resource that references the URL link of the webpage to be offline. I won't repeat them here.
- the fourth prompt message will be generated; if any resource in the referenced resource will go offline in the future, the fifth prompt message will be generated; if the referenced resources are all offline, the fourth prompt message will be generated.
- Six prompt information; the operations performed by CMS301 after the fourth prompt message, fifth prompt message, or sixth prompt message is generated can be referred to in the foregoing content when CMS301 receives the fourth prompt message, fifth prompt message, or first prompt message from the detection device 6. Operations performed after the prompt message will not be repeated here.
- the type of resource to be published is a document
- a certain published document can be replaced.
- one or more documents can be added Resources, in essence, are one or more new resources that need to be released; one or more resources can also be reduced, and in essence, one or more resources that need to be reduced offline.
- the documents to be published include webpage 1, webpage 2, webpage 5, and webpage 6, and the documents to be published include webpage 1, webpage 2, webpage 3, and webpage 4.
- webpage 4 is newly added. , Page 5, reducing page 3.
- the newly added one or more resources constitute the first resource to be published.
- 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 Multiple resources constitute the first resource to be offline.
- the embodiment shown in FIG. 4 or 5 may be used for resource detection
- the embodiment shown in FIG. 9 or 10 may be used for resource detection.
- the embodiment of the present application also provides a detection device for executing the method executed by the detection device in the method embodiment shown in FIG. 4, and related features can be found in the above method implementation. For example, it will not be repeated here. It needs to be explained that when applied to the back-end server shown in FIG. 3, the device can also be used to execute the CMS execution method in the method embodiment shown in FIG. 5.
- the device 1200 includes a receiving unit 1201, an acquiring unit 1202, a determining unit 1203, and an information generating unit 1204:
- the receiving unit 1201 is used to receive the first detection instruction triggered by the user for the resource to be released.
- the obtaining unit 1202 is configured to obtain the URL link of the cited resource quoted in the resource to be released according to the first detection instruction.
- the determining unit 1203 is configured to determine the state of the cited resource according to the URL link of the cited resource.
- the information generating unit 1204 is used for judging the status of the referenced resource according to the URL link of the referenced resource, and generating first prompt information when it is confirmed that the referenced resource is offline, and the first prompt information is used to prompt the release to be released. Publishing resources will generate invalid URL links.
- the information generating unit 1204 may generate second prompt information when confirming that the referenced resource is offline at a future time, and the second prompt information is used to prompt that an invalid URL link will be generated when the resource to be published arrives at a future time .
- the information generating unit 1204 is further configured to generate third prompt information when it is confirmed that the referenced resource is in an online state, and the third prompt information is used to prompt that publishing the resource to be published will not generate an invalid URL link.
- the obtaining unit 1202 may obtain the content management system CMS path of the resource to be published according to the URL link of the resource to be published; and obtain the CMS path of the cited resource according to the URL link of the resource to be published.
- the device further includes a recording unit 1205, which can record the reference relationship between the CMS path of the resource to be published and the CMS path of the referenced resource, and record the status of the resource to be published as the online state.
- the corresponding relationship between the CMS path of the resource to be published and the state of the resource to be published is recorded, and the state of the resource to be published is recorded as an online state.
- 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 released triggered by the user.
- the judging unit 1203 when the judging unit 1203 judges the status of the referenced resource according to the URL link of the referenced resource, it may obtain the CMS path of the referenced resource according to the URL link of the referenced resource; and search for the CMS of the referenced resource from the correspondence relationship. The state of the referenced resource corresponding to the path.
- the type of the resource to be published is one of a network element and a document
- the type of the cited resource is one of a network element and a document, where the document includes multiple web pages.
- the embodiment of the application also provides a detection device for executing the method executed by the detection device in the method embodiment shown in FIG. 7.
- a detection device for executing the method executed by the detection device in the method embodiment shown in FIG. 7.
- the device 1300 includes a receiving unit 1301, an acquiring unit 1302, a determining unit 1303, and an information generating unit 1304:
- the receiving unit 1301 is configured to receive a second detection instruction for the resource to be offline triggered by a user
- the obtaining unit 1302 is configured to obtain the uniform resource locator URL link of the resource to be offline according to the second detection instruction;
- the judging unit 1303 is used for judging the status of the reference resource that references the URL link of the webpage to be offline;
- the information generating unit 1304 is configured to generate fourth prompt information when it is confirmed that the referenced resource is in the online state, and the fourth prompt information is used to prompt that the offline resource to be offline will generate an invalid URL link.
- the information generating unit 1304 may generate fifth prompt information when it is confirmed that the referenced resource is offline at a future time, and the fifth prompt information is used to prompt that the offline resource will become invalid when it arrives at a future time.
- URL link may be generated by the information generating unit 1304 .
- the information generating unit 1304 may generate sixth prompt information when confirming that the referenced resource is offline, and the sixth prompt information is used to prompt that the resource to be released offline will not generate an invalid URL link.
- the device further includes a recording unit 13051005.
- the recording unit 1305 can record the CMS path of the resource to be offline and the CMS path of the referenced resource before the receiving unit 1301 receives the second detection instruction for the resource to be offline triggered by the user. Reference relationship; and record the corresponding relationship between the CMS path of the referenced resource and the state of the referenced resource;
- the type of the resource to be published is one of a webpage and a document
- the type of the cited resource is one or both of the webpage and the document.
- the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
- the functional units 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 may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the foregoing embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination.
- the above-mentioned embodiments may be implemented in the form of a computer program product in whole or in part.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- 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.
- the computer instructions may be transmitted from a website, computer, server, or data center.
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more sets of available media.
- the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium.
- the semiconductor medium may be a solid state drive (SSD).
- the apparatus 1400 shown in FIG. 14 includes at least one processor 1401, a memory 1402, and optionally, a communication interface 1403.
- the memory 1402 may be a volatile memory, such as random access memory; the memory may also be a non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD) or solid-state drive (solid-state drive, SSD) or the memory 1402 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
- the memory 1402 may be a combination of the foregoing memories.
- the memory 1402 may be a volatile memory, such as random access memory; the memory may also be a non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD) or solid-state drive (SSD) , Or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.
- the memory 1402 may be a combination of the foregoing memories.
- connection medium between the processor 1401 and the memory 1402 described above is not limited in the embodiment of the present application.
- the processor 1401 may be a CPU, and the processor 1401 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, artificial intelligence chips, chips on a chip, etc.
- the general-purpose processor may be a microprocessor or any conventional processor. It has a data transceiver function and can communicate with other devices.
- an independent data transceiver module such as a communication interface 1403, can be used to send and receive data; when the processor 1201 communicates with other devices, it can Data transmission is performed through the communication interface 1403, such as receiving a first detection instruction or a second detection instruction from the slave.
- the processor 1401 in FIG. 14 can call the computer execution instructions stored in the memory 1402, so that the detection device can execute any of the above method embodiments. The method performed by the detection device.
- the functions/implementation processes of the receiving unit, the acquiring unit, the judging unit, the information generating unit, and the recording unit in FIG. 12 can all be implemented by the processor 1401 in FIG. 14 calling computer execution instructions stored in the memory 1402.
- the function/implementation process 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 the computer execution instructions stored in the memory 1402, and the receiving unit in FIG.
- the function/implementation process can be implemented through the communication interface 1403 in FIG. 14.
- the functions/implementation processes of the receiving unit, the acquiring unit, the judging unit, the information generating unit, and the recording unit in FIG. 13 can all be implemented by the processor 1401 in FIG. 14 calling the computer execution instructions stored in the memory 1402.
- the function/implementation process of the acquisition unit, the judgment unit, the information generation unit, and the recording unit in FIG. 13 may be implemented by the processor 1401 in FIG. 14 calling the computer execution instructions stored in the memory 1402, and the receiving unit in FIG.
- the function/implementation process can be implemented through the communication interface 1403 in FIG. 14.
- the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
- a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
- the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
- the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Environmental & Geological Engineering (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种资源检测方法及装置,用以实现自动检测网页或文档中的死链。检测装置接收针对待发布资源的第一检测指令,根据第一检测指令获取在待发布资源中所引用的资源的URL链接,检测装置可以根据被引用资源的URL链接判断被引用资源的状态,若被引用资源处于已下线状态,说明发布待发布资源会导致待发布资源不能正常跳转,检测装置可以产生第一提示信息,还可以将第一提示信息发送给CMS,其中,第一提示信息用于提示发布待发布资源会产生失效URL链接。在待发布资源发布之前,可以预先检测待发布资源可能存在的死链状况,在存在死链的情况下,可以有效减少发布的网页或文档存在死链的概率,也可以提高用户体验。
Description
本申请涉及通信技术领域,尤其涉及一种资源检测方法及装置。
用户在浏览网站或上网的过程中,网页之间可以进行跳转,以显示用户所需的内容,网页之间的跳转是由于网页之间存在引用关系,当网页上的内容需要更新,例如删除原先的内容、增加新内容等,网页之间的引用关系可能发生改变。
当已发布的网页所引用的网页中存在未发布或者已经下线的网页,用户在浏览该已发布的网页时,若浏览该网页所引用的网页,则会发生死链,也就是用户访问不存在的网页,返回404等状态,这样会影响用户体验。
目前,检测死链的方式,主要依赖用户反馈,用户在浏览网页时若发现死链,反馈给网站维护人员,以便进行修复。这种方式,依赖于用户的反馈,死链发现并不及时,效率较低,同时也会影响到用户体验。
发明内容
本申请提供一种资源检测方法及装置,用以自动检测网页或文档中的死链。
第一方面,本申请实施例提供了一种资源检测方法,该方法可由检测装置执行,也可以由CMS执行,此处以检测装置为例进行说明,所述方法包括:当CMS在用户的触发下确认需要发布待发布资源时,可以向检测装置发送针对待发布资源的第一检测指令,检测装置接收该第一检测指令,该第一检测指令中可以携带待发布资源的相关信息,示例性的,可以携带待发布资源的URL链接;检测装置可以根据第一检测指令获取在待发布资源中所引用的资源的URL链接,在本申请实施例中待发布资源中所引用的资源可以称为被引用资源;之后,检测装置可以根据被引用资源的URL链接判断被引用资源的状态,若被引用资源处于已下线状态,说明发布待发布资源会导致待发布资源不能正常跳转,检测装置可以产生第一提示信息,还可以将第一提示信息发送给CMS,其中,第一提示信息用于提示发布待发布资源会产生失效URL链接。
通过上述方法,在待发布资源发布之前,可以预先检测待发布资源可能存在的死链状况,在存在死链的情况下,可以及时阻止资源的发布,可以有效减少发布的网页或文档存在死链的概率,也可以提高用户体验。
在一种可能的设计中,若被引用资源在未来时刻下线,也就是说被引用资源会在之后的某一个时刻下线,若被引用资源下线,也将导致待发布资源在发布之后不能正常跳转,存在死链,检测装置可以产生第二提示信息,还可以将第二提示信息发送给CMS,其中,第二提示信息用于提示发布待发布资源在未来时刻到达时会产生失效URL链接。
通过上述方法,对于被引用资源中预设有下线时刻的资源进行检测,可以避免待发布资源在发布之后产生失效URL链接。
在一种可能的设计中,若被引用资源处于上线状态,也就是说被引用资源始终可以被 查看,待发布资源在发布之后可以正常跳转,不存在死链,检测装置可以产生第三提示信息,还可以将第三提示信息发送给CMS,其中,第三提示信息用于提示发布待发布资源不会产生失效URL链接。
通过上述方法,保证在被引用资源处于上线状态的情况下,可以发布待发布资源,可以使得待发布资源在发布之后正常跳转。
在一种可能的设计中,在待发布资源发布之后,检测装置可以保存待发布资源与被引用资源之间的引用关系、以及待发布资源的状态信息。示例性的,检测装置可以根据待发布资源的URL链接获取待发布资源的CMS路径;以及根据被引用资源的URL链接获取被引用资源的CMS路径;记录待发布资源的CMS路径与被引用资源的CMS路径的引用关系,记录待发布资源的状态为已上线状态。并记录待发布资源的CMS路径与待发布资源的状态的对应关系,其中待发布资源的状态记录为已上线状态。
通过上述方法,每当资源发布之后,检测装置可以保存已发布资源与该资源所引用资源之间的引用关系,以及该资源的状态信息,可以后续查看资源状态,以及资源之间的引用关系。
在一种可能的设计中,检测装置在接收用户触发的针对待发布资源的第一检测指令之前,可以在被引用资源发布之后,记录被引用资源与被引用资源所引用资源之间的引用关系;还可以记录被引用资源的状态;检测装置记录被引用资源的状态的场景并不限于被引用资源发布的场景中,还可以在其他场景中,如被引用资源下线,本申请实施例并不限定。示例性的,检测装置记录被引用资源的状态时,可以记录被引用资源的CMS路径和被引用资源的状态的对应关系。
当检测装置根据被引用资源的URL链接判断被引用资源的状态时,可以根据被引用资源的URL链接获取被引用资源的CMS路径;之后,从对应关系中查找与被引用资源的CMS路径对应的被引用资源的状态。
通过上述方法,检测装置可以提前记录被引用资源的状态,以便后续在待发布资源发布之前,根据存储的信息较为便捷的确定被引用资源的状态,进而可以高效的确定出待发布资源在发布之后是否会产生失效URL链接。
在一种可能的设计中,待发布资源的类型为网元和文档中的一者;也就是说,待发布资源可以是单个网页,也可以包括有多个网页的文档;且被引用资源的类型为网元和文档中的一者或两者,也就是说,待发布资源可以引用单个网页,也可以引用文档。
通过上述方法,本申请提供的资源检测方法既适用于单个网页发布的场景,也适用于文档发布的场景,可以有效扩展应用范围。
第二方面,本申请实施例提供了一种资源检测方法,该方法可由检测装置执行,也可以由CMS执行,此处以检测装置为例进行说明,方法包括:当CMS在用户的触发下确认需要下线待下线资源时,可以向检测装置发送针对待下线资源的第二检测指令,检测装置接收该第二检测指令,该第二检测指令中可以携带待下线资源的相关信息,示例性的,可以携带待下线资源的URL链接;检测装置可以根据第二检测指令获取待下线资源的URL链接;之后判断引用待下线网页的URL链接的资源(在本申请实施例中引用待下线资源中的资源可以称为引用资源)的状态,若引用资源处于已上线状态,说明下线待下线资源会 导致引用资源不能正常跳转到待下线资源,检测装置可以产生第四提示信息,还可以将第四提示信息发送给CMS,第四提示信息用于提示下线待下线资源会产生失效URL链接。
通过上述方法,在待下线资源下线之前,可以预先检测待下线资源可能存在的死链状况,若存在死链,可以及时阻止资源的下线,可以有效减少下线的网页或文档产生失效URL链接的概率,也可以有效改善用户体验。
在一种可能的设计中,若引用资源在未来时刻下线,也就是说引用资源会在之后的某一个时刻下线,若引用资源下线,也将导致待下线资源在下线之后,引用资源下线之前,引用资源不能正常跳转,存在死链,检测装置可以产生第五提示信息,还可以将第五提示信息发送给CMS,其中,第五提示信息用于提示下线待下线资源在未来时刻到达时会产生失效URL链接。
通过上述方法,对于引用资源中预设有下线时刻的资源进行检测,可以避免待下线资源在下线之后产生失效URL链接。
在一种可能的设计中,若被引用资源处于已下线状态,也就是说待下线资源在下线之后,不会影响任一引用资源不存在死链,检测装置可以产生第六提示信息,还可以将第六提示信息发送给CMS,其中第六提示信息用于提示下线待发布资源不会产生失效URL链接。
通过上述方法,保证在引用资源处于下线状态的情况下,可以下线待下线资源,可以使得待下线资源在下线之后,不会产生死链。
在一种可能的设计中,检测装置在接收用户触发的针对待下线资源的第二检测指令之前,可以在引用资源发布之后,记录引用资源与引用资源所引用资源(如待下线资源)之间的引用关系;还可以记录引用资源的状态;检测装置记录引用资源的状态的场景并不限于引用资源发布的场景中,还可以在其他场景中,本申请实施例并不限定。示例性的,检测装置记录引用资源的状态时,可以记录待下线资源的CMS路径与引用资源的CMS路径的引用关系;以及记录引用资源的CMS路径与引用资源的状态的对应关系。
当检测装置判断引用待下线网页的URL链接的引用资源的状态时,可以根据待下线资源的URL链接获取待下线资源的CMS路径;之后,根据待下线资源的CMS路径从引用关系获取引用资源的CMS路径;并从对应关系中查找与引用资源的CMS路径对应的引用资源的状态。
通过上述方法,检测装置可以提前记录引用资源的状态,以便后续在待下线资源下线之前,根据存储的信息较为便捷的确定引用资源的状态,进而可以高效的确定出待下线资源在下线之后是否会产生失效URL链接。。
在一种可能的设计中,待发布资源的类型为网页和文档中的一者,待下线资源可以是单个网页,也可以是文档;被引用资源的类型为网页和文档中的一者或两者。
通过上述方法,本申请提供的资源检测方法既适用于单个网页下线的场景,也适用于文档下线的场景,可以有效扩展应用范围。
第三方面,本申请实施例还提供了一种装置,该装置具有实现上述第一方面的方法实例中行为的功能,有益效果可以参见第一方面的描述此处不再赘述。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功 能相对应的模块。在一个可能的设计中,所述装置的结构中包括接收单元、获取单元、判断单元以及信息产生单元,还可以包括记录模块,这些单元可以执行上述第一方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。
第四方面,本申请实施例还提供了一种装置,该装置具有实现上述第二方面的方法实例中行为的功能,有益效果可以参见第二方面的描述此处不再赘述。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。在一个可能的设计中,所述装置的结构中包括收单元、获取单元、判断单元以及信息产生单元,还可以包括记录单元,这些单元可以执行上述第二方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。
第五方面,本申请实施例还提供了一种装置,该装置具有实现上述第一方面的方法实例中行为的功能,有益效果可以参见第一方面的描述此处不再赘述。所述检测装置的结构中包括处理器和存储器,所述处理器被配置为支持所述基站执行上述第一方面方法中相应的功能。所述存储器与所述处理器耦合,其保存所述通信装置必要的程序指令和数据。所述通信装置的结构中还包括通信接口,用于与其他设备进行通信。
第六方面,本申请实施例还提供了一种装置,该装置具有实现上述第二方面的方法实例中行为的功能,有益效果可以参见第二方面的描述此处不再赘述。所述通信装置的结构中包括处理器和存储器,所述处理器被配置为支持所述基站执行上述第二方面方法中相应的功能。所述存储器与所述处理器耦合,其保存所述通信装置必要的程序指令和数据。所述通信装置的结构中还包括通信接口,用于与其他设备进行通信。
第七方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
第八方面,本申请还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
第九方面,本申请还提供一种计算机芯片,所述芯片与存储器相连,所述芯片用于读取并执行所述存储器中存储的软件程序,执行上述各方面所述的方法。
图1是根据本发明实施例的一种网络系统架构示意图;
图2为本申请提供的一种后端服务器的结构示意图;
图3为本申请提供的另一种后端服务器的结构示意图;
图4为本申请提供的一种资源检测方法的示意图;
图5为本申请提供的一种资源检测方法的示意图;
图6为本申请提供的一种用户界面示意图;
图7为本申请提供的一种检测结果示意图;
图8为本申请提供的另一种检测结果示意图;
图9为本申请提供的一种资源检测方法的示意图;
图10为本申请提供的一种资源检测方法的示意图;
图11为本申请提供的另一种用户界面示意图;
图12~14为本申请提供的一种通信装置的结构示意图。
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例作进一步地详细描述。方法实施例中的具体操作方法也可以应用于装置实施例或系统实施例中。其中,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。另外,需要理解的是,在本申请实施例的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
参阅图1所示,为本申请适用的一种可能的网络架构示意图。其中,包括客户端101、域名系统(domain name system,DNS)服务器102、网页服务节点103以及后端服务器104。
客户端101为可以向用户提供网页浏览服务的设备,例如可以包括具有收发功能的手持式设备、计算机、笔记本电脑等;可以包括移动电话(或称为“蜂窝”电话),便携式、袖珍式、手持式、计算机内置的移动装置等。本申请实施例并不限定客户端101的设备类型。
客户端101在检测到用户浏览网页的操作时,向DNS服务器102发送携带有网页的统一资源定位符(uniform resource locator,URL)链接(如www.huawei.com)的网络协议(internet protocol,IP)地址请求报文,该IP地址请求报文用于请求保存该网页的网页服务节点103的IP地址,DNS服务器102根据该IP地址请求报文获取URL链接对应的IP地址,向客户端101发送携带有该IP地址的IP地址应答报文,其中该IP地址是保存该网页的网页服务节点103的IP地址,客户端101接收IP地址应答报文,从IP地址应答报文中获取该IP地址,基于该IP地址向网页服务节点103发送网页请求报文,网页请求报文用于向网页服务节点103请求特定URL链接对应的网页。客户端101在获取该网页后,在本地显示该网页。
后端服务器104用于为网页服务节点103提供后台数据,具体地,后端服务器器104可以用于控制网页或文档的发布和上线,在网页或文档上线时,将网页或文档传输至网页服务节点103;在网页或文档下线时,从网页服务节点103删除网页或文档。
图2是根据本发明实施例的一种后端服务器的结构示意图。如图2所述,后端服务器200包括内容管理系统(content management system,CMS)201和检测装置202。
CMS201可以进行网页(或文档)设计、网页内容更新、以及网页发布或下线等操作;CMS201中保存有网页或文档的相关文件,其中包括网页或文档的内容数据,也就是网页或文档中所涉及或展示的内容,内容数据包括但不限于网页或文档中的站点、栏目等资源等。检测装置202用于根据CMS201发送的指令进行对资源(如待发布资源或待下线资源)进行死链(即失效URL链接)检测,确定是否会存在失效URL链接。
在本申请实施例中CMS201在网页或文档(在本申请实施例中将待发布的网页、文档等文件统称为待发布资源)发布之前可以向检测装置202发送检测指令,检测装置202根据接收到的检测指令检测待发布资源可能存在的死链状况,并发送检测结果至CMS201,CMS201根据检测结果确定是否发布该待发布资源。
在本申请实施例中CMS201在网页或文档(在本申请实施例中将待发布的网页、文档 等文件统称为待下线资源)下线之前可以向检测装置202发送检测指令,检测装置202根据接收到的检测指令检测待下线资源可能存在的死链状况,并发送检测结果至CMS201,CMS201根据检测结果确定是否下线该待下线资源。
在本实施例中,检测装置202可提供应用程序编程接口(application programming interface,API)至CMS201,CMS201的用户可在CMS201的控制界面调用API来产生死链检测请求。
图3是根据本发明实施例的另一种后端服务器的结构示意图。如图3所示,后端服务器300包括CMS301,CMS301内置有图2中检测装置202的功能,CMS301可以在对待发布资源发布之后或待下线资源下线之前,对待发布资源或待下线资源进行检测,确定可能存储的死链状况,并显示其检测结果。
下面基于如图1~3所示的网络架构以及后端服务器,对本申请实施例提供的资源检测方法进行说明。
本申请实施例中主要涉及两种资源检测方法,分别如下:
第一种、在资源发布之前,对待发布资源进行检测,确定待发布资源中引用的被引用资源的状态,根据被引用资源的状态确定是否可以发布该待发布资源,发布之后是否存在失效URL链接。
采用这种方式,在资源发布之前,可以预先检测待发布资源可能存在的死链状况,在存在死链的情况下,可以及时阻止资源的发布;无需在资源发布之后,人为的进行死链检测,可以有效减少发布的网页或文档存在死链的概率,也可以提高用户体验。
第二种、在资源下线之前,对待下线资源进行检测,确定引用待下线资源中的资源的状态,根据引用资源的状态确定是否可以下线该待下线资源,是否存在失效URL链接。
采用这种方式,在资源下线之前,可以预先检测待下线资源可能存在的死链状况,在存在死链的情况下,可以有效中止资源下线流程;避免在资源下线之后产生失效URL链接的概率,能够为用户提供较好的网页浏览体验,可以有效提高用户体验。
下面对上述两种资源检测方法进行说明:
基于如2所示的后端服务器,图4示出根据本申请实施例的一种资源检测方法,如图4所示,该方法包括:
步骤401:检测装置202接收用户触发的针对待发布资源的第一检测指令。
用户确定需要发布待发布资源前,可以触发CMS201的资源发布流程,由此可以触发针对待发布资源的第一检测指令;示例性的,CMS201为了保证待发布资源在发布之后不存在死链,可以向检测装置202发送针对该待发布资源的第一检测指令。
可选地,第一检测指令中可以包括该待发布资源或该待发布资源的地址信息,示例性的,第一检测指令可以包括待发布资源的HTML文件,还可以包括待发布资源的URL链接。
步骤402:检测装置202根据第一检测指令获取在待发布资源中引用的被引用资源的URL链接。
检测装置202在接收到第一检测指令后,可以从第一检测指令中获取待发布资源,并根据待发布资源确定待发布资源所引用的资源(在本申请实施例中可以简称为被引用资源)的URL链接。例如,检测装置202可以在待发布资源中检测www.这个关键词,确定被引用资源的URL链接;又例如,检测装置202可以通过遍历待发布资源内的A标签,获取A标签的超文本引用(hypertext reference,HREF)属性来获取待发布资源所引用的资源的URL链接。
在本申请实施例中,待发布资源包括两种类型,一种为网页,另一种为包括多个网页的文档;当待发布资源的类型为网页时,表明需要发布单个网页,检测装置202需要确定待发布网页的所引用的资源的URL链接。当待发布资源的类型为文档时,表明需要发布一个文档,需要多个网页同时发布,检测装置202需要确定待发布文档中每个网页的所引用的资源的URL链接。在一些示例中,文档包括多个网页,在其他示例中,文档还可以包括其他资源,例如图片、便携式文档格式(portable document format,PDF)文件等。
在本申请实施例中,被引用的资源可以是其他网页,也可以是图片,视频等媒体文件,也可以是PDF文件,还可以是多个网页构成的文档。本申请实施例,并不限定被引用的资源的数量,可以是一个,也可以是多个。
步骤403:检测装置202根据被引用资源的URL链接判断被引用资源的状态。
本申请实施例中,资源的状态,可以分为已上线和已下线两种状态。已上线是指资源已发布到公网中,能够被用户浏览或查看,已上线也可以称为已发布或上线。已下线可以分为两类,一类为未发布,是指资源并未发布到网络中,无法被用户浏览或查看,且后续需要发布;另一类为已发布后下线,是指资源发布到网络后,需要进行调整或者删除时,资源从网络中删除。为了区分已下线中的两种类型,可以对两类做不同的标识,示例性的,可以对未发布的资源的状态标识为not published。对于已发布后下线的资源的状态标识其下线时间,以指示该资源已在下线时间进行了下线操作,也可以不做标识,而是直接删除该下线资源,若无法查找到该资源的状态,可以认为该资源已下线。
步骤404:检测装置202在确认被引用资源处于已下线状态的情况下,产生第一提示信息,第一提示信息用于提示发布待发布资源会产生失效URL链接。
若被引用资源中的任一资源处于已下线的状态,表明若将该待发布资源进行发布之后,用户浏览在浏览该待发布资源的过程中,若点击被引用资源的URL,会跳转到该引用资源,若被引用资源中的任一资源已下线,用户是无法查看到被引用资源中已下线的资源的,不能实现正常跳转,这样会造成死链。为了避免这种情况,检测装置202待发布资源进行发布之前,向CMS201发送第一提示信息,告知若发布该待发布资源会产生失效URL链接,用户可根据第一提示信息停止在CMS201发布该待发布资源。
CMS201在接收到该第一提示消息后,可以向用户提示若发布该资源会存在死链;也可以直接显示该第一提示消息。
若被引用资源中的任一资源会在未来一个时刻下线,示例性的,被引用资源中的任一资源当前为已发布状态,但标注了下线时刻,该下线时刻为未来的某一个时刻,表明之后,在该下线时刻指示的时刻,该被引用资源中的任一资源会下线;这样在待发布资源发布且 在未来时刻到达之后,同样也会存在死链。为了避免这种情况,检测装置202会向CMS201发送第二提示信息,告知若发布该待发布资源会产生失效URL链接,产生失效URL连接的时间是在未来的某个时刻,也就是在被引用资源中的任一资源的下线时刻,会产生失效URL链接。
CMS201在接收到该第二提示消息后,可以向用户提示若发布该待发布资源会存在死链,还可以提示产生失效URL链接的时刻;也可以直接显示该第二提示消息。
若被引用资源中的所有资源处于均已上线,处于上线状态,表明若该待发布资源发布之后,用户在浏览该待发布资源的过程中,会均能够正常跳转到被引用资源的任一资源;这种情况下,检测装置202会向CMS201发送第三提示信息,提示发布待发布资源不会产生失效URL链接。
CMS201在接收到该第三提示消息后,可以向用户提示可以正常发布该待发布资源,也可以直接发布该待发布资源,并提示用户该待发布资源已发布。
在待发布资源发布之后,CMS201可以向检测装置202发送发布消息,告知检测装置202待发布资源已发布,检测装置202可以保存待发布资源与被引用资源的引用关系,还可以记录该待发布资源的状态为已上线。
可选的,在检测装置202中可以保存资源的URL链接与资源的CMS路径的映射关系,其中,资源的CMS路径用于指示资源的相关信息,如HTML文件、PDF、便携式网络图形(portable network graphics,PNG)等文件在CMS201中的保存地址。当然,该映射关系也可以保存在CMS201中,检测装置202可以发送获取该映射关系的请求消息,从CMS201中获取该映射关系。
作为一种可能的实施方式,资源的URL链接与资源的CMS路径的映射关系也可以保存在检测装置202和CMS201均可访问的第三方数据库(图未示)中,检测装置202和CMS201均可以从该数据库中获取该映射关系。
检测装置202可以根据待发布资源的URL链接获取待发布资源的CMS路径;以及根据被引用资源的URL链接获取被引用资源的CMS路径;记录所述待发布资源的CMS路径与所述被引用资源的CMS路径的引用关系,记录所述待发布资源的状态为已上线状态。
示例性的,检测装置202可以记录待发布资源的CMS路径与待发布资源的状态的对应关系。
需要说明的是,检测装置202在数据库中记录所述待发布资源的CMS路径与所述被引用资源的CMS路径的引用关系、以及待发布资源的状态;方便后续对该引用关系和待发布资源的状态进行查看。
在本申请实施例中并不限定被引用资源的数量,当被引用的资源的数目大于1时,检测装置202根据第一检测指令获取在被引用资源的URL链接时,需要获取每个被引用资源的URL链接;在记录待发布资源与被引用资源的引用关系时,需要确定每个被引用资源的CMS路径。
需要说明的是,若待发布资源的类型为文档,待发布文档对应的被引用资源可以包括该待发布文档中包括的资源(如网页或图片)等;也就是说,待发布文档中的网页可以引 用待发布文档中的其他资源。检测装置202可以忽略该被引用资源中属于待发布文档的资源的状态,只确定该被引用资源中不属于待发布文档的任一资源是否处于已下线状态或是否会在未来时刻下线,若该被引用资源中不属于待发布文档的任一资源处于已下线状态,检测装置202可以向CMS201发送第一提示消息;若该被引用资源中不属于待发布文档的任一资源会在未来时刻下线,检测装置202可以向CMS201发送第三提示消息。若被引用资源中均属于待发布文档,检测装置202可以向CMS201发送第三提示消息。CMS201在接收到第一提示消息、第二提示消息、或第三提示消息后执行的操作可以参见前述说明,此处不再赘述。
下面对检测装置202确定被引用资源的状态的方式进行说明,从前述内容可知,在待发布资源发布之后,检测装置202会记录该待发布资源的状态为已上线。类似的,在被引用资源发布之后,检测装置202也可以记录被引用资源的状态为已上线。
示例性的,检测装置202可以记录资源的状态,还可以记录资源的CMS路径与资源的状态的对应关系(具体而言,例如可以记录在数据库中);当检测设备在确定某一个资源已发布(如CMS201告知检测装置202该资源已发布),检测装置202可以将该资源的状态记录为已发布;当检测设备在确定某一个资源已下线(如CMS201告知检测装置202该资源发布后下线或未发布),检测装置202可以将该资源的状态记录为已下线或在未来时刻下线;示例性的,检测装置202可以将未发布的资源的状态记录为not published;不记录已发布后下线的资源的状态,或记录已发布后下线的资源的下线时间;还可以建立资源的CMS路径与资源的状态的对应关系。
需要说明的是,在上述实施例中,被引用资源可以是由CMS201系统负责维护的,而在本申请其他实施例中,被引用资源也可以由其他系统负责维护,对于由其他系统维护的被引用资源,为属于外部网络的资源;若被引用资源中存在属于外部网络中的资源,检测装置202可以通过超文本传输协议(hypertext transfer protocol,HTTP)探测确定引用资源中属于外部网络中的资源的状态。
示例性的,检测设备根据引用资源的URL向外部网络发送http请求,检测设备接收到外部网络反馈的http响应结果,若http响应结果为404,则表明该资源不可访问,发布待发布资源会产生死链,若http响应结果为200,则表明该资源访问正常,该资源不会对待发布资源的发布产生影响。
上述实施例中,检测装置为CMS提供死链检测服务,而在本申请其他实施例中,检测装置也可以如图3所示内置集成于CMS中,即在CMS中实现死链检测,以下将进行具体说明。
请参见图5,图5是根据本发明另一实施例的资源检测方法的流程图,图5所示该方法包括:
步骤501:CMS301接收用户触发的针对待发布资源的第一检测指令。
可结合图6一并参考,图6是根据本申请实施例的CMS301的用户界面示意图,如图6所示,用户可以在CMS301中的显示界面中点击内容检查,由用户触发针对待发布资源的第一检测指令。
步骤502:CMS301根据第一检测指令获取在待发布资源中引用的被引用资源的URL链接。CMS301获取在待发布资源中引用的被引用资源的URL链接的方式可以参见如图4所示的实施例中检测装置202获取在待发布资源中引用的被引用资源的URL链接的方式,此处不再赘述。
步骤503:CMS301根据被引用资源的URL链接判断被引用资源的状态,在确认被引用资源处于已下线状态的情况下,产生第一提示信息。
CMS301根据被引用资源的URL链接判断被引用资源的状态的方式可以参见如图4所示的实施例中检测装置202根据被引用资源的URL链接判断被引用资源的状态的方式,此处不再赘述。
若被引用资源处于已下线状态,产生第一提示信息;若被引用资源会再来时刻下线,产生第二提示信息;若被引用资源处于上线状态,产生第三提示信息;产生第一提示消息、第二提示消息、或第三提示消息后CMS301执行的操作可以参见前述内容中CMS301在接收到来自检测装置的第一提示消息、第二提示消息、或第三提示消息后执行的操作,此处不再赘述。
示例性的,当产生第一提示信息,CMS301可以显示如图7所示的界面;当产生第三提示信息,CMS301可以显示如图8所示的界面。
基于如2所示的后端服务器,参见图9,图9示出根据本申请实施例的一种资源检测方法,如图9所示,该方法包括:
步骤901:检测装置202接收用户触发的针对待下线资源的第二检测指令。
由于待下线资源可能被其他资源所引用,直接下线待下线资源,会导致引用待下线资源的资源(在本申请实施例中将引用待下线资源的资源简称为引用资源)无法正常浏览,不能正常跳转到待下线资源,会产生失效链接。
用户需要下线待下线资源之前,可以触发CMS201向检测装置202发送针对该待下线资源的第二检测指令。
其中,第二检测指令中可以包括该待下线资源或待下线资源的地址信息,示例性的,第二检测指令可以包括待下线资源的HTML文件,还可以包括待下线资源的URL链接,也包括指示该待下线资源的其他信息,本申请实施例并不限定第二检测指令携带的信息,凡是可以指示该待下线资源的信息均可以携带在第二检测指令中。
步骤902:检测装置202根据第二检测指令获取待下线资源的URL链接。
步骤903:检测装置202判断引用待下线网页的URL链接的引用资源的状态。
检测装置202判断引用待下线网页的URL链接的引用资源的状态之前,检测装置202需要确定引用资源,由如图4所示的实施例可知,每当一个资源发布时,检测设备可以记录该资源和该网页引用的资源(被引用资源)的引用关系,还可以记录该资源的状态,建立资源的CMS201链接与资源的状态的对应关系;检测装置202还可以记录资源的下线状态;也就是说,当引用资源发布时,检测装置202会记录引用资源的CMS路径与引用资源的状态的对应关系,记录该引用资源的状态为上线,建立引用资源的CMS路径与引用资源的状态的对应关系。相应的,当引用资源发布后下线,或未发布,检测装置202也可以记 录引用资源的状态为已下线。
示例性的,检测装置202在接收用户触发的针对待下线资源的第二检测指令之前,可以记录待下线资源的CMS路径与引用资源的CMS路径的引用关系;
本申请实施例并不限定引用资源的数量,引用资源可以是一个也可以是多个。
检测装置202在判断引用所述待下线网页的URL链接的引用资源的状态时,可以基于资源的URL链接与资源的CMS路径的映射关系,根据待下线资源的URL链接获取待下线资源的CMS201路径。其中,资源的URL链接与资源的CMS路径的映射关系可以是检测装置202本地保存的,也可以检测装置202从CMS获取的,也可以保存在数据库中,以便检测装置202获取。检测装置202之后再根据待下线资源的CMS路径从引用关系获取引用资源的CMS路径;从引用资源的CMS路径与引用资源的状态的对应关系中查找所述引用资源的状态。
步骤904:检测装置202在确认所述引用资源处于已上线状态的情况下,产生第四提示信息,第四提示信息用于提示下线所述待下线资源会产生失效URL链接。
若引用资源中的任一资源处于上线的状态,表明若该待下线资源下线之后,用户浏览引用资源中的任一资源,会查看该资源中的内容;在浏览该资源的过程中,将无法跳转到该待下线资源这样会造成死链。为了避免这种情况,检测装置202会向CMS201发送第四提示信息,告知若下线该待下线资源会产生失效URL链接。
CMS201在接收到该第四提示消息后,可以向用户提示若下线该带下线资源会存在死链;也可以直接显示该第四提示消息。在确认所述被引用资源在未来时刻下线的情况下,产生第五提示信息,所述第五提示信息用于提示下线所述待下线资源在所述未来时刻到达会产生失效URL链接。
若引用资源中的任一资源会在之后的一个时刻下线,示例性的,引用资源中的任一资源当前为已发布状态,但标注了下线时刻,该下线时刻为未来的某一个时刻,表明之后,在该下线时刻指示的时间,该引用资源中的任一资源会下线;若待下线资源在该引用资源中的任一资源之前下线,在待下线资源下线之后到该引用资源中的任一资源下线之前的时间段内,用户浏览该引用资源中的任一资源也无法正常跳转到待下线资源,同样也会存在死链。为例避免这种情况,检测装置202会向CMS201发送第五提示信息,告知若下线该待下线资源会产生失效URL链接,产生失效URL链接的时间是在未来的某个时刻到达之前,也就是在引用资源中的任一资源的下线时刻之前,会产生失效URL链接。
CMS201在接收到该第五提示消息后,可以向用户提示若下线该待下线资源会存在死链,还可以提示产生失效URL链接的时间;也可以直接显示该第五提示消息。
需要说明的是,CMS201可以在当下需要下线待下线资源时,向检测设备发送第二检测指令,若引用资源中的任一资源会在未来一个时刻下线,则检测设备可以向CMS201发送第五提示消息。CMS201也可以预先检测下在未来的某个时刻(为方便说明,用第一时刻代替)下线待下线资源是否存在死链,若引用资源中的任一资源也会在未来的另一个时刻(为方便说明,用第二时刻代替)下线;若第二时刻先于第一时刻,也就是引用资源中的任一资源比待下线资源的先下线,则待下线资源的下线不会对引用资源中的任一资源产 生影响,不会产生无线链接;若第二时刻晚于第一时刻,也就是引用资源中的任一资源在待下线资源下线之后才下线,则待下线资源的下线会对引用资源中的任一资源产生影响,待下线资源下线之后到该引用资源中的任一资源下线之前的时间段内,用户在浏览该引用资源中的任一资源时无法正常跳转到待下线资源,产生无线链接;检测装置202可以向CMS201发送第五提示消息。
在确认所述被引用资源处于已下线状态的情况下,产生第六提示信息,所述第六提示信息用于提示下线所述待发布资源不会产生失效URL链接。
若引用资源中的所有资源处于均下线,表明若该待下线资源下线之后,用户并不会浏览引用资源中的任一资源,不会存在死链。这种情况下,检测装置202会向CMS201发送第六提示信息,提示下线待下线资源不会产生失效URL链接。
CMS201在接收到该第六提示消息后,可以向用户提示可以正常下线该待下线资源,也可以直接下线该待下线资源,并提示用户该待下线资源已下线。
在待下线资源下线之后,CMS201可以向检测装置202发送下线消息,告知检测装置202待下线资源已下线,检测装置202可以删除已保存的待下线资源与待下线资源引用的资源的引用关系,还可以记录该待下线资源的状态为已下线,或删除记录该待下线资源的状态。
需要说明的是,若待下线资源的类型为文档,待下线文档对应的引用资源可以包括该待下线文档中包括的资源(如网页或图片)等;也就是说,待下线文档中的网页可以引用待发布文档中的其他资源。检测装置202可以忽略该引用资源中属于待发布文档的资源的装置,只确定该引用资源中不属于待下线文档的任一资源是否处于上线状态或是否会在未来时刻下线,若该引用资源中不属于待发布文档的任一资源处于上线状态,检测装置202可以向CMS201发送第四提示消息;若该引用资源中不属于待发布文档的任一资源会在未来时刻下线,检测装置202可以向CMS201发送第五提示消息。若引用资源中均属于待发布文档,检测装置202可以向CMS201发送第六提示消息。CMS201在接收到第一提示消息、第二提示消息、或第三提示消息后执行的操作可以参见前述说明,此处不再赘述。
上述实施例中,检测装置为CMS提供死链检测服务,而在本申请其他实施例中,检测装置也可以如图3所示内置集成于CMS中,即在CMS中实现死链检测,以下将进行具体说明。
请参见图10,图10是根据本发明另一实施例的资源检测方法的流程图,图10所示该方法包括:
步骤1001:CMS301接收用户触发的针对待下线资源的第二检测指令。
示例性的,图11是根据本申请实施例的CMS301的显示界面,如图11所示,用户可以在CMS中的显示界面中点击内容检查,由用户触发针对待下线资源的第二检测指令。
步骤1002:CMS301根据第二检测指令获取待下线资源的URL链接。
CMS301根据第二检测指令获取待下线资源的URL链接的方式可以参见如图9所示的实施例中检测装置202根据第二检测指令获取待下线资源的URL链接的方式,此处不再赘述。
步骤1003:CMS301判断引用所述待下线网页的URL链接的引用资源的状态,在确认所引用资源处于已上线状态的情况下,产生第四提示信息,第四提示信息用于提示下线所述待下线资源会产生失效URL链接。
CMS301判断引用所述待下线网页的URL链接的引用资源的状态可以参见如图9所示的实施例中检测装置202判断引用所述待下线网页的URL链接的引用资源的状态的方式,此处不再赘述。
若引用资源中的任一资源处于已上线状态,产生第四提示信息;若引用资源的任一资源会在未来时刻下线,产生第五提示信息;若引用资源均处于下线状态,产生第六提示信息;产生第四提示消息、第五提示消息、或第六提示消息后CMS301执行的操作可以参见前述内容中CMS301在接收到来自检测装置的第四提示消息、第五提示消息、或第六提示消息后执行的操作,此处不再赘述。
作为一种可能的实施方式,在待发布资源的类型为文档时,该待发布文档发布之后可以替换某一个已发布文档的,待发布文档与该已发布文档比较,可以新增一个或多个资源,实质上,是需要发布新增的一个或多个资源;也可以减少了一个或多个资源,实质上,是需要下线减少的一个或多个资源。例如,待发布文档中包括网页1、网页2、网页5、网页6,待发布文档中包括网页1、网页2、网页3以及网页4,待发布文档与已发布文档比较,新增了网页4、网页5,减少了网页3。待发布文档发布时,新增的一个或多个资源构成第一待发布资源,可选的,第一待发布资源还可以包括待发布文档与该已发布文档中相同的资源;减少的一个或多个资源构成第一待下线资源。针对第一待发布资源可以采用如图4或5所示的实施例进行资源检测,针对第一待下线资源可以采用如图9或10所示的实施例进行资源检测。
基于与方法实施例同一发明构思,本申请实施例还提供了一种检测装置,用于执行上述如图4所示的方法实施例中所述检测设备执行的方法,相关特征可参见上述方法实施例,此处不再赘述,需要说明的是当应用于如图3所示的后端服务器时,该装置也可以用于如图5所示的方法实施例中执行CMS执行的方法。
如图12所示,所述装置1200包括接收单元1201、获取单元1202、判断单元1203以及信息产生单元1204:
接收单元1201,用于接收用户触发的针对待发布资源的第一检测指令.
获取单元1202,用于根据第一检测指令获取在待发布资源中引用的被引用资源的URL链接。
判断单元1203,用于根据所述被引用资源的URL链接判断所述被引用资源的状态。
信息产生单元1204,用于根据被引用资源的URL链接判断被引用资源的状态,在确认被引用资源处于已下线状态的情况下,产生第一提示信息,第一提示信息用于提示发布待发布资源会产生失效URL链接。
可选的,信息产生单元1204在确认被引用资源在未来时刻下线的情况下,可以产生第二提示信息,第二提示信息用于提示发布待发布资源在未来时刻到达时会产生失效URL链接。
可选的,信息产生单元1204还用于在确认被引用资源处于上线状态的情况下,可以产生第三提示信息,第三提示信息用于提示发布待发布资源不会产生失效URL链接。
可选的,获取单元1202在待发布资源发布之后,可以根据待发布资源的URL链接获取待发布资源的内容管理系统CMS路径;以及根据被引用资源的URL链接获取被引用资源的CMS路径。
所述装置还包括记录单元1205,记录单元1205可以记录待发布资源的CMS路径与被引用资源的CMS路径的引用关系,记录待发布资源的状态为已上线状态。并记录待发布资源的CMS路径与待发布资源的状态的对应关系,其中待发布资源的状态记录为已上线状态。
可选的,记录单元1205在接收单元1201接收用户触发的针对待发布资源的第一检测指令之前,可以记录被引用资源的CMS路径和被引用资源的状态的对应关系。
可选的,判断单元1203在根据被引用资源的URL链接判断被引用资源的状态时,可以根据被引用资源的URL链接获取被引用资源的CMS路径;从对应关系中查找与被引用资源的CMS路径对应的被引用资源的状态。
可选的,待发布资源的类型为网元和文档中的一者,被引用资源的类型为网元和文档中的一者,其中文档包括多个网页。
基于与方法实施例同一发明构思,本申请实施例还提供了一种检测装置,用于执行上述如图7所示的方法实施例中所述检测设备执行的方法,相关特征可参见上述方法实施例,此处不再赘述,需要说明的是当应用于如图3所示的后端服务器时,该装置也可以用于执行如图10所示的方法实施例中CMS执行的方法。
如图13所示,该装置1300包括接收单元1301、获取单元1302、判断单元1303以及信息产生单元1304:
接收单元1301,用于接收用户触发的针对待下线资源的第二检测指令;
获取单元1302,用于根据第二检测指令获取待下线资源的统一资源定位符URL链接;
判断单元1303,用于判断引用待下线网页的URL链接的引用资源的状态;
信息产生单元1304,用于在确认引用资源处于已上线状态的情况下,产生第四提示信息,第四提示信息用于提示下线待下线资源会产生失效URL链接。
可选的,信息产生单元1304可以在确认被引用资源在未来时刻下线的情况下,产生第五提示信息,第五提示信息用于提示下线待下线资源在未来时刻到达时会产生失效URL链接。
可选的,信息产生单元1304可以在确认被引用资源处于已下线状态的情况下,产生第六提示信息,第六提示信息用于提示下线待发布资源不会产生失效URL链接。
可选的,该装置还包括记录单元13051005,记录单元1305在接收单元1301接收用户触发的针对待下线资源的第二检测指令之前可以记录待下线资源的CMS路径与引用资源的CMS路径的引用关系;以及记录引用资源的CMS路径与引用资源的状态的对应关系;
判断单元1303在判断引用待下线网页的URL链接的引用资源的状态时,可以根据待下线资源的URL链接获取待下线资源的CMS路径;根据待下线资源的CMS路径从引用关系获取引用资源的CMS路径;从对应关系中查找与引用资源的CMS路径对应的引用资源的状态。
可选的,待发布资源的类型为网页和文档中的一者,被引用资源的类型为网页和文档中的一者或两者。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。在本申请的实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘(solid state drive,SSD)。
在一个简单的实施例中,本领域的技术人员可以想到如图4、9所示的实施例中检测装置或图5、10所示的实施例中CMS可采用图14所示的形式。
如图14所示的装置1400,包括至少一个处理器1401、存储器1402,可选的,还可以包括通信接口1403。
存储器1402可以是易失性存储器,例如随机存取存储器;存储器也可以是非易失性存储器,例如只读存储器,快闪存储器,硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器1402是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器1402可以是上述存储器的组合。
存储器1402可以是易失性存储器,例如随机存取存储器;存储器也可以是非易失性存储器,例如只读存储器,闪存,硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器1402可以是上述存储器的组合。
本申请实施例中不限定上述处理器1401以及存储器1402之间的具体连接介质。
处理器1401可以为CPU,该处理器1401还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件、人工智能芯片、片上芯片等。通用处理器可以是微处理器或者是任何常规的处理器等。具有数据收发功能,能够与其他设备进行通信,在如图12装置中,也可以设置独立的数据收发模块,例如通信接口1403,用于收发数据;处理器1201在与其他设备进行通信时,可以通过通信接口1403进行数据传输,如从接收 第一检测指令或第二检测指令。
当所述检测装置采用图14所示的形式时,图14中的处理器1401可以通过调用存储器1402中存储的计算机执行指令,使得所述检测装置可以执行上述任一方法实施例中的所述检测装置执行的方法。
具体的,图12的接收单元、获取单元、判断单元、信息产生单元以及记录单元的功能/实现过程均可以通过图14中的处理器1401调用存储器1402中存储的计算机执行指令来实现。或者,图12中的获取单元、判断单元、信息产生单元以及记录单元的功能/实现过程可以通过图14中的处理器1401调用存储器1402中存储的计算机执行指令来实现,图12的接收单元的功能/实现过程可以通过图14中的通信接口1403来实现。
具体的,图13的接收单元、获取单元、判断单元、信息产生单元以及记录单元的功能/实现过程均可以通过图14中的处理器1401调用存储器1402中存储的计算机执行指令来实现。或者,图13中的获取单元、判断单元、信息产生单元以及记录单元的功能/实现过程可以通过图14中的处理器1401调用存储器1402中存储的计算机执行指令来实现,图13的接收单元的功能/实现过程可以通过图14中的通信接口1403来实现。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (26)
- 一种资源检测方法,其特征在于,包括:接收用户触发的针对待发布资源的第一检测指令;根据所述第一检测指令获取在所述待发布资源中引用的被引用资源的统一资源定位符URL链接;根据所述被引用资源的URL链接判断所述被引用资源的状态,在确认所述被引用资源处于已下线状态的情况下,产生第一提示信息,所述第一提示信息用于提示发布所述待发布资源会产生失效URL链接。
- 根据权利要求1所述的方法,其特征在于,还包括:在确认所述被引用资源在未来时刻下线的情况下,产生第二提示信息,所述第二提示信息用于提示发布所述待发布资源在所述未来时刻到达时会产生失效URL链接。
- 根据权利要求1所述的方法,其特征在于,还包括:在确认所述被引用资源处于上线状态的情况下,产生第三提示信息,所述第三提示信息用于提示发布所述待发布资源不会产生失效URL链接。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:在所述待发布资源发布之后:根据所述待发布资源的URL链接获取所述待发布资源的内容管理系统CMS路径;根据所述被引用资源的URL链接获取所述被引用资源的CMS路径;记录所述待发布资源的CMS路径与所述被引用资源的CMS路径的引用关系,并记录所述待发布资源的CMS路径与所述待发布资源的状态的对应关系,其中所述待发布资源的状态记录为已上线状态。
- 根据权利要求1至3任一项所述的方法,其特征在于,所述接收用户触发的针对待发布资源的第一检测指令之前,所述方法还包括:记录所述被引用资源的CMS路径和所述被引用资源的状态的对应关系;所述根据所述被引用资源的URL链接判断所述被引用资源的状态,包括:根据所述被引用资源的URL链接获取所述被引用资源的CMS路径;从所述对应关系中查找与所述被引用资源的CMS路径对应的所述被引用资源的状态。
- 根据权利要求1至5任一项所述的方法,其特征在于,所述待发布资源的类型包括网页和文档,所述被引用资源的类型包括网页和文档。
- 一种资源检测方法,其特征在于,包括:接收用户触发的针对待下线资源的第二检测指令;根据所述第二检测指令获取所述待下线资源的统一资源定位符URL链接;判断引用所述待下线网页的URL链接的引用资源的状态,在确认所述引用资源处于已上线状态的情况下,产生第四提示信息,所述第四提示信息用于提示下线所述待下线资源会产生失效URL链接。
- 根据权利要求7所述的方法,其特征在于,还包括:在确认所述被引用资源在未来时刻下线的情况下,产生第五提示信息,所述第五提示信息用于提示下线所述待下线资源在所述未来时刻到达时会产生失效URL链接。
- 根据权利要求7所述的方法,其特征在于,还包括:在确认所述被引用资源处于已下线状态的情况下,产生第六提示信息,所述第六提示信息用于提示下线所述待发布资源不会产生失效URL链接。
- 根据权利要求7至9任一项所述的方法,其特征在于,所述接收用户触发的针对待下线资源的第二检测指令之前,所述方法还包括:记录所述待下线资源的CMS路径与所述引用资源的CMS路径的引用关系;记录所述引用资源的CMS路径与所述引用资源的状态的对应关系;所述判断引用所述待下线网页的URL链接的引用资源的状态,包括:根据所述待下线资源的URL链接获取所述待下线资源的CMS路径;根据所述待下线资源的CMS路径从所述引用关系获取所述引用资源的CMS路径;从所述对应关系中查找与所述引用资源的CMS路径对应的所述引用资源的状态。
- 根据权利要求7至9任一项所述的方法,其特征在于,所述待发布资源的类型包括网页和文档,所述被引用资源的类型包括网页和文档。
- 一种装置,其特征在于,包括:接收单元,用于接收用户触发的针对待发布资源的第一检测指令;获取单元,用于根据所述第一检测指令获取在所述待发布资源中引用的被引用资源的统一资源定位符URL链接;判断单元,用于根据所述被引用资源的URL链接判断所述被引用资源的状态;信息产生单元,用于在确认所述被引用资源处于已下线状态的情况下,产生第一提示信息,所述第一提示信息用于提示发布所述待发布资源会产生失效URL链接。
- 根据权利要求12所述的装置,其特征在于,所述信息产生单元还用于:在确认所述被引用资源在未来时刻下线的情况下,产生第二提示信息,所述第二提示信息用于提示发布所述待发布资源在所述未来时刻到达时会产生失效URL链接。
- 根据权利要求12所述的装置,其特征在于,所述信息产生单元还用于:在确认所述被引用资源处于上线状态的情况下,产生第三提示信息,所述第三提示信息用于提示发布所述待发布资源不会产生失效URL链接。
- 根据权利要求14所述的装置,其特征在于,所述获取单元在所述待发布资源发布之后,还用于:根据所述待发布资源的URL链接获取所述待发布资源的内容管理系统CMS路径;根据所述被引用资源的URL链接获取所述被引用资源的CMS路径;该装置还包括记录单元,所述记录单元,用于记录所述待发布资源的CMS路径与所述被引用资源的CMS路径的引用关系,记录所述待发布资源的状态为已上线状态。并记录所述待发布资源的CMS路径与所述待发布资源的状态的对应关系,其中所述待发布资源的状态记录为已上线状态。
- 根据权利要求12至14任一项所述的装置,其特征在于,所述记录单元在所述接收单元接收用户触发的针对待发布资源的第一检测指令之前,还用于:记录所述被引用资源的CMS路径和所述被引用资源的状态的对应关系;所述判断单元在根据所述被引用资源的URL链接判断所述被引用资源的状态,具体用 于:根据所述被引用资源的URL链接获取所述被引用资源的CMS路径;从所述对应关系中查找与所述被引用资源的CMS路径对应的所述被引用资源的状态。
- 根据权利要求12至16任一项所述的装置,其特征在于,所述待发布资源的类型为网元和文档中的一者,所述被引用资源的类型为网元和文档中的一者或两者,其中所述文档包括多个网页。
- 一种装置,其特征在于,包括:接收单元,用于接收用户触发的针对待下线资源的第二检测指令;获取单元,用于根据所述第二检测指令获取所述待下线资源的统一资源定位符URL链接;判断单元,用于判断引用所述待下线网页的URL链接的引用资源的状态;信息产生单元,用于在确认所述引用资源处于已上线状态的情况下,产生第四提示信息,所述第四提示信息用于提示下线所述待下线资源会产生失效URL链接。
- 根据权利要求18所述的装置,其特征在于,所述信息产生单元,还用于:在确认所述被引用资源在未来时刻下线的情况下,产生第五提示信息,所述第五提示信息用于提示下线所述待下线资源在所述未来时刻到达时会产生失效URL链接。
- 根据权利要求18所述的装置,其特征在于,所述信息产生单元,还用于:在确认所述被引用资源处于已下线状态的情况下,产生第六提示信息,所述第六提示信息用于提示下线所述待发布资源不会产生失效URL链接。
- 根据权利要求18至20任一项所述的装置,其特征在于,该装置还包括记录单元,所述记录单元在所述接收单元接收用户触发的针对待下线资源的第二检测指令之前,还用于:记录所述待下线资源的CMS路径与所述引用资源的CMS路径的引用关系;记录所述引用资源的CMS路径与所述引用资源的状态的对应关系;所述判断单元在判断引用所述待下线网页的URL链接的引用资源的状态,具体用于:根据所述待下线资源的URL链接获取所述待下线资源的CMS路径;根据所述待下线资源的CMS路径从所述引用关系获取所述引用资源的CMS路径;从所述对应关系中查找与所述引用资源的CMS路径对应的所述引用资源的状态。
- 根据权利要求18至20任一项所述的装置,其特征在于,所述待发布资源的类型为网页和文档中的一者,所述被引用资源的类型为网页和文档中的一者。
- 一种装置,其特征在于,包括存储器和处理器;所述存储器存储有程序指令,所述处理器运行所述程序指令以执行权利要求1~6任一所述的方法。
- 一种装置,其特征在于,包括存储器和处理器;所述存储器存储有程序指令,所述处理器运行所述程序指令以执行权利要求7~11任一所述的方法。
- 一种计算机可读存储介质,其特征在于,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求1~6任一所述的方法。
- 一种计算机可读存储介质,其特征在于,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求7~11任一所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910461625.0A CN110347955B (zh) | 2019-05-30 | 2019-05-30 | 一种资源检测方法及装置 |
| CN201910461625.0 | 2019-05-30 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020238567A1 true WO2020238567A1 (zh) | 2020-12-03 |
Family
ID=68174400
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/088786 Ceased WO2020238567A1 (zh) | 2019-05-30 | 2020-05-06 | 一种资源检测方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110347955B (zh) |
| WO (1) | WO2020238567A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110347955B (zh) * | 2019-05-30 | 2023-03-03 | 华为云计算技术有限公司 | 一种资源检测方法及装置 |
| US11196635B1 (en) * | 2020-10-06 | 2021-12-07 | Cyberpion Ltd | Connection detection and prevention of dangling connections |
| CN113343030A (zh) * | 2021-07-07 | 2021-09-03 | 湖南快乐阳光互动娱乐传媒有限公司 | 数据处理的方法、装置、电子设备及计算机可读存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103544308A (zh) * | 2013-11-04 | 2014-01-29 | 北京中搜网络技术股份有限公司 | 一种信息词条的审核方法 |
| CN104317938A (zh) * | 2014-10-31 | 2015-01-28 | 北京国双科技有限公司 | 网页链接有效性验证方法及装置 |
| US20150324478A1 (en) * | 2012-06-18 | 2015-11-12 | Beijing Qihoo Technology Company Limited | Detection method and scanning engine of web pages |
| CN110347955A (zh) * | 2019-05-30 | 2019-10-18 | 华为技术有限公司 | 一种资源检测方法及装置 |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103530297B (zh) * | 2012-07-05 | 2018-02-02 | 北京百度网讯科技有限公司 | 一种自动进行网站分析的方法及装置 |
| 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 |
| CN105893534A (zh) * | 2016-03-31 | 2016-08-24 | 乐视控股(北京)有限公司 | 一种媒体文件删除方法及装置 |
| CN106407462A (zh) * | 2016-10-10 | 2017-02-15 | 北京恒华伟业科技股份有限公司 | 一种文件处理方法及系统 |
| CN107943811B (zh) * | 2016-12-22 | 2021-04-09 | 腾讯科技(北京)有限公司 | 内容的发布方法和装置 |
| CN108304402A (zh) * | 2017-01-12 | 2018-07-20 | 广州市动景计算机科技有限公司 | 外链可用性监控方法和监控装置 |
-
2019
- 2019-05-30 CN CN201910461625.0A patent/CN110347955B/zh active Active
-
2020
- 2020-05-06 WO PCT/CN2020/088786 patent/WO2020238567A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150324478A1 (en) * | 2012-06-18 | 2015-11-12 | Beijing Qihoo Technology Company Limited | Detection method and scanning engine of web pages |
| CN103544308A (zh) * | 2013-11-04 | 2014-01-29 | 北京中搜网络技术股份有限公司 | 一种信息词条的审核方法 |
| CN104317938A (zh) * | 2014-10-31 | 2015-01-28 | 北京国双科技有限公司 | 网页链接有效性验证方法及装置 |
| CN110347955A (zh) * | 2019-05-30 | 2019-10-18 | 华为技术有限公司 | 一种资源检测方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110347955B (zh) | 2023-03-03 |
| CN110347955A (zh) | 2019-10-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112073405B (zh) | 网页数据加载方法、装置、计算机设备及存储介质 | |
| CN110149423B (zh) | 域名处理方法、装置、可读存储介质及电子设备 | |
| CN106708899B (zh) | 自动埋点方法和装置 | |
| US10437907B2 (en) | Link expansion service | |
| US8782799B2 (en) | Triggering a private browsing function of a web browser application program | |
| CN106528657A (zh) | 浏览器跳转至应用程序的控制方法及装置 | |
| CN103812882A (zh) | 一种文件传输的方法及系统 | |
| CN106302595B (zh) | 一种对服务器进行健康检查的方法及设备 | |
| WO2021007752A1 (zh) | 内容分发网络中的回源方法及相关装置 | |
| CN103024053A (zh) | 云存储方法、资源调度系统、云存储节点及系统 | |
| US10574703B1 (en) | Content delivery employing multiple security levels | |
| CN103139279A (zh) | 文件访问方法和系统 | |
| US20130144836A1 (en) | Canonicalization of uniform resource identifiers | |
| CN105069011A (zh) | 用于管理网页收藏夹的方法、装置及系统 | |
| EP3175366A1 (en) | Web redirection for content scanning | |
| WO2020238567A1 (zh) | 一种资源检测方法及装置 | |
| US11574025B2 (en) | Systems and methods for managed asset distribution in a distributed heterogeneous storage environment | |
| CN104572777A (zh) | 基于UIWebView组件的网页加载方法及装置 | |
| CN115080272A (zh) | 一种业务数据处理方法、电子设备及存储介质 | |
| WO2020029588A1 (zh) | 数据读取方法、装置及系统、分布式系统 | |
| US20190303870A1 (en) | Service for receiving obsolete web page copies | |
| CN106412054B (zh) | 将动态网址转换为静态网址的命名方法、系统及其应用 | |
| CN112860720B (zh) | 一种存储容量的更新方法以及装置 | |
| CN104077291A (zh) | 用户生成内容访问次数的发布方法、客户端及系统 | |
| CN112084445A (zh) | 信息处理系统、方法以及设备、存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20813152 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20813152 Country of ref document: EP Kind code of ref document: A1 |