CDN node detection method and device
By establishing an automated detection mechanism between the CDN node and the testing center, the existing problems of low efficiency and high cost of manual detection of CDN nodes are solved, and efficient and economical automated detection and stability guarantee for CDN nodes are achieved.
Patent Information
- Application Number
- CN202510354020.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-05-02
AI Technical Summary
The existing methods of manually detecting CDN nodes are inefficient and costly, making it difficult to ensure the stability and reliability of CDN services.
By establishing an automated detection mechanism between the test center and the CDN node, the target test client sends test requests to obtain test cases and generates test data based on the test cases. The test center determines whether the test data meets the expected results, and sends an online notification if it meets the situation, so that the target CDN node can be connected to the production environment.
Automatic detection of CDN nodes is realized, detection efficiency is improved, detection costs are reduced, and CDN nodes are ensured to reach a stable and reliable state before being connected to the production environment.
Smart Images

Figure CN119922101A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of Internet technology, and in particular, to a CDN node detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid development of the Internet, people's demand for access to network content is growing and becoming more diverse. CDN (Content Distribution Network) has been widely used in many fields due to its excellent performance advantages. In order to ensure the stability and reliability of CDN services, CDN nodes need to be tested. However, the existing manual detection methods have low detection efficiency and high cost.
[0003] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the invention
[0004] The embodiments of the present application provide a CDN node detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product to solve or alleviate one or more of the technical problems raised above.
[0005] One aspect of an embodiment of the present application provides a method for detecting a CDN node, which is used in a test center in a network system, wherein the network system includes multiple CDN nodes and a test center, and each CDN node is configured with a test client; the method includes: In response to a test request sent by a target test client, send a test case to the target test client so that the target test client generates test data according to the test case; wherein the target test client is one of the multiple test clients; The test data is received, and when the test data meets the expected test result, an online notification is sent to the target test client so that the target CDN node corresponding to the target test client can access the production environment.
[0006] Optionally, the network system further includes a scheduling platform, and the method further includes: If the test data does not meet the expected test result, determining a bandwidth threshold of the target CDN node based on the test data; Sending the bandwidth threshold to the scheduling platform so that the scheduling platform can adjust the scheduling expectation of the target CDN node; wherein the scheduling expectation is used to indicate the number of users expected to be allocated to the target CDN node; Send an online notification to the target CDN node so that the target CDN node can access the production environment.
[0007] Optionally, the method further comprises: Receiving log information sent by each of the test clients; Based on the log information, new test cases are generated to update the test case library.
[0008] Optionally, the method further comprises: Based on the log information, generate health status information of each CDN node; The health information is sent to the scheduling platform so that the scheduling platform can adjust the scheduling expectations of each of the CDN nodes.
[0009] Optionally, the method further comprises: When an abnormality exists in the target CDN node, generating an abnormal test case based on the abnormal information of the log information; When the traffic value of the target CDN node is lower than a preset traffic threshold, sending the abnormal test case to the target test client, so that the target test client generates abnormal test data according to the abnormal test case; The abnormal test data is received to determine the abnormal cause of the target CDN node.
[0010] Another aspect of an embodiment of the present application provides a method for detecting a CDN node, which is used in a target test client of a target CDN node, wherein the target CDN node is deployed in a network system; the network system includes multiple CDN nodes and a test center, and the target CDN node is one of the multiple CDN nodes; the method includes: Sending a test request to the test center to obtain a test case; Generate test data according to the test case, and send the test data to the test center; wherein the test center is used to: send an online notification to the target test client when the test data meets the expected test results; Receive the online notification from the test center, so that the target CDN node is connected to the production environment to provide CDN services to the requester.
[0011] Optionally, the method further comprises: Get the log information of the target CDN node; The log information is sent to the test center so that the test center can generate new test cases and health status information of each CDN node.
[0012] Optionally, the method further comprises: When an abnormality exists in the target CDN node, in response to an abnormal test case generated by the test center according to the abnormal information of the log information, acquiring abnormal test data; The abnormal test data is sent to the test center so that the test center can determine the abnormal cause of the target CDN node.
[0013] Another aspect of an embodiment of the present application provides a CDN node detection device, which is used in a test center in a network system, wherein the network system includes multiple CDN nodes and a test center, and each CDN node is configured with a test client; the device includes: A sending module, configured to send a test case to a target test client in response to a test request sent by the target test client, so that the target test client generates test data according to the test case; wherein the target test client is one of the plurality of test clients; The receiving module is used to receive the test data, and if the test data meets the expected test result, send an online notification to the target test client so that the target CDN node corresponding to the target test client can access the production environment.
[0014] Another aspect of an embodiment of the present application provides a CDN node detection device, which is used in a target test client of a target CDN node, wherein the target CDN node is deployed in a network system; the network system includes multiple CDN nodes and a test center, and the target CDN node is one of the multiple CDN nodes; the device includes: A sending module, used for sending a test request to the test center to obtain a test case; A test module, used to generate test data according to the test case, and send the test data to the test center; wherein the test center is used to: send an online notification to the target test client when the test data meets the expected test result; The receiving module is used to receive the online notification of the test center, so that the target CDN node is connected to the production environment to provide CDN services to the requester.
[0015] Another aspect of an embodiment of the present application provides a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.
[0016] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.
[0017] Another aspect of an embodiment of the present application provides a computer program product, including a computer program, which implements the method described above when executed by a processor.
[0018] The embodiment of the present application adopts the above technical solution, which may include the following advantages: before the target CDN node is connected to the production environment, the target test client of the target CDN node sends a test request to the test center to obtain a test case, and generates test data according to the test case. The test center determines whether the test data meets the expected test results. If it meets the requirements, it sends an online notification to the target test client to enable the target CDN node to connect to the production environment. In this way, the automatic detection of CDN nodes is realized, thereby improving the detection efficiency and reducing the detection cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0020] Figure 1 The following schematically shows an operating environment diagram of a CDN node detection method according to Embodiment 1 of the present application; Figure 2 The flowchart of the CDN node detection method according to the first embodiment of the present application is schematically shown; Figure 3 The newly added flow chart of the CDN node detection method according to the first embodiment of the present application is schematically shown; Figure 4 The newly added flow chart of the CDN node detection method according to the first embodiment of the present application is schematically shown; Figure 5 The newly added flow chart of the CDN node detection method according to the first embodiment of the present application is schematically shown; Figure 6 The newly added flow chart of the CDN node detection method according to the first embodiment of the present application is schematically shown; Figure 7 The flowchart of the CDN node detection method according to the second embodiment of the present application is schematically shown; Figure 8 The newly added flow chart of the CDN node detection method according to the second embodiment of the present application is schematically shown; Fig. 9 The newly added flow chart of the CDN node detection method according to the second embodiment of the present application is schematically shown; Fig.10 A block diagram schematically shows a detection device for a CDN node according to Embodiment 3 of the present application. Fig.11 A block diagram schematically shows a detection device for a CDN node according to a fourth embodiment of the present application; and Fig.12 The hardware architecture diagram of the computer device according to the fifth embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0022] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0023] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.
[0024] First, the following terms are explained: CDN: Content Delivery Network is an intelligent virtual network built on the existing network. It deploys nodes at the edge of the network and caches the static resources of the website to edge nodes closer to the users, thereby improving user access speed, reducing bandwidth consumption, and increasing concurrent capacity.
[0025] Test Case: A set of test cases provided to the system under test for the purpose of implementing the test, used to verify whether a specific function, feature or behavior of the system meets the specified requirements.
[0026] Origin Fetching / Back-to-Origin: When the CDN or cache node does not have the content required by the user, the system needs to request the content from the origin station or other nodes.
[0027] Secondly, to facilitate those skilled in the art to understand the technical solution provided by the embodiments of the present application, the following is an explanation of the relevant technology: The applicant understands that in order to ensure the stability of CDN services, the stability and reliability of the CDN node needs to be tested before the CD node is connected to the production environment. However, manual testing is inefficient and costly.
[0028] To this end, the present application provides a CDN node detection technology solution. In this technology solution, (1) automated detection is implemented, which improves detection efficiency and reduces detection costs; (2) the test case library can be automatically updated. See below for details.
[0029] Finally, for ease of understanding, an exemplary operating environment is provided below.
[0030] like Figure 1 As shown, the operating environment diagram includes: The test center 2 can be deployed in a cloud service, or in a single server or a cluster of multiple servers. The test center 2 is used to issue test cases and receive data information reported by each test client, such as test data, log information, etc. The test center 2 is also used to analyze log information to determine the health status of the CDN nodes (4A, 4B, 4C, ...).
[0031] The CDN nodes (4A, 4B, 4C, ...) are used to provide CDN services for the client 6. For example, the CDN node can respond to the data acquisition request sent by the client 4, and obtain various types of data such as web pages, pictures, videos, documents, etc. from the source station or other CDN nodes to return to the client 6. Each CDN node (4A, 4B, 4C, ...) is configured with a test client, which is used to obtain test cases and test commands and send test data to the test center 2. At the same time, the test client is also used to collect the logs of the CDN nodes (4A, 4B, 4C, ...) and report them to the test center 2.
[0032] The client 6 may be any type of computer device, such as a smart phone, a tablet device, a laptop computer, a smart TV, a vehicle-mounted terminal, etc. The client 6 may have a built-in browser, a special program or a player for receiving data and outputting content to the user. The content may include video, audio, comments, text data and / or the like. The client 6 may be configured to send a data acquisition request to the CDN node (4A, 4B, 4C, ...) to acquire the required content.
[0033] The cluster 6 includes multiple CDN nodes, each of which can provide CDN services for the client 4. The CDN node can respond to the data acquisition request sent by the client 4, obtain various types of data such as web pages, pictures, videos, documents, etc. from the source station 2 or other CDN nodes and return them to the client 4.
[0034] The following describes the technical solution of the present application through multiple embodiments, taking the test center or the test client as the execution subject. It should be noted that these embodiments can be implemented in a variety of different forms and should not be interpreted as being limited to the embodiments described here.
[0035] Embodiment 1 Figure 2 The flowchart of the CDN node detection method according to the first embodiment of the present application is schematically shown.
[0036] The CDN node detection method is used in a test center in a network system, wherein the network system includes multiple CDN nodes and a test center, and each CDN node is configured with a test client. Figure 2 As shown, the method may include steps S200 to S202, wherein: Step S200 , in response to a test request sent by a target test client, sending a test case to the target test client, so that the target test client generates test data according to the test case.
[0037] Step S202: receiving the test data, and sending an online notification to the target test client if the test data meets the expected test result, so that the target CDN node corresponding to the target test client can access the production environment.
[0038] In the detection method of CDN nodes provided in this embodiment, before the target CDN node is connected to the production environment, the target CDN node's target test client sends a test request to the test center to obtain a test case, and generates test data based on the test case. The test center determines whether the test data meets the expected test results. If it meets the expected test results, it sends an online notification to the target test client to enable the target CDN node to connect to the production environment. In this way, the automatic detection of CDN nodes is realized, thereby improving the detection efficiency and reducing the detection cost.
[0039] The following combination Figure 2 , each step in steps S200~S202 and other optional steps are explained in detail.
[0040] Step S200 , in response to a test request sent by a target test client, sending a test case to the target test client so that the target test client generates test data according to the test case.
[0041] To ensure that the target CDN node can provide stable and reliable services, before the target CDN node is connected to the production environment, the target test client will send a test request to the test center to obtain test cases. The test center can send test cases to the target test client according to actual needs, such as multiple different test cases for testing different contents, etc., which is not limited here. The production environment refers to the environment in which services are actually run and provided. In actual applications, since CDN nodes can provide different services, corresponding test cases can be sent to the target test client for the services provided by the target CDN node. For example, the services on the CDN node can be divided into gateway layer services, cache layer services, and back-to-source layer services according to business needs. Gateway layer services can be used to process user requests and manage traffic access and distribution. Cache layer services can be used to store and distribute cache resources, reduce back-to-source requests, and improve access speed. Back-to-source layer services can be used to request data from the source station and return it to the user. When testing through the test client, different services can be distinguished for testing.
[0042] In some embodiments, the target CDN node can provide multiple services, such as on-demand services and live broadcast services. Before the on-demand service or live broadcast service goes online, the on-demand service or live broadcast service can be tested through the target test client to ensure that the target CDN node provides stable services to users. On-demand means that users can select and watch pre-recorded video content at any time, and users can play, pause, fast forward or rewind the video as needed. Live broadcast means transmitting video content to the audience in real time, and users watch the same content at the same time with no delay or little delay.
[0043] Step S202 , receiving the test data, and if the test data meets the expected test results, sending an online notification to the target test client so that the target CDN node corresponding to the target test client can access the production environment.
[0044] The test center determines whether the test data meets the expected test results. For example, in the case of stress testing the specified number of connections, for the gateway layer service and the back-source layer service, it is determined whether the CPU (central processing unit) occupancy, memory consumption and request delay time meet expectations, and for the cache layer service, it can be determined whether the disk load meets expectations. Stress testing, that is, stress testing, is used to simulate a large number of users accessing the system to evaluate the performance, stability and availability of the system under high load. In the case of meeting expectations, such as CPU occupancy, memory consumption and request delay time are within the expected range, the test center sends an online notification to the test client to enable the target CDN node to access the production environment. In some embodiments, the test center can send an online notification specifying the service to the target test client for the tested service, so that the target CDN node can launch the service. For example, the target test client can test the on-demand service. If the test results meet expectations, the test can send an online notification for the on-demand service to the target test client, so that the target CDN node can launch the on-demand service to provide on-demand service to users.
[0045] In some embodiments, in addition to conventional tests, for stuck and related services, a real user end can also be simulated to pull the stream (i.e., the process of obtaining and playing audio and video content from the server end). Taking the live broadcast service as an example, the test center needs to determine whether the speed of downloading the live content meets the average bit rate (the speed of user playback), whether the path of the target CDN node back to the source meets expectations, and whether there is frame loss, etc. based on the test data. In the case that the test data does not meet the expected test results, the service log of the live broadcast service in the target CDN node can be analyzed to determine whether the target CDN node is abnormal. For example, the target CDN node is node 1, and other CDN nodes are node 2. Node 1 returns to the source from node 2, and there is a data error or download failure. After analyzing the back-to-source log, the test client of node 1 can bypass the service of this node and go directly to node 2 for back-to-source to determine whether the test data meets the expected test results. At the same time, the test client of node 1 can report to the test center to request the test center to issue a test command to test whether the response of node 2 is normal. In this way, it can be determined whether the abnormal cause is in node 1 or node 2.
[0046] Regarding the situation where the test data does not meet the expected test results, in an optional embodiment, the network system also includes a scheduling platform, such as Figure 3 As shown, the method may also include: Step S300: When the test data does not meet the expected test result, determine the bandwidth threshold of the target CDN node based on the test data.
[0047] Step S300: Send the bandwidth threshold to the scheduling platform so that the scheduling platform can adjust the scheduling expectation of the target CDN node. The scheduling expectation is used to indicate the number of users expected to be allocated to the target CDN node.
[0048] Step S300: Send an online notification to the target CDN node so that the target CDN node can access the production environment.
[0049] If the test data does not meet the expected test results, it means that under the conditions of the test case, the target CDN node cannot provide stable and reliable services. For example, unexpected situations such as CPU overload, excessive memory usage, and long request delays will affect the target CDN node's service provision. Therefore, the test center can determine the maximum bandwidth (bandwidth threshold) that the target CDN node can stably carry based on the test data, and send the maximum bandwidth to the scheduling platform to adjust the scheduling expectations of the target CDN node. The scheduling platform can be used to manage the distribution of traffic, that is, to decide which CDN node to connect to for the user. In some embodiments, the scheduling platform can also adjust the traffic allocated to the target CDN node based on the bandwidth threshold, and can also adjust the number of requests received by the target CDN node, etc., which are not limited here.
[0050] For example, the test center originally expected the target CDN node to support 10Gbps (gigabits per second) bandwidth, but the test data showed that the target CDN node had high latency at 8Gbps. Then the bandwidth threshold of the target CDN node can be adjusted to 8Gbps to avoid overloading the target CDN node. The test center sent the 8Gbps bandwidth threshold to the scheduling platform, which adjusted the number of users that the target CDN node was originally expected to serve from 10,000 to 8,000 based on the bandwidth threshold.
[0051] In this embodiment, when the test data does not meet the expected test results, the bandwidth threshold of the target CDN node is dynamically adjusted according to the test data to adjust the scheduling expectations of the target CDN node, thereby ensuring that the target CDN node can provide stable and reliable services after accessing the production environment.
[0052] After the CDN node is successfully connected to the production environment, the test center can continuously monitor the CDN node. The following will provide a more detailed and exemplary introduction to the monitoring of the CDN node after it is connected to the production environment through more embodiments.
[0053] In an optional embodiment, if Figure 4 As shown, the method may also include: Step S400: receiving log information sent by each of the test clients.
[0054] Step S402: Generate a new test case based on the log information to update the test case library.
[0055] Each test client will collect the log information of the corresponding CDN node. The test client will report the log information to the test center regularly. The test center will distinguish the business of these log information and generate new test cases corresponding to the business. In some embodiments, the test center can analyze the request content, status code, request time, return source address and TCP (Transmission Control Protocol) connection status contained in the log information, distinguish the business of these data, and summarize new test cases. The status code is a three-digit code returned by the server when responding to a request, which is used to indicate the processing result of the request. In this embodiment, by continuously optimizing and expanding the test case library, the coverage and accuracy of the test cases can be improved so that the CDN nodes can be comprehensively tested.
[0056] In an optional embodiment, if Figure 5 As shown, the method may also include: Step S500, generating health status information of each CDN node based on the log information; Step S502: Send the health information to the scheduling platform so that the scheduling platform can adjust the scheduling expectations of each of the CDN nodes.
[0057] The test center can analyze the log information to determine the health status of each CDN node. For example, if a CDN node has a high CPU usage and a long request delay time, the CDN node is considered to be in poor health. The scheduling platform can adjust the scheduling expectations of each CDN node based on the health status information of each CDN node. For example, for a CDN node in poor health, the scheduling platform believes that it is not capable of serving the number of users originally scheduled, so the scheduling platform can lower the scheduling expectations of the CDN node so that the CDN node provides services to fewer users to ensure its service quality. In some embodiments, the scheduling platform can also reallocate the traffic of each CDN node based on the health status information of each CDN node, and can also adjust the number of requests received by each CDN node, etc., which are not limited here.
[0058] In this embodiment, based on the health status information of each CDN node, the scheduling platform can dynamically adjust the scheduling expectations of each CDN node to optimize the scheduling strategy and ensure that each CDN node provides stable and reliable services.
[0059] Regarding the situation where the target CDN node is abnormal, in an optional embodiment, Figure 6 As shown, the method also includes: Step S600, when the target CDN node has an abnormality, an abnormal test case is generated based on the abnormal information of the log information.
[0060] Step S602, when the traffic value of the target CDN node is lower than a preset traffic threshold, sending the abnormal test case to the target test client, so that the target test client generates abnormal test data according to the abnormal test case.
[0061] Step S604: Receive the abnormal test data to determine the abnormal cause of the target CDN node.
[0062] In the event that an abnormality exists in the target CDN node, the test center will generate an abnormal test case for the abnormality based on the abnormal information corresponding to the abnormality. In the event that the traffic value of the target CDN node is lower than the preset traffic threshold, such as during the traffic trough period of the target CDN node, the test center can send the abnormal test case to the target test client to generate abnormal test data. The test center then determines the cause of the abnormality of the target CDN node based on the abnormal test data, so as to solve the abnormal problem based on the cause of the abnormality. In some embodiments, the target test client can cause the target CDN node to exit the production environment before testing the test case to avoid the impact of the test process on the user.
[0063] For example, if a user accessing the target CDN node encounters a lag problem, the test center can analyze the abnormal information for the lag to determine whether there is a problem with the service accessed by the user or a regional node convergence problem (i.e., the traffic in a certain area is too high, causing congestion). If it is a regional node convergence problem, the data center sends data to the scheduling platform to adjust the scheduling expectations of the relevant CDN nodes. If it is a problem with the target CDN node service, the test center generates a corresponding abnormal test case for the lag and sends it to the target test client for testing. Based on the feedback from the test data, the test center enables the scheduling platform to adjust the scheduling expectations of the target CDN node, or cause the target CDN node to exit the generation environment.
[0064] In this embodiment, targeted testing is performed based on abnormal test cases, so that the test center can analyze the cause of the abnormality to facilitate maintenance and troubleshooting of the CDN node.
[0065] In order to make the present application easier to understand, an exemplary application is provided below.
[0066] The detection process of the target CDN node from before to after it is connected to the production environment is as follows: S1. Before the target CDN node is connected to the production environment, the test client of the target CDN node sends a test request to the test center.
[0067] S2. The test center responds to the test request and sends the test case to the target test client.
[0068] S3. The target test client generates test data according to the test case and returns it to the test center.
[0069] S4. The test center analyzes the test data, and if the test data meets the expected test results, sends an online notification to the target test client to enable the target CDN node to access the production environment. Then proceed to step S6.
[0070] S5. When the test data does not meet the expected test results, the test center determines the bandwidth threshold of the target CDN node based on the test data, and sends the bandwidth threshold to the scheduling platform so that the scheduling platform can adjust the scheduling expectations of the target CDN node.
[0071] S6. The test center sends an online notification to connect the target CDN node to the production environment.
[0072] S7. After the target CDN node is connected to the production environment, the target test client collects the log information of the target CDN node and sends it to the test center regularly.
[0073] S8, the test center receives the log information of each CDN node to generate new test cases and health status information of each CDN node.
[0074] S9. When an abnormality exists in the target CDN node, the test center generates an abnormal test case according to the abnormal information in the log information, and sends the abnormal test case to the target CDN node when the traffic value of the target CDN node is lower than the preset traffic threshold.
[0075] S10. The target test client receives the abnormal test case to generate abnormal test data, and sends the abnormal test data to the test center.
[0076] S11. The test center determines the abnormal cause of the target CDN node according to the abnormal test data.
[0077] In this exemplary application, automatic detection of the target CDN node is implemented to ensure that the target CDN node can provide stable and reliable services.
[0078] Embodiment 2 The CDN node detection method provided in this embodiment is used in a target test client of a target CDN node. The technical details and effects can be referred to, introduced, and combined with the above.
[0079] Figure 7 The flowchart of CDN node detection according to the second embodiment of the present application is schematically shown.
[0080] like Figure 7 As shown, the CDN node detection method may include steps S700 to S704, wherein: Step S700: Send a test request to the test center to obtain a test case.
[0081] Step S702: Generate test data according to the test case, and send the test data to the test center, wherein the test center is used to send an online notification to the target test client if the test data meets the expected test result.
[0082] Step S704: receiving an online notification from the test center, so that the target CDN node is connected to the production environment to provide CDN services to the requester.
[0083] As an optional embodiment, Figure 8 As shown, the method also includes: Step S800, obtaining log information of the target CDN node.
[0084] Step S802: sending the log information to the test center so that the test center can generate new test cases and health status information of each CDN node.
[0085] As an optional embodiment, Fig. 9 As shown, the method also includes: Step S900, when the target CDN node is abnormal, in response to an abnormal test case generated by the test center according to the abnormal information of the log information, acquiring abnormal test data; Step S902: Send the abnormal test data to the test center so that the test center can determine the abnormal cause of the target CDN node.
[0086] Embodiment 3 Fig.10 A block diagram of a detection device for a CDN node according to Embodiment 3 of the present application is schematically shown. The device can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can perform specific functions. The following description will specifically introduce the functions of each program module in this embodiment. The device is used in a test center in a network system, and the network system includes multiple CDN nodes and a test center, and each CDN node is configured with a test client. Fig.10 As shown, the device 1000 may include: a sending module 1010 and a receiving module 1020, wherein: The sending module 1010 is used to send a test case to the target test client in response to a test request sent by the target test client, so that the target test client generates test data according to the test case; wherein the target test client is one of the multiple test clients.
[0087] The receiving module 1020 is used to receive the test data, and if the test data meets the expected test result, send an online notification to the target test client so that the target CDN node corresponding to the target test client can access the production environment.
[0088] As an optional embodiment, the apparatus 1000 further includes a scheduling module, wherein the scheduling module is configured to: If the test data does not meet the expected test result, determining a bandwidth threshold of the target CDN node based on the test data; Sending the bandwidth threshold to the scheduling platform so that the scheduling platform can adjust the scheduling expectation of the target CDN node; wherein the scheduling expectation is used to indicate the number of users expected to be allocated to the target CDN node; Send an online notification to the target CDN node so that the target CDN node can access the production environment.
[0089] As an optional embodiment, the receiving module 1020 is further configured to: Receiving log information sent by each of the test clients; Based on the log information, new test cases are generated to update the test case library.
[0090] As an optional embodiment, the receiving module 1020 is further configured to: Based on the log information, generate health status information of each CDN node; The health information is sent to the scheduling platform so that the scheduling platform can adjust the scheduling expectations of each of the CDN nodes.
[0091] As an optional embodiment, the apparatus 1000 further includes an anomaly detection module, wherein the anomaly detection module is configured to: When an abnormality exists in the target CDN node, generating an abnormal test case based on the abnormal information of the log information; When the traffic value of the target CDN node is lower than a preset traffic threshold, sending the abnormal test case to the target test client, so that the target test client generates abnormal test data according to the abnormal test case; The abnormal test data is received to determine the abnormal cause of the target CDN node.
[0092] Embodiment 4 Fig.11 The block diagram of the detection device of the CDN node according to the second embodiment of the present application is schematically shown. The device can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Fig.11 As shown, the apparatus 1100 may include: a sending module 1110, a testing module 1120 and a receiving module 1130, wherein: The sending module 1110 is used to send a test request to the test center to obtain a test case.
[0093] The test module 1120 is used to generate test data according to the test case and send the test data to the test center; wherein the test center is used to send an online notification to the target test client when the test data meets the expected test results.
[0094] The receiving module 1130 is used to receive the online notification of the test center, so that the target CDN node is connected to the production environment to provide CDN services to the requester.
[0095] As an optional embodiment, the receiving module 1130 is further configured to: Get the log information of the target CDN node; The log information is sent to the test center so that the test center can generate new test cases and health status information of each CDN node.
[0096] As an optional embodiment, the testing module 1120 is further configured to: When an abnormality exists in the target CDN node, in response to an abnormal test case generated by the test center according to the abnormal information of the log information, acquiring abnormal test data; The abnormal test data is sent to the test center so that the test center can determine the abnormal cause of the target CDN node.
[0097] Embodiment 5 Fig.12The schematic diagram of the hardware architecture of a computer device 10000 suitable for implementing the detection method of CDN nodes according to the third embodiment of the present application is shown schematically. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Fig.12 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them: The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 can be an internal storage module of the computer device 10000, such as a hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 can also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 can also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed in the computer device 10000, such as the program code of the CDN node detection method, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.
[0098] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.
[0099] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0100] It should be pointed out that Fig.12 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0101] In this embodiment, the CDN node detection method stored in the memory 10010 may also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.
[0102] Embodiment 6 The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the CDN node detection method in the embodiment are implemented.
[0103] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Of course, the computer-readable storage medium may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device, such as the program code of the detection method of the CDN node in the embodiment, etc. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
[0104] Embodiment 7 An embodiment of the present application also provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.
[0105] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0106] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for detecting a CDN node, characterized in that: Used in a test center in a network system, the network system includes multiple CDN nodes and a test center, each CDN node is configured with a test client; the method includes: In response to a test request sent by a target test client, send a test case to the target test client so that the target test client generates test data according to the test case; wherein the target test client is one of the multiple test clients; The test data is received, and when the test data meets the expected test result, an online notification is sent to the target test client so that the target CDN node corresponding to the target test client can access the production environment.
2. The method according to claim 1, characterized in that The network system further includes a scheduling platform, and the method further includes: If the test data does not meet the expected test result, determining a bandwidth threshold of the target CDN node based on the test data; Sending the bandwidth threshold to the scheduling platform so that the scheduling platform can adjust the scheduling expectation of the target CDN node; wherein the scheduling expectation is used to indicate the number of users expected to be allocated to the target CDN node; Send an online notification to the target CDN node so that the target CDN node can access the production environment.
3. The method according to claim 1, characterized in that The method further comprises: Receiving log information sent by each of the test clients; Based on the log information, new test cases are generated to update the test case library.
4. The method according to claim 3, characterized in that The method further comprises: Based on the log information, generate health status information of each CDN node; The health information is sent to the scheduling platform so that the scheduling platform can adjust the scheduling expectations of each of the CDN nodes.
5. The method according to claim 3, characterized in that: The method further comprises: When an abnormality exists in the target CDN node, generating an abnormal test case based on the abnormal information of the log information; When the traffic value of the target CDN node is lower than a preset traffic threshold, sending the abnormal test case to the target test client, so that the target test client generates abnormal test data according to the abnormal test case; The abnormal test data is received to determine the abnormal cause of the target CDN node.
6. A method for detecting a CDN node, characterized in that: Used in a target test client of a target CDN node, wherein the target CDN node is deployed in a network system; The network system includes multiple CDN nodes and a test center, and the target CDN node is one of the multiple CDN nodes; the method includes: Sending a test request to the test center to obtain a test case; Generate test data according to the test case, and send the test data to the test center; wherein the test center is used to: send an online notification to the target test client when the test data meets the expected test results; Receive the online notification from the test center, so that the target CDN node is connected to the production environment to provide CDN services to the requester.
7. The method according to claim 6, characterized in that The method further comprises: Get the log information of the target CDN node; The log information is sent to the test center so that the test center can generate new test cases and health status information of each CDN node.
8. The method according to claim 6, characterized in that The method further comprises: When an abnormality exists in the target CDN node, in response to an abnormal test case generated by the test center according to the abnormal information of the log information, acquiring abnormal test data; The abnormal test data is sent to the test center so that the test center can determine the abnormal cause of the target CDN node.
9. A CDN node detection device, characterized in that: Used in a test center in a network system, the network system includes multiple CDN nodes and a test center, each CDN node is configured with a test client; the device includes: A sending module, configured to send a test case to a target test client in response to a test request sent by the target test client, so that the target test client generates test data according to the test case; wherein the target test client is one of the plurality of test clients; The receiving module is used to receive the test data, and if the test data meets the expected test result, send an online notification to the target test client so that the target CDN node corresponding to the target test client can access the production environment.
10. A CDN node detection device, used in a target test client of a target CDN node, wherein the target CDN node is deployed in a network system; The network system includes multiple CDN nodes and a test center, and the target CDN node is one of the multiple CDN nodes; the device includes: A sending module, used for sending a test request to the test center to obtain a test case; A test module, used to generate test data according to the test case, and send the test data to the test center; wherein the test center is used to: send an online notification to the target test client when the test data meets the expected test result; The receiving module is used to receive the online notification of the test center, so that the target CDN node is connected to the production environment to provide CDN services to the requester.
11. A computer device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
13. 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 claims 1 to 8 are implemented.