Probe method and device for upper layer link of content distribution node, computer device

By constructing a consistent hash ring within the content distribution node and utilizing normal state node servers for upper-layer link probing, the problem of low efficiency in upper-layer link probing in existing technologies is solved, achieving efficient and accurate execution of probing tasks.

CN119544575BActive Publication Date: 2026-04-24CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2024-11-27
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In content delivery networks, existing technologies cannot efficiently detect the status of upper-layer link servers, resulting in the inability to ensure the detection efficiency and accuracy of upper-layer links during unavailable periods.

Method used

By constructing a consistent hash ring, the normal state node servers within the content distribution node are used to probe the upper-layer links, ensuring that each upper-layer link is probed by only one server, reducing the number of probe requests, and determining the second node server to probe through hash value mapping.

Benefits of technology

It enables efficient execution of upper-layer link probing, reduces the number of probing requests, ensures the efficiency and accuracy of probing tasks, and avoids the propagation of erroneous states caused by failure of the central probing server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544575B_ABST
    Figure CN119544575B_ABST
Patent Text Reader

Abstract

The application relates to a method and device for detecting an upper-layer link of a content distribution node, and a computer device, and is applied to a first node server in the content distribution node. The method comprises the following steps: obtaining link information of an upper-layer link in response to a detection request of the upper-layer link of the first node server; calculating a first hash value of first hash value input data; obtaining a second node server on a consistent hash ring on the basis of the first hash value, the consistent hash ring being obtained on the basis of node servers in a normal state in the content distribution node where the first node server is located; sending the detection request of the upper-layer link to the second node server, so that the second node server detects the upper-layer link on the basis of the detection request; and receiving a detection result of the detection of the upper-layer link by the second node server. The method can improve the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, and computer device for detecting the upper-layer link of a content distribution node. Background Technology

[0002] In a Content Delivery Network (CDN), the service model involves edge nodes receiving user requests and then forwarding them to parent nodes at the upper layer. The parent nodes then forward the requests to the client's origin server. When a node in a CDN forwards a request to an upper-layer link, it needs to avoid sending the request to a faulty server. Therefore, lower-layer links need to probe the servers in the upper-layer links when forwarding requests.

[0003] In related technologies, the status of a server in the upper-layer link can be marked based on the user's actual requests. When a user's actual request fails to reach this server, the server is marked as faulty and remains unavailable for a period of time, during which time the user's actual requests will no longer be forwarded to the faulty server. However, during the unavailable period, the user's actual requests cannot detect whether the upper-layer server has recovered, and the efficiency of the upper-layer link probing cannot be guaranteed. Summary of the Invention

[0004] Based on this, it is necessary to provide a method, apparatus, and computer device for detecting the upper-layer link of a content distribution node to address the aforementioned technical problems.

[0005] Firstly, this application provides a method for detecting the upper-layer link of a content distribution node, applied to a first node server in the content distribution node. The method includes:

[0006] In response to the probe request from the upper-layer link of the first node server, obtain the link information of the upper-layer link;

[0007] Calculate the first hash value of the input data, which is obtained based on the link information;

[0008] The second node server is obtained based on the first hash value. The consistent hash ring is constructed based on the node servers in normal state in the content distribution node where the first node server is located. The node servers in normal state include node servers that normally send requests to the upper layer link and receive responses.

[0009] The probe request of the upper-layer link is sent to the second node server, so that the second node server can probe the upper-layer link based on the probe request;

[0010] Receive the detection results of the second node server probing the upper-layer link.

[0011] In one embodiment, the method further includes:

[0012] The second hash value input data is stored, and the second hash value input data is calculated based on the detection results of the second node server;

[0013] The system periodically retrieves updated probe results from the second node server corresponding to the second hash value input data, based on the second hash value input data.

[0014] In one embodiment, after obtaining the link information of the upper-layer link, the method further includes:

[0015] Based on the link information of the upper-layer link, determine whether the upper-layer link is working properly. In the event of a failure of the upper-layer link, select other upper-layer links that do not include the failed upper-layer link for detection.

[0016] In one embodiment, the method further includes, in the event of failure of all upper-layer links:

[0017] Randomly select any upper-layer link for probing. If no probing result is received, select another upper-layer link for probing.

[0018] In one embodiment, if the second node server does not receive an updated probe result within a preset time, the probe request of the second node server is deleted.

[0019] In one embodiment, the second node server that obtains the consistent hash ring based on the first hash value includes:

[0020] The second hash value of a node server in a normal state is calculated based on a hash function, and the second hash value is mapped to different positions on the hash ring to form a consistent hash ring.

[0021] The first hash value is mapped onto the consistent hash ring to obtain hash values ​​within a preset range, and the corresponding second node server is obtained based on the hash values ​​within the preset range.

[0022] Secondly, this application also provides a detection device for the upper-layer link of a content distribution node, applied to a first node server in the content distribution node, the device comprising:

[0023] The response module is used to respond to the probe request of the upper-layer link from the first node server and obtain the link information of the upper-layer link;

[0024] The calculation module is used to calculate the first hash value of the first hash value input data based on the hash function, wherein the first hash value input data is calculated based on the link information;

[0025] The switching module is used to obtain a second node server on the consistent hash ring based on the first hash value. The consistent hash ring is constructed based on the node servers in the content distribution node where the first node server is located, which are in a normal state. The node servers in a normal state include node servers that normally send requests to the upper layer link and receive responses.

[0026] The sending module is used to send the probe request of the upper-layer link to the second node server, so that the second node server can probe the upper-layer link;

[0027] The receiving module is used to receive the probe results from the second node server.

[0028] In one embodiment, the device further includes:

[0029] The second hash value input data is stored, and the second hash value input data is calculated based on the detection results of the second node server;

[0030] The system periodically retrieves updated probe results from the second node server corresponding to the second hash value input data, based on the second hash value input data.

[0031] In one embodiment, after obtaining the link information of the upper-layer link, the device further includes:

[0032] Based on the link information of the upper-layer link, determine whether the upper-layer link is working properly. In the event of a failure of the upper-layer link, select other upper-layer links that do not include the failed upper-layer link for detection.

[0033] In one embodiment, in the event of a failure of all upper-layer links, the device further includes:

[0034] Randomly select any upper-layer link for probing. If no probing result is received, select another upper-layer link for probing.

[0035] In one embodiment, if the second node server does not receive an updated probe result within a preset time, the probe request of the second node server is deleted.

[0036] In one embodiment, the second node server that obtains the consistent hash ring based on the first hash value includes:

[0037] The second hash value of a node server in a normal state is calculated based on a hash function, and the second hash value is mapped to different positions on the hash ring to form a consistent hash ring.

[0038] The first hash value is mapped onto the consistent hash ring to obtain hash values ​​within a preset range, and the corresponding second node server is obtained based on the hash values ​​within the preset range.

[0039] Thirdly, this disclosure also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement steps of a method for detecting the upper-layer link of a content distribution node.

[0040] Fourthly, this disclosure also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of a method for detecting the upper-layer links of a content distribution node.

[0041] Fifthly, this disclosure also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of a method for detecting the upper-layer links of a content distribution node.

[0042] The above-mentioned method for detecting the upper-layer links of content distribution nodes has at least the following beneficial effects:

[0043] The embodiments provided in this disclosure, for each upper-layer link probe, obtain a first hash value based on the link information of the upper-layer link. A consistent hash ring is constructed based on all available servers within the same content distribution node. The second node server on the consistent hash ring is obtained based on the first hash value, ensuring that only one server within the same content distribution node initiates a probe request to the upper-layer link. This ensures efficient execution of the probe task and reduces the number of probe requests.

[0044] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments or conventional technologies of this disclosure, the accompanying drawings used in the description of the embodiments or conventional technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1This is a schematic diagram of a node actively probing the upper-layer link in one embodiment;

[0047] Figure 2 This is a schematic diagram illustrating how an independent probe server independently probes the upper-layer link in one embodiment;

[0048] Figure 3 This is a flowchart illustrating a method for detecting the upper-layer link of a content distribution node in one embodiment.

[0049] Figure 4 This is a schematic diagram illustrating the determination of the second node server based on a consistent hash ring in one embodiment.

[0050] Figure 5 This is a schematic diagram illustrating a server malfunction in one embodiment;

[0051] Figure 6 This is a schematic diagram illustrating the probing of the upper-layer link of a content distribution node in one embodiment;

[0052] Figure 7 This is a structural block diagram of a detection device for the upper-layer link of a content distribution node in one embodiment;

[0053] Figure 8 This is an internal structural diagram of a computer device in one embodiment;

[0054] Figure 9 This is an internal structure diagram of a server in one embodiment. Detailed Implementation

[0055] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0056] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims. The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitation, the presence of other identical or equivalent elements in a process, method, product, or apparatus that includes said elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any specific order.

[0057] Figure 1 This is a schematic diagram illustrating a node-initiated probing of upper-layer links in one embodiment. Each server within a node probes the servers in the upper-layer link. When a probe request fails, the corresponding upper-layer server is marked as faulty, and the user's data is no longer forwarded to that faulty server. However, each server within a node needs to initiate an independent probe for each upper-layer server. A CDN node typically contains several or even dozens of servers, so probing requests for a single upper-layer server would be increased dozens of times.

[0058] Figure 2 This is a schematic diagram illustrating how an independent probe server independently probes the upper-layer link in one embodiment. The availability of the upper-layer link is centrally probed by a central probe server, and each server within the CDN node obtains the server status of the upper-layer link from the central probe server. However, this reliance on the stability of the central server is too great. If the central probe server fails to probe, all servers in the CDN node will obtain incorrect statuses, leading to upper-layer link anomalies.

[0059] In some embodiments of this disclosure, such as Figure 3 As shown, a method for detecting the upper-layer link of a content distribution node is provided, applied to the first node server in the content distribution node. In a specific embodiment, the method may include the following steps:

[0060] S302: In response to the probe request of the upper-layer link from the first node server, obtain the link information of the upper-layer link.

[0061] In a Content Delivery Network (CDN) architecture, the upper-layer link refers to the layer above the current CDN node. For example, if a user's accelerated domain name has only one layer of edge nodes, then the upper-layer link for the edge nodes is the customer's origin server. If the user's accelerated domain name has a parent node, then the upper-layer link for the edge nodes is the parent node, and the upper-layer link for the parent node is the origin server.

[0062] When a CDN's first-node server receives a probe request from an upper-layer link, it first determines the link information based on user configuration or the CDN's upper-layer link return rules. This link information can include the upper-layer origin domain name, the specified server address, port, and upper-layer protocol. User configuration allows users to configure specific origin return rules on the CDN management platform, specifying which requests should be routed to which upper-layer link server. The CDN network itself also has default origin return rules, which help CDN nodes select the optimal upper-layer link server. For example, the CDN network might select the most suitable upper-layer link server based on factors such as network conditions, latency, and load.

[0063] S304: Calculate the first hash value of the first hash value input data, which is calculated based on the link information.

[0064] The first hash value input data is calculated based on the link information. The link information is converted into a unified string format, and the hash value of the first hash value input data is calculated using a hash function.

[0065] S306: A second node server is obtained on the consistent hash ring based on the first hash value. The consistent hash ring is constructed based on the node servers in the content distribution node where the first node server is located, which are in a normal state. The node servers in a normal state include node servers that normally send requests to the upper layer link and receive responses.

[0066] Figure 4 This is a schematic diagram illustrating the determination of the second node server based on a consistent hashing ring in one embodiment. All servers in the content delivery node are checked to determine which servers are in a normal state. Servers in a normal state are those that can normally send requests to and receive responses from the upper-layer links. A consistent hashing ring is constructed using the node servers in a normal state, and the second node server on the consistent hashing ring is obtained based on the first hash value. Servers within each content delivery node periodically perform availability probes on other servers, which can be achieved by sending heartbeat packets, periodic requests, etc. When a server fails and goes offline, experiences an origin server failure, or a new server is added, the consistent hashing ring is dynamically updated to ensure the accuracy and validity of the hashing ring. Figure 5 This is a schematic diagram of a server malfunction in one embodiment.

[0067] S308: Send the probe request of the upper-layer link to the second node server, so that the second node server can probe the upper-layer link based on the probe request.

[0068] S310: Receive the detection results of the second node server probing the upper-layer link.

[0069] The first node server forwards the probe request for the upper-layer link to the second node server. Upon receiving the probe task, the second node server initiates a probe request for the upper-layer link. Simultaneously, it stores the probe results on the second node server and periodically performs probes, sending the probe results for the upper-layer link back to the first node server. The target server for the probe task, determined through consistent hashing, can be the first server itself.

[0070] In the above-described method for probing the upper-layer links of a content distribution node, a first hash value is obtained based on the link information of each upper-layer link. A consistent hash ring is constructed based on all available servers within the same content distribution node. The second node server on the consistent hash ring is obtained based on the first hash value, ensuring that only one server within the same content distribution node initiates a probe request to the upper-layer link. This ensures efficient execution of the probe task and reduces the number of probe requests.

[0071] In some embodiments of this disclosure, the method further includes:

[0072] The second hash value input data is stored, and the second hash value input data is calculated based on the detection results of the second node server;

[0073] The system periodically retrieves updated probe results from the second node server corresponding to the second hash value input data, based on the second hash value input data.

[0074] Figure 6 This is a schematic diagram illustrating the probing of the upper-layer link of a content distribution node in one embodiment. The first node server receives the probing result from the second node server, generates a second hash value input data based on the probing result, and saves the probing result locally. A scheduled task is set up to periodically request the latest probing status from the second node server corresponding to the second hash value input data, based on the saved task result. After receiving the latest probing status from the second node server, the locally saved probing result is updated.

[0075] In some embodiments of this disclosure, after obtaining the link information of the upper-layer link, the method further includes:

[0076] Based on the link information of the upper-layer link, determine whether the upper-layer link is working properly. In the event of a failure of the upper-layer link, select other upper-layer links that do not include the failed upper-layer link for detection.

[0077] When the first-node server receives a probe request that requires a return to the upper-layer link, it selects a normally functioning upper-layer link based on the link information. If the selected upper-layer link is faulty, the request is not forwarded to that upper-layer link address. Instead, another upper-layer link address is selected according to the return-to-upper-layer strategy, and the same judgment is performed.

[0078] In some embodiments of this disclosure, the method further includes, in the event of failure of all upper-layer links:

[0079] Randomly select any upper-layer link for probing. If no probing result is received, select another upper-layer link for probing.

[0080] If all upper-layer link addresses selected by the first node server according to the back-to-upper-layer strategy are in a fault state in the probe results, then an upper-layer link can be randomly or blindly selected in round-robin to perform the back-to-upper-layer link operation.

[0081] In some embodiments of this disclosure, if the second node server does not receive an updated probe result within a preset time, the probe request of the second node server is deleted.

[0082] If the second-node server does not receive any updated probe results or probe requests from other servers for the upper-layer link within a certain period of time, it will delete the probe task.

[0083] In some embodiments of this disclosure, the second node server on the consistent hash ring based on the first hash value includes:

[0084] The second hash value of a node server in a normal state is calculated based on a hash function, and the second hash value is mapped to different positions on the hash ring to form a consistent hash ring.

[0085] The first hash value is mapped onto the consistent hash ring to obtain hash values ​​within a preset range, and the corresponding second node server is obtained based on the hash values ​​within the preset range.

[0086] Each server calculates a hash value based on its information, such as its IP address or name, and maps this hash value to a location on a virtual ring, forming a consistent hash ring. Each probe request from an upper-layer link calculates a hash value based on the link information it obtains, maps this hash value to a location on the ring, and finds the nearest server node in a clockwise direction on the consistent hash ring. This server node is responsible for storing or processing the data item.

[0087] In one embodiment of this disclosure, an edge node A contains 10 machines, and the internal parent domain name resolution used by the edge node to return to the upper layer has 10 service IPs (Internet Protocol). A specific parent node B contains 20 servers, and parent node B provides origin services for 100 accelerated domain names of users. There are 100 real sources corresponding to its upper layer links, and each source site resolves to multiple real IP addresses of the source sites. For example, each customer source has 5 different source IP addresses.

[0088] When machine 1 of edge node A receives a user's request to return to the parent node, the edge machine, upon selecting a specific parent node IP1, calculates a specific hash value h1 based on the internal domain name of the parent node, the parent node IP, and the port of the parent node.

[0089] Based on this specific hash value h1, in the consistent hashing ring constructed by the 10 machines of edge node A, edge machine 6 is determined to perform the probe task. When each machine on edge node A selects a parent node using ip1 to return to the upper layer, the corresponding probe task, based on the result of the consistent hashing, will be performed by edge machine 6.

[0090] In this way, the 10 parent IPs of the parent upper-layer link corresponding to the edge node will have their corresponding probe tasks roughly evenly distributed and hashed to each edge node machine.

[0091] When IP1 of parent node B receives a real user request and needs to go back to the upstream origin server, assuming the origin domain is www.origin1.com, and this origin domain has 5 IP addresses after DNS resolution, and this origin request needs to go back to IP2, then another hash value h2 is calculated based on www.origin1.com, IP2, and the port of the origin request.

[0092] Based on this specific hash value h2, within the consistent hashing ring constructed by the 20 machines of parent node B, machine 15 of the parent node is determined to perform the probe task. For each machine of parent node B, when needing to trace back to IP2 of www.origin.com, the consistent hash result will uniformly be machine 15. Machine 15 will ultimately send the probe request to the origin server. All other machines will not directly send probe requests to the origin server for IP2 of www.origin.com.

[0093] In this way, the 100 origin IPs from the parent node, totaling 500 origin-to-origin IPs, will have their probing tasks roughly distributed across 20 parent node machines. Furthermore, each IP from a given origin will only be probinged by one parent machine, and the probing results will be synchronized to each parent node machine.

[0094] Suppose that at some point, machine 8 corresponding to parent node B fails and is removed. The other 19 machines on parent node B learn that machine 8 is offline through intra-node probing, rebuild the consistent hash ring after removing machine 8, and then the probing tasks that were previously hashed to machine 8 and returned to the upper-layer source IP will be redistributed to other machines according to the principle of consistent hashing.

[0095] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0096] Based on the same inventive concept, this disclosure also provides a device for detecting the upper-layer link of a content distribution node to implement the above-described method for detecting the upper-layer link of a content distribution node. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations in the embodiments of the device for detecting the upper-layer link of a content distribution node provided below can be found in the limitations of the method for detecting the upper-layer link of a content distribution node described above, and will not be repeated here.

[0097] The apparatus may include a system (including a distributed system), software (application), module, component, server, client, etc., that uses the methods described in the embodiments of this specification, combined with necessary hardware implementation. Based on the same innovative concept, the apparatuses in one or more embodiments provided in this disclosure are as described in the following embodiments. Since the implementation schemes and methods for solving the problem by the apparatus are similar, the implementation of the specific apparatus in the embodiments of this specification can refer to the implementation of the foregoing methods, and repeated details will not be repeated. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatuses described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.

[0098] In one embodiment, such as Figure 7 As shown, a detection device 700 for the upper-layer link of a content distribution node is provided. The device 700 may include:

[0099] The response module 702 is used to respond to the probe request of the upper-layer link from the first node server and obtain the link information of the upper-layer link.

[0100] Calculation module 704 is used to calculate a first hash value of the first hash value input data based on a hash function, wherein the first hash value input data is calculated based on the link information;

[0101] The switching module 706 is used to obtain a second node server on the consistent hash ring based on the first hash value. The consistent hash ring is constructed based on the node servers in the content distribution node where the first node server is located, which are in a normal state. The node servers in a normal state include node servers that normally send requests to the upper layer link and receive responses.

[0102] The sending module 708 is used to send the probe request of the upper-layer link to the second node server, so that the second node server can probe the upper-layer link;

[0103] The receiving module 710 is used to receive the detection results from the second node server.

[0104] In one embodiment, the device further includes:

[0105] The second hash value input data is stored, and the second hash value input data is calculated based on the detection results of the second node server;

[0106] The system periodically retrieves updated probe results from the second node server corresponding to the second hash value input data, based on the second hash value input data.

[0107] In one embodiment, after obtaining the link information of the upper-layer link, the device further includes:

[0108] Based on the link information of the upper-layer link, determine whether the upper-layer link is working properly. In the event of a failure of the upper-layer link, select other upper-layer links that do not include the failed upper-layer link for detection.

[0109] In one embodiment, in the event of a failure of all upper-layer links, the device further includes:

[0110] Randomly select any upper-layer link for probing. If no probing result is received, select another upper-layer link for probing.

[0111] In one embodiment, if the second node server does not receive an updated probe result within a preset time, the probe request of the second node server is deleted.

[0112] In one embodiment, the second node server that obtains the consistent hash ring based on the first hash value includes:

[0113] The second hash value of a node server in a normal state is calculated based on a hash function, and the second hash value is mapped to different positions on the hash ring to form a consistent hash ring.

[0114] The first hash value is mapped onto the consistent hash ring to obtain hash values ​​within a preset range, and the corresponding second node server is obtained based on the hash values ​​within the preset range.

[0115] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0116] The modules in the aforementioned detection device for the upper-layer link of the content distribution node can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0117] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores probe requests. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for probing the upper-layer links of a content distribution node.

[0118] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for detecting the upper-layer link of the content distribution node. The display screen can be an LCD screen or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0119] Those skilled in the art will understand that Figure 8 , Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the computer device to which the present disclosure is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0120] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the methods described in any embodiment of this disclosure.

[0121] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the methods described in any embodiment of this disclosure.

[0122] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this disclosure may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this disclosure may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0123] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0124] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent disclosure. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the appended claims.

Claims

1. A method for detecting the upper-layer link of a content distribution node, characterized in that, The method, applied to the first node server in the content distribution node, includes: In response to the probe request from the upper-layer link of the first node server, obtain the link information of the upper-layer link; Calculate the first hash value of the input data, which is obtained based on the link information; The second node server on the consistent hash ring is obtained based on the first hash value. The consistent hash ring is constructed based on the node servers in the normal state in the content distribution node where the first node server is located. The node servers in the normal state include node servers that normally send requests to the upper layer link and receive responses. In this case, a unique second node server is assigned within the same content distribution node for the same upper layer link to perform probing. The probe request of the upper-layer link is sent to the second node server, so that the second node server can probe the upper-layer link based on the probe request; The system receives the detection results of the second node server probing the upper-layer link and synchronizes the detection results to all other node servers within the content distribution node, so that other node servers can directly call the system without repeating the detection.

2. The method according to claim 1, characterized in that, The method further includes: The second hash value input data is stored, and the second hash value input data is calculated based on the detection results of the second node server; The system periodically retrieves updated probe results from the second node server corresponding to the second hash value input data, based on the second hash value input data.

3. The method according to claim 1, characterized in that, After obtaining the link information of the upper-layer link, the method further includes: Based on the link information of the upper-layer link, determine whether the upper-layer link is working properly. In the event of a failure of the upper-layer link, select other upper-layer links that do not include the failed upper-layer link for detection.

4. The method according to claim 3, characterized in that, In the event of failure of all upper-layer links, the method further includes: Randomly select any upper-layer link for probing. If no probing result is received, select another upper-layer link for probing.

5. The method according to claim 2, characterized in that, If the second node server does not receive an updated probe result within a preset time, the probe request to the second node server is deleted.

6. The method according to claim 1, characterized in that, The second node server on the consistent hash ring based on the first hash value includes: The second hash value of a node server in a normal state is calculated based on a hash function, and the second hash value is mapped to different positions on the hash ring to form a consistent hash ring. The first hash value is mapped onto the consistent hash ring to obtain hash values ​​within a preset range, and the corresponding second node server is obtained based on the hash values ​​within the preset range.

7. A detection device for the upper-layer link of a content distribution node, characterized in that, The apparatus is applied to the first node server in the content distribution node, and includes: The response module is used to respond to the probe request of the upper-layer link from the first node server and obtain the link information of the upper-layer link; The calculation module is used to calculate the first hash value of the first hash value input data based on the hash function, wherein the first hash value input data is calculated based on the link information; The switching module is used to obtain a second node server on the consistent hash ring based on the first hash value. The consistent hash ring is constructed based on the node servers in the normal state in the content distribution node where the first node server is located. The node servers in the normal state include node servers that normally send requests to the upper-layer link and receive responses. In this case, a unique second node server is assigned within the same content distribution node to perform probing for the same upper-layer link. The sending module is used to send the probe request of the upper-layer link to the second node server, so that the second node server can probe the upper-layer link; The receiving module is used to receive the probe results from the second node server and synchronize the probe results to all other node servers within the content distribution node, so that other node servers can directly call them without repeating the probe.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method, device and system for probing link quality

    CN102136969A

  • Distributed message distribution method and device based on consistent hash and scheduling node

    CN110888735A