Performance data detection method, device, computer equipment, and storage medium

By obtaining and updating the first request timestamp in the content distribution network and dynamically adjusting the execution of the detection task, the problem of low resource utilization in the CDN network is solved, and more efficient resource utilization and detection task matching is achieved.

CN120128511BActive Publication Date: 2025-08-26CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510610966.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-26
Estimated Expiration
2045-05-13

AI Technical Summary

Technical Problem

In the prior art, the content distribution network (CDN) uses a fixed-cycle detection method to perform network quality detection, resulting in increased server processing pressure and decreased resource utilization.

Method used

By obtaining the first request timestamp of the content distribution node, selecting the latest timestamp as the target timestamp, dynamically update the detection task according to the task status and count, avoiding detection requests when there is no user access for a long time, and dynamically adjusting the execution of the detection task.

Benefits of technology

It improves the resource utilization rate of the content distribution network, reduces unnecessary detection overhead, optimizes the data synchronization of the CDN accelerates the link, and ensures that the detection tasks match the access situation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120128511B_ABST
    Figure CN120128511B_ABST
Patent Text Reader

Abstract

The present application relates to a performance data detection method, apparatus, computer equipment, and storage medium. The method is applied to a content distribution network including multiple content distribution nodes, and is used to respond to user requests for acceleration domain names, including: obtaining the first request timestamps of multiple content distribution nodes for each acceleration domain name; the first request timestamp is used to record the latest user request time of the acceleration domain name to the content distribution node; selecting the latest first request timestamp as the target timestamp, and updating the task status of the detection task corresponding to the acceleration domain name based on the current time and the target timestamp; the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect the performance data of the content distribution node; updating the task count of the detection task based on the task status; and executing the detection task based on the task status and task count. The use of this method can improve the resource utilization of the content distribution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a performance data detection method, apparatus, computer equipment, storage medium, and computer program product. Background Art

[0002] In today's internet landscape, CDN (Content Delivery Network) dynamic acceleration technology is widely used to optimize user experience. For dynamic requests involving business scenarios like database queries, personalized recommendations, and real-time interactions, CDNs must efficiently return data to the source to ensure real-time data and stable access.

[0003] To this end, relevant technologies typically use periodic probing to test network quality at the origin server and transit nodes to obtain key probing metrics such as RTT (round-trip time), packet loss rate, download speed, and first packet time. The CDN's routing decision center then selects the optimal back-to-origin link based on this data, ensuring fast and reliable transmission of dynamic requests.

[0004] However, for large-scale CDN networks, this fixed-period detection method increases the processing pressure of the server and leads to a decrease in resource utilization. Summary of the Invention

[0005] Based on this, it is necessary to provide a performance data detection method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the utilization rate of content distribution network resources in response to the above technical problems.

[0006] In a first aspect, the present application provides a performance data detection method, which is applied to a content distribution network, wherein the content distribution network includes multiple content distribution nodes for responding to user requests for accelerated domain names, and the method includes:

[0007] For each of the acceleration domain names, obtaining first request timestamps of the plurality of content distribution nodes; the first request timestamp is used to record the time of the latest user request of the acceleration domain name to the content distribution node;

[0008] Selecting the latest first request timestamp as the target timestamp, and updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect the performance data of the content distribution node;

[0009] Updating the task count of the detection task according to the task status;

[0010] The detection task is executed according to the task state and the task count.

[0011] In one embodiment, updating the task count of the detection task according to the task status includes:

[0012] In a case where the task state before the update is an inactive state and the task state after the update is an active state, registering the detection task and adding 1 to the task count of the detection task;

[0013] When the task state before the update is an active state and the task state after the update is an inactive state, the task count of the detection task is reduced by 1;

[0014] When the task status before and after the update is both active, the task count is updated according to the change of the content distribution node corresponding to the acceleration domain name.

[0015] In one embodiment, updating the task count according to changes in the content distribution node corresponding to the acceleration domain name includes:

[0016] When the content distribution node corresponding to the acceleration domain name changes, perform the following steps:

[0017] For the changed content distribution node, register the detection task, and add 1 to the task count of the newly registered detection task;

[0018] For the content distribution node before the change, the task count of the detection task is reduced by 1.

[0019] In one embodiment, executing the detection task according to the task status and the task count includes:

[0020] When the task status is in an inactive state, suspending execution of the detection task;

[0021] When the task count is 0, the detection task is cancelled.

[0022] In one embodiment, after updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp, the method includes:

[0023] When the task status is active, obtaining a second request timestamp of an adjacent transfer node of the content distribution node; the second request timestamp is used to record the latest user request time of the acceleration domain name to the adjacent transfer node;

[0024] comparing the second request timestamp with the target timestamp;

[0025] In a case where the target timestamp is greater than the second request timestamp, the second request timestamp is updated according to the target timestamp.

[0026] In one embodiment, updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp includes:

[0027] If the time difference between the current time and the time corresponding to the target timestamp is greater than a preset time threshold, determining that the task status of the new detection task corresponding to the acceleration domain name is inactive;

[0028] When the time difference between the current moment and the moment corresponding to the target timestamp is less than or equal to a preset duration threshold, the task state of the new detection task corresponding to the acceleration domain name is determined to be active.

[0029] In a second aspect, the present application further provides a performance data detection device, which is applied to a content distribution network, wherein the content distribution network includes multiple content distribution nodes for responding to user requests for accelerated domain names, and the device includes:

[0030] A data acquisition module, configured to acquire, for each of the acceleration domain names, first request timestamps of the plurality of content distribution nodes; the first request timestamp is used to record the time of the latest user request from the acceleration domain name to the content distribution node;

[0031] a status update module, configured to select the latest first request timestamp as a target timestamp and update the task status of a detection task corresponding to the acceleration domain name based on the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names and is used to detect performance data of the content distribution node;

[0032] A task counting module, configured to update the task count of the detection task according to the task status;

[0033] A task processing module is used to execute the detection task according to the task status and the task count.

[0034] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0035] For each of the acceleration domain names, obtaining first request timestamps of the plurality of content distribution nodes; the first request timestamp is used to record the time of the latest user request of the acceleration domain name to the content distribution node;

[0036] Selecting the latest first request timestamp as the target timestamp, and updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect the performance data of the content distribution node;

[0037] Updating the task count of the detection task according to the task status;

[0038] The detection task is executed according to the task state and the task count.

[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0040] For each of the acceleration domain names, obtaining first request timestamps of the plurality of content distribution nodes; the first request timestamp is used to record the time of the latest user request of the acceleration domain name to the content distribution node;

[0041] Selecting the latest first request timestamp as the target timestamp, and updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect the performance data of the content distribution node;

[0042] Updating the task count of the detection task according to the task status;

[0043] The detection task is executed according to the task state and the task count.

[0044] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0045] For each of the acceleration domain names, obtaining first request timestamps of the plurality of content distribution nodes; the first request timestamp is used to record the time of the latest user request of the acceleration domain name to the content distribution node;

[0046] Selecting the latest first request timestamp as the target timestamp, and updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect the performance data of the content distribution node;

[0047] Updating the task count of the detection task according to the task status;

[0048] The detection task is executed according to the task state and the task count.

[0049] The above-mentioned performance data detection method, apparatus, computer device, storage medium, and computer program product are applied to a content distribution network including multiple content distribution nodes. For each acceleration domain name, the first request timestamps of the multiple content distribution nodes are obtained to obtain the latest user request time of the acceleration domain name to the content distribution node. The content distribution network is used to respond to user requests of the acceleration domain name. Therefore, the first request timestamp can represent the time when the corresponding acceleration domain name last issued a user request to each content distribution node. Next, the latest first request timestamp is selected as the target timestamp, which can represent the time when the corresponding acceleration domain name last issued a user request to the content distribution network. The task status of the detection task corresponding to the acceleration domain name is updated based on the current time and the target timestamp. The detection task is used to detect performance data of the content distribution node and corresponds to one or more acceleration domain names. The task count of the detection task is updated based on the obtained task status. It is possible to determine whether the detection task is necessary to execute based on the user request issued by at least one acceleration domain name. Finally, the detection task is executed based on the task status and task count. It is possible to dynamically determine whether the detection task should be executed based on the user request received by the content distribution node, thereby avoiding the continuous execution of detection requests when there is no user access for a long time, saving unnecessary detection overhead, and improving the resource utilization of the content distribution network. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 A diagram of an application environment of a performance data detection method in one embodiment;

[0052] Figure 2 1 is a flow chart of a performance data detection method according to an embodiment;

[0053] Figure 3 A schematic diagram of the interactive relationship between a configuration platform, a management server, and multiple nodes in a performance data detection method in one embodiment;

[0054] Figure 4 Schematic diagram of the flow of step S206 of the performance data detection method in one embodiment;

[0055] Figure 5 is a structural block diagram of a performance data detection device in one embodiment;

[0056] Figure 6 is a diagram of the internal structure of a computer device in one embodiment;

[0057] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0059] The performance data detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network, and the terminal 102 can be used to receive user requests and send user requests to the server 104. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store the first request timestamps of multiple content distribution nodes, as well as information such as the correspondence between the acceleration domain name and the detection task. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0060] In an exemplary embodiment, Figure 2 As shown, a performance data detection method is provided, which is applied to Figure 1 The server 104 in the example is used to illustrate that the method can be applied to a content distribution network, which includes multiple content distribution nodes for responding to user requests for accelerated domain names, such as Figure 3As shown, server 104 may include a configuration platform, multiple management servers, and multiple cache hosts. The configuration platform is used to send the acceleration domain name configuration to the management server based on user requests. After receiving the acceleration domain name configuration, the management server is used to perform channel-by-channel configuration analysis and send HTTP requests to the multiple cache hosts based on the configuration analysis results. The multiple cache hosts are used to form multiple content distribution nodes, which are divided into edge nodes and transit nodes. The steps S202 to S208 are included. Herein,

[0061] Step S202: For each acceleration domain name, obtain the first request timestamps of multiple content distribution nodes.

[0062] The first request timestamp is used to record the latest user request time of the acceleration domain name to the content distribution node.

[0063] For example, the management server can periodically initiate batch HTTP requests to multiple cache hosts. For example, assuming there are three acceleration domains A, B, and C, the management server can send batch HTTP requests to the cache hosts within its management scope at once to query the user request timestamps for multiple acceleration domains. After receiving the query request, the cache host can return the latest user request timestamp for each acceleration domain based on its own access log or database as the first request timestamp.

[0064] Step S204: Select the latest first request timestamp as the target timestamp, and update the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp.

[0065] Among them, the detection task corresponds to one or more acceleration domain names. The detection task is used to detect the performance data of the content distribution node, such as round-trip delay, packet loss rate, download rate and first packet time.

[0066] For example, the target timestamp can be expressed as Timestamp1:

[0067] Timestamp1=max{RS1_Timestamp1,RS2_Timestamp1,...,RSn_Timestamp1}

[0068] RS1_Timestamp1 represents the latest timestamp (first request timestamp) of the user request from cache host 1, RS2_Timestamp1 represents the latest timestamp (first request timestamp) of the user request from cache host 2, and so on. The node has a total of n cache hosts. For example, there are three cache hosts RS1, RS2, and RS3, which return the following timestamp data respectively: RS1 returns: Domain name A (2024-03-19 12:00:01), Domain name B (2024-03-19 11:58:30), Domain name C (2024-03-19 12:01:15); RS2 returns: Domain name A (2024-03-19 12:00:05), Domain name B (2024 -03-1911:59:10), domain name C (2024-03-1912:00:45); RS3 returns: domain name A (2024-03-1911:59:55), domain name B (2024-03-1911:59:00), domain name C (2024-03-1912:00:30). After collecting this data, the management server selects the largest timestamp as the target timestamp.

[0069] The management server then compares the target timestamp with the current system time to determine whether the detection task is still valid. For example, server 104 may determine that the task status of the detection task corresponding to the new acceleration domain name is inactive if the time difference between the current time and the time corresponding to the target timestamp is greater than a preset duration threshold. If the time difference between the current time and the time corresponding to the target timestamp is less than or equal to the preset duration threshold, the task status of the detection task corresponding to the new acceleration domain name is active.

[0070] Furthermore, the current system time is 12:05:00, and the validity period of the detection task is set to 5 minutes. The calculated time difference is 12:05:00-12:00:10=4 minutes and 50 seconds, which is still within the validity period. Therefore, the management server can mark the status of the detection task as 1, indicating that the task is active, and continue to perform the detection operation to collect performance data of the content distribution node. If the management server finds that the time difference between the current time and the target timestamp exceeds the validity period of the detection task, it means that the accelerated domain name has not been accessed by the user for a long time, and the detection task should be marked as inactive. For example, if the current system time is 12:06:00 and the target timestamp is still 12:00:10, the time difference is 6 minutes, which exceeds the validity period of 5 minutes. In this case, the management server can mark the status of the detection task as 0, indicating that the task is no longer active, and the subsequent process will handle the subsequent operations of the inactive task.

[0071] Exemplarily, the server 104 can also obtain the second request timestamp of the adjacent transit node of the content distribution node when the task status is active; the second request timestamp is used to record the latest user request time of the acceleration domain name to the adjacent transit node; compare the second request timestamp and the target timestamp; when the target timestamp is greater than the second request timestamp, update the second request timestamp according to the target timestamp.

[0072] Furthermore, the management server of server 104 can send an HTTP request to the adjacent relay node associated with the active acceleration domain name, notifying the node of the target timestamp for the domain name. For example, if server 104 determines that the target timestamp for acceleration domain name A is 12:00:10, it can send this timestamp to the adjacent relay node for the domain name, requesting it to update its local timestamp record.

[0073] After receiving the target timestamp, the adjacent transit node can compare it with the existing timestamp of the latest request for the acceleration domain name. For example, if the second request timestamp (Timestamp2) of the acceleration domain name currently stored on a neighboring transit node is 11:59:50, and the target timestamp (Timestamp1) sent by server 104 is 12:00:10, the neighboring transit node can compare the two timestamps and take the larger one as the latest timestamp, that is, max(12:00:10, 11:59:50) = 12:00:10. The node then updates the value in memory as the latest user request time for the acceleration domain name on the neighboring transit node.

[0074] If the adjacent transit node finds that the Timestamp2 stored in itself is larger than the target timestamp sent by the management server, for example, the local Timestamp2 is 12:00:15, and the Timestamp1 sent by server 104 is 12:00:10, the adjacent transit node does not need to be updated and still maintains the current Timestamp2=12:00:15, ensuring that the timestamp update always keeps the latest user request time and will not be overwritten by an earlier time, thereby optimizing the data synchronization of the entire CDN acceleration link and enabling subsequent detection tasks to be adjusted based on the latest access situation.

[0075] Step S206: Update the task count of the detection task according to the task status.

[0076] The task count of the detection task is used to track the activity of each detection task to ensure proper detection and performance monitoring of the acceleration domain name. For example, if the task status before the update is inactive and the task status after the update is active, the management server can register the detection task and increase the task count of the detection task by 1; if the task status before the update is active and the task status after the update is inactive, the task count of the detection task can be reduced by 1.

[0077] Furthermore, the management server of server 104 can obtain the status mark of the last detection task and the status mark of the current detection task respectively. If the status mark of the last task is 0 (indicating an inactive state) and the current status mark is 1 (indicating an active state), then it can be considered that the detection task of the domain name has switched from an inactive state to an active state. In this case, the management server can immediately register the detection tasks of all content distribution nodes (including source stations and transit nodes) of the acceleration domain name. Exemplarily, all relevant source station IPs (addresses) and transit node IPs can be added to the detection task, and the detection task counts of these IPs will increase by 1, indicating that these nodes need to participate in the execution of the detection task. For example, if the source station and transit node of an acceleration domain name have three IPs respectively, then the detection task counts of these three IPs will increase to 1, indicating that they need to start participating in regular performance monitoring and data detection.

[0078] Conversely, if the previous task status was marked as 1 (active) and the current task status is 0 (inactive), the domain name's probe task is considered to have switched from active to inactive. At this point, the management server can decrement the probe task counts of the relevant source servers and transit nodes by 1. This decrement indicates that the probe task for these IP addresses will no longer be executed. For example, if an IP address previously had a probe task count of 1 and the domain name's status becomes inactive, the probe task count for that IP address will be reduced to 0, indicating that the probe task for that node has ended. This process ensures efficient management of probe tasks and avoids redundant probe requests. When a probe task is active, the system increases the corresponding probe load. When a probe task is no longer needed, the corresponding task count is reduced, thereby reducing the system's probe pressure. In this way, the system can dynamically adjust the number of probe tasks, improving efficiency and reducing unnecessary resource consumption.

[0079] Step S208: Execute the detection task according to the task status and task count.

[0080] For example, the server 104 may suspend the execution of the detection task when the task status is in an inactive state; and cancel the detection task when the task count is 0.

[0081] Furthermore, the task status of a probe task reflects whether it needs to continue, while the task count indicates how many acceleration domains are currently using the probe task for the same set of origin servers or transit nodes. Therefore, server 104 can determine whether the probe task count is 0. If the count is 0, it means that no acceleration domain is using the probe task. In this case, server 104 can cancel the probe task for the relevant origin servers or transit nodes, stopping performance profiling of these nodes. This cancellation operation effectively avoids invalid probe requests for nodes that no longer need to be probed, thereby saving resources.

[0082] If the task count is not 0, it means that there are still other accelerated domain names sharing the same source station or transit node detection task. In this case, server 104 will not cancel the detection task, but will continue to maintain the operation of these tasks to ensure that the performance of each domain name can be continuously monitored. In this way, the system can avoid redundant detection of the source station or transit node, thereby reducing the load on the node, improving efficiency, and helping to reduce the amount of detection of the source station and transit node, especially when some accelerated domain names have no customer visits or low traffic, avoiding unnecessary detection of these domain names, thereby reducing the burden on the source station and transit node. In addition, as more customers access dynamic acceleration, the increase in the number of detection tasks may have an impact on system performance. Therefore, by efficiently managing the registration and cancellation of different accelerated domain names sharing the same detection tasks, the system can continue to provide efficient and reliable content distribution services without affecting performance.

[0083] The above-mentioned performance data detection method is applied to a content distribution network including multiple content distribution nodes. For each acceleration domain name, the first request timestamps of the multiple content distribution nodes are obtained to obtain the time of the latest user request from the acceleration domain name to the content distribution node. The content distribution network is used to respond to user requests from the acceleration domain name. Therefore, the first request timestamp can represent the time when the corresponding acceleration domain name last issued a user request to each content distribution node. Next, the latest first request timestamp is selected as the target timestamp, which can represent the time when the corresponding acceleration domain name last issued a user request to the content distribution network. The task status of the detection task corresponding to the acceleration domain name is updated based on the current time and the target timestamp. The detection task is used to detect performance data of the content distribution node and corresponds to one or more acceleration domain names. The task count of the detection task is updated based on the obtained task status. It is possible to determine whether the detection task is necessary to execute based on the user request issued by at least one acceleration domain name. Finally, the detection task is executed based on the task status and task count. It is possible to dynamically determine whether the detection task should be executed based on the user request received by the content distribution node, thereby avoiding the continuous execution of detection requests when there is no user access for a long time, saving unnecessary detection overhead, and improving the resource utilization of the content distribution network.

[0084] In an exemplary embodiment, Figure 4 As shown, step S206 includes steps S302 to S306.

[0085] Step S302 : When the task state before the update is inactive and the task state after the update is active, register the detection task and increase the task count of the detection task by 1.

[0086] For example, when the task status of an acceleration domain changes from inactive to active, indicating that a user has begun accessing the acceleration domain, server 104 can register a new detection task and ensure that the detection task can monitor the performance data of the origin server and transit nodes. Therefore, in this case, server 104 can perform the detection task registration operation and simultaneously increase the task count by 1 to indicate that a new acceleration domain is using the detection task.

[0087] Step S304 : when the task status before the update is active and the task status after the update is inactive, the task count of the detection task is reduced by 1.

[0088] For example, when the status of a detection task changes from active to inactive, it indicates that there are no more user requests for the acceleration domain name, and server 104 needs to reduce the detection task count. At this time, server 104 can reduce the task count of the detection task by 1 to reflect the decrease in the number of acceleration domain names currently using the task. If the task count drops to 0, it means that no acceleration domain name is using the detection task. At this time, server 104 can enter the subsequent task deregistration process and stop detecting the origin server or transit node to reduce unnecessary resource consumption.

[0089] Step S306: When the task status before and after the update is both active, the task count is updated according to the change of the content distribution node corresponding to the acceleration domain name.

[0090] Even if the channel configuration remains unchanged, adjustments to the domain name resolution group coverage may cause changes in DNS (Domain Name System) resolution, leading to changes in content distribution nodes (origin server and transit parent node). DNS resolution changes occur when the domain name resolution result changes, potentially resulting in new source IP addresses or transit parent node IP addresses, or existing IP addresses becoming invalid. In this case, the system must make corresponding adjustments to ensure stable and accurate back-to-origin delivery of the accelerated domain name. If the resolution result changes, the new source IP address and transit parent node IP address must be registered as probe tasks, and performance probes must be initiated for these new nodes. This ensures that the new origin server and transit node correctly participate in acceleration and back-to-origin link selection, and that the latest performance data is obtained in a timely manner. The management server must also deregister the probe tasks for the old source IP address and transit parent node IP address to avoid wasting computing resources and creating unnecessary load.

[0091] Therefore, in this embodiment, the management server can launch an independent coroutine (i.e., a lightweight task that executes concurrently) to periodically perform DNS resolution operations on the origin domain name and the transit parent node domain name. The coroutine's role is to regularly check for changes in DNS resolution and promptly update the resolution results, ensuring that the detection tasks within the system are always up to date and that the return path for the accelerated domain name selects the correct and valid source IP address and transit parent node IP address.

[0092] Exemplarily, when the content distribution node corresponding to the acceleration domain name changes, the server 104 may perform the following steps: register a detection task for the content distribution node after the change, and add 1 to the task count of the newly registered detection task; and subtract 1 from the task count of the detection task for the content distribution node before the change.

[0093] Furthermore, when the server 104 handles the situation where the content distribution node of the accelerated domain name may change. First, the server 104 can determine whether the detection task of the domain name was active last time. If the previous task status was active, the server 104 can further check whether the source station and the transit parent node have changed. If the source station and the transit parent node have changed, the server 104 can take a series of operations to update the task count of the detection task. Specifically, the server 104 can register new detection tasks for the new source IP and the new transit parent node IP, and add 1 to the task count of these newly registered detection tasks. As the source station or transit node of the accelerated domain name changes, the new nodes need to be monitored and detected so that the performance data of these nodes can be obtained in a timely manner, so as to make reasonable routing decisions. At the same time, the server 104 will also reduce the task count of the detection task by 1 for the old source IP and the old transit parent node IP, thereby reflecting that these nodes no longer need detection tasks, reducing the burden on the system.

[0094] In addition, if the source station or transit parent node has not changed, then server 104 does not need to do any additional processing, and the task count and detection task remain unchanged, thereby ensuring that the task count is adjusted only when the actual network topology of the acceleration domain name changes, thereby efficiently managing the detection task and reducing redundant performance consumption.

[0095] In another exemplary embodiment, in order to timely update the detection task status of all acceleration domain names under the channel directory, the management server starts an independent coroutine, regularly initiates HTTP requests, and batch queries the maximum timestamps of user requests for each acceleration domain name to the cache host group (including edge nodes and transit nodes) covered by the management server to determine whether the request of each acceleration domain name is still active.

[0096] During execution, the management server first obtains the maximum request timestamp for each accelerated domain name as the first request timestamp, compares it to the target timestamp, and determines the task status of whether the detection task is active. If the current domain name request is active, and the previous request for the domain name was inactive, the detection task status for the domain name is marked as 1, indicating that the detection task has become active. At this time, the management server notifies the corresponding transit nodes of the latest timestamp and immediately registers the detection tasks for all source station IPs and transit node IPs of the domain name. The detection task count for each newly registered source station IP and transit parent node IP is increased by 1.

[0097] On the contrary, if the current request is inactive and the last request was active, the management server marks the detection task status of the domain name as 0, indicating that the task has become inactive. At this time, the management server reduces the detection task counts of all source IPs and transit parent node IPs. If the detection task count of an IP is 0, the management server will cancel the detection task corresponding to the IP. If the detection task count is still greater than 0, it means that the IP is still shared by other accelerated domain names, so the detection task cannot be cancelled. The management server can effectively update the detection task status of the accelerated domain name, ensuring that no redundant detection is performed and avoiding unnecessary performance consumption. It also ensures that the detection tasks of the source station and transit node are always consistent with the actual access status of the accelerated domain name.

[0098] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0099] Based on the same inventive concept, embodiments of the present application also provide a performance data detection device for implementing the aforementioned performance data detection method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more embodiments of the performance data detection device provided below can be found in the above-mentioned limitations on the performance data detection method and will not be further elaborated here.

[0100] In an exemplary embodiment, Figure 5 As shown, a performance data detection device is provided. The device is applied to a content distribution network. The content distribution network includes multiple content distribution nodes, which are used to respond to user requests for accelerated domain names. The device includes: a data acquisition module 402, a status update module 404, a task counting module 406, and a task processing module 408, wherein:

[0101] Data acquisition module 402 is used to obtain the first request timestamps of multiple content distribution nodes for each acceleration domain name. The first request timestamp is used to record the time of the latest user request from the acceleration domain name to the content distribution node.

[0102] Status update module 404 is configured to select the latest first request timestamp as the target timestamp and update the task status of the detection task corresponding to the acceleration domain name based on the current time and the target timestamp. The detection task corresponds to one or more acceleration domain names and is used to detect performance data of the content distribution node.

[0103] A task counting module 406 is used to update the task count of the detection task according to the task status;

[0104] The task processing module 408 is configured to execute the detection task according to the task status and task count.

[0105] In one embodiment, the task counting module 406 includes:

[0106] The first counting unit is configured to register the detection task and increase the task count of the detection task by 1 when the task state before the update is inactive and the task state after the update is active; and to decrease the task count of the detection task by 1 when the task state before the update is active and the task state after the update is inactive;

[0107] The second counting unit is configured to update the task count according to changes in the content distribution node corresponding to the acceleration domain name when both the task status before and after the update are active.

[0108] In one embodiment, the second counting unit is specifically used to: when the content distribution node corresponding to the acceleration domain name changes, perform the following steps: register a detection task for the content distribution node after the change, and add 1 to the task count of the newly registered detection task; for the content distribution node before the change, subtract 1 from the task count of the detection task.

[0109] In one embodiment, the task processing module 408 is specifically configured to: suspend the execution of the detection task when the task status is in an inactive state; and cancel the detection task when the task count is 0.

[0110] In one embodiment, the status update module 404 is also used to: when the task status is active, obtain the second request timestamp of the adjacent transit node of the content distribution node; the second request timestamp is used to record the latest user request time of the acceleration domain name to the adjacent transit node; compare the second request timestamp and the target timestamp; when the target timestamp is greater than the second request timestamp, update the second request timestamp according to the target timestamp.

[0111] In one embodiment, the status update module 404 is specifically used to: determine that the task status of the detection task corresponding to the new acceleration domain name is inactive when the time difference between the current moment and the moment corresponding to the target timestamp is greater than a preset duration threshold; and determine that the task status of the detection task corresponding to the new acceleration domain name is active when the time difference between the current moment and the moment corresponding to the target timestamp is less than or equal to the preset duration threshold.

[0112] Each module in the aforementioned performance data detection device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0113] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store information such as the first request timestamps of multiple content distribution nodes, and the correspondence between the acceleration domain name and the detection task. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a performance data detection method is implemented.

[0114] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via wired or wireless means, and the wireless means can be achieved via Wi-Fi, mobile cellular networks, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a performance data detection method. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0115] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0116] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: for each acceleration domain name, obtaining the first request timestamps of multiple content distribution nodes; the first request timestamp is used to record the latest user request time of the acceleration domain name to the content distribution node; selecting the latest first request timestamp as the target timestamp, and updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect performance data of the content distribution node; updating the task count of the detection task according to the task status; and executing the detection task according to the task status and the task count.

[0117] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the task status before the update is inactive and the task status after the update is active, register the detection task and add 1 to the task count of the detection task; when the task status before the update is active and the task status after the update is inactive, subtract 1 from the task count of the detection task; when the task status before and after the update are both active, update the task count according to the changes in the content distribution node corresponding to the acceleration domain name.

[0118] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the content distribution node corresponding to the acceleration domain name changes, the following steps are executed: for the content distribution node after the change, a detection task is registered, and the task count of the newly registered detection task is increased by 1; for the content distribution node before the change, the task count of the detection task is reduced by 1.

[0119] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: when the task state is an inactive state, suspending execution of the detection task; when the task count is 0, canceling the detection task.

[0120] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the task status is active, a second request timestamp of an adjacent transit node of the content distribution node is obtained; the second request timestamp is used to record the latest user request time of the acceleration domain name to the adjacent transit node; the second request timestamp is compared with the target timestamp; when the target timestamp is greater than the second request timestamp, the second request timestamp is updated according to the target timestamp.

[0121] In one embodiment, when the processor executes the computer program, it further implements the following steps: when the time difference between the current moment and the moment corresponding to the target timestamp is greater than a preset duration threshold, determining that the task status of the detection task corresponding to the new acceleration domain name is an inactive state; when the time difference between the current moment and the moment corresponding to the target timestamp is less than or equal to the preset duration threshold, determining that the task status of the detection task corresponding to the new acceleration domain name is an active state.

[0122] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: for each acceleration domain name, a first request timestamp of multiple content distribution nodes is obtained; the first request timestamp is used to record the latest user request time of the acceleration domain name to the content distribution node; the latest first request timestamp is selected as the target timestamp, and the task status of the detection task corresponding to the acceleration domain name is updated according to the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect performance data of the content distribution node; the task count of the detection task is updated according to the task status; and the detection task is executed according to the task status and the task count.

[0123] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the task status before the update is inactive and the task status after the update is active, register the detection task and add 1 to the task count of the detection task; when the task status before the update is active and the task status after the update is inactive, subtract 1 from the task count of the detection task; when the task status before and after the update are both active, update the task count according to the changes in the content distribution node corresponding to the acceleration domain name.

[0124] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the content distribution node corresponding to the acceleration domain name changes, the following steps are performed: for the content distribution node after the change, a detection task is registered, and the task count of the newly registered detection task is increased by 1; for the content distribution node before the change, the task count of the detection task is reduced by 1.

[0125] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the task state is in an inactive state, suspending execution of the detection task; when the task count is 0, canceling the detection task.

[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the task status is active, a second request timestamp of an adjacent transit node of the content distribution node is obtained; the second request timestamp is used to record the latest user request time of the acceleration domain name to the adjacent transit node; the second request timestamp is compared with the target timestamp; when the target timestamp is greater than the second request timestamp, the second request timestamp is updated according to the target timestamp.

[0127] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the time difference between the current moment and the moment corresponding to the target timestamp is greater than a preset duration threshold, the task status of the detection task corresponding to the new acceleration domain name is determined to be in an inactive state; when the time difference between the current moment and the moment corresponding to the target timestamp is less than or equal to the preset duration threshold, the task status of the detection task corresponding to the new acceleration domain name is determined to be an active state.

[0128] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: obtaining, for each acceleration domain name, a first request timestamp of multiple content distribution nodes; the first request timestamp being used to record the latest user request time of the acceleration domain name to the content distribution node; selecting the latest first request timestamp as a target timestamp, and updating the task status of a detection task corresponding to the acceleration domain name based on the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect performance data of the content distribution node; updating a task count of the detection task based on the task status; and executing the detection task based on the task status and the task count.

[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the task status before the update is inactive and the task status after the update is active, register the detection task and add 1 to the task count of the detection task; when the task status before the update is active and the task status after the update is inactive, subtract 1 from the task count of the detection task; when the task status before and after the update are both active, update the task count according to the changes in the content distribution node corresponding to the acceleration domain name.

[0130] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the content distribution node corresponding to the acceleration domain name changes, the following steps are performed: for the content distribution node after the change, a detection task is registered, and the task count of the newly registered detection task is increased by 1; for the content distribution node before the change, the task count of the detection task is reduced by 1.

[0131] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the task state is in an inactive state, suspending execution of the detection task; when the task count is 0, canceling the detection task.

[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the task status is active, a second request timestamp of an adjacent transit node of the content distribution node is obtained; the second request timestamp is used to record the latest user request time of the acceleration domain name to the adjacent transit node; the second request timestamp is compared with the target timestamp; when the target timestamp is greater than the second request timestamp, the second request timestamp is updated according to the target timestamp.

[0133] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: when the time difference between the current moment and the moment corresponding to the target timestamp is greater than a preset duration threshold, the task status of the detection task corresponding to the new acceleration domain name is determined to be in an inactive state; when the time difference between the current moment and the moment corresponding to the target timestamp is less than or equal to the preset duration threshold, the task status of the detection task corresponding to the new acceleration domain name is determined to be an active state.

[0134] It should be noted that the collection, use and processing of user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application must comply with relevant regulations.

[0135] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application 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 various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processors (GPUs), digital signal processors (DSPs), programmable logic devices (PLCs), and the like.

[0136] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, 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.

[0137] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A performance data detection method, characterized in that: The method is applied to a content distribution network, wherein the content distribution network includes a plurality of content distribution nodes for responding to user requests for an acceleration domain name, and the method includes: For each of the acceleration domain names, obtaining first request timestamps of the plurality of content distribution nodes; the first request timestamp is used to record the latest request time of the acceleration domain name to the content distribution node; Selecting the latest first request timestamp as the target timestamp, and updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp; wherein the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect the performance data of the content distribution node; Updating the task count of the detection task according to the task status; Execute the detection task according to the task state and the task count; Updating the task status of the detection task corresponding to the acceleration domain name according to the current time and the target timestamp includes: If the time difference between the current time and the time corresponding to the target timestamp is greater than a preset time threshold, determining that the task status of the new detection task corresponding to the acceleration domain name is inactive; If the time difference between the current time and the time corresponding to the target timestamp is less than or equal to a preset time threshold, determine that the task status of the new detection task corresponding to the acceleration domain name is active; The updating of the task count of the detection task according to the task status includes: In a case where the task state before the update is an inactive state and the task state after the update is an active state, registering the detection task and adding 1 to the task count of the detection task; In a case where the task state before the update is an active state and the task state after the update is an inactive state, the task count of the detection task is reduced by 1.

2. The method according to claim 1, characterized in that The updating of the task count of the detection task according to the task status further includes: When the task status before and after the update is both active, updating the task count according to the change of the content distribution node corresponding to the acceleration domain name; Updating the task count according to changes in the content distribution node corresponding to the acceleration domain name includes: When the content distribution node corresponding to the acceleration domain name changes, perform the following steps: For the changed content distribution node, register the detection task, and add 1 to the task count of the newly registered detection task; For the content distribution node before the change, the task count of the detection task is reduced by 1.

3. The method according to claim 1, characterized in that The performing of the detection task according to the task state and the task count includes: When the task status is in an inactive state, suspending execution of the detection task; When the task count is 0, the detection task is cancelled.

4. The method according to any one of claims 1 to 3, characterized in that After the task status of the detection task corresponding to the acceleration domain name is updated according to the current time and the target timestamp, the method includes: When the task status is active, obtaining a second request timestamp of the adjacent transfer node of the content distribution node; the second request timestamp is used to record the latest request time of the acceleration domain name to the adjacent transfer node; comparing the second request timestamp with the target timestamp; In a case where the target timestamp is greater than the second request timestamp, the second request timestamp is updated according to the target timestamp.

5. A performance data detection device, characterized in that: The device is applied to a content distribution network, the content distribution network including a plurality of content distribution nodes, and is configured to respond to user requests for an accelerated domain name. The device includes: A data acquisition module, configured to acquire, for each of the acceleration domain names, first request timestamps of the plurality of content distribution nodes; the first request timestamp is used to record the time of the latest request of the acceleration domain name to the content distribution node; A status update module is configured to select the latest first request timestamp as a target timestamp, and update the task status of the detection task corresponding to the acceleration domain name according to the current moment and the target timestamp; when the time difference between the current moment and the moment corresponding to the target timestamp is greater than a preset duration threshold, determine that the task status of the new detection task corresponding to the acceleration domain name is an inactive state; when the time difference between the current moment and the moment corresponding to the target timestamp is less than or equal to a preset duration threshold, determine that the task status of the new detection task corresponding to the acceleration domain name is an active state; wherein, the detection task corresponds to one or more acceleration domain names, and the detection task is used to detect performance data of the content distribution node; A task counting module is configured to update the task count of the detection task according to the task status; if the task status before the update is an inactive state and the task status after the update is an active state, register the detection task and add 1 to the task count of the detection task; if the task status before the update is an active state and the task status after the update is an inactive state, decrement the task count of the detection task by 1; A task processing module is used to execute the detection task according to the task status and the task count.

6. The device according to claim 5, characterized in that The task processing module is specifically configured to suspend the execution of the detection task when the task status is an inactive state; and cancel the detection task when the task count is 0.

7. The device according to any one of claims 5 to 6, characterized in that The status update module is further configured to obtain, when the task status is active, a second request timestamp of the adjacent transfer node of the content distribution node; the second request timestamp is used to record the latest request time of the acceleration domain name to the adjacent transfer node; comparing the second request timestamp with the target timestamp; In a case where the target timestamp is greater than the second request timestamp, the second request timestamp is updated according to the target timestamp.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

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

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

Citation Information

Patent Citations

  • Dynamic acceleration method and device in content distribution network

    CN107517228A

  • CDN quality detection method and system

    CN112839089A