A CDN infrastructure data statistics method, system, device and medium
By introducing monitoring service components into the CDN log system, real-time monitoring of infrastructure data changes in the CDN management system, the problem that existing CDN log systems cannot count CDN infrastructure data in real-time is solved, efficient and accurate data statistics are achieved, and comprehensive CDN data support is provided to users.
Patent Information
- Application Number
- CN202510045809.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-10
AI Technical Summary
The existing CDN log system cannot count infrastructure data in the CDN management system in real time and cannot provide users with comprehensive and accurate CDN data.
By introducing a monitoring service component in the CDN log system, it monitors the change identification of infrastructure data sent by the CDN management system, stores it in the corresponding path data, and when the path data changes, it triggers a data query request and performs statistics based on the data returned by the CDN management system.
Real-time monitoring and statistics of CDN infrastructure data is realized, unnecessary polling or timed query is avoided, statistics are improved, and statistics are provided with comprehensive CDN data support is provided to users.
Smart Images

Figure CN119484234B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a statistical method, system, device and medium for CDN infrastructure data. Background Art
[0002] With the rapid development of Internet technology, Content Delivery Network (CDN) has become an important technology to improve website performance and user experience. CDN distributes multiple nodes around the world and caches content on the node closest to the user, thereby accelerating content distribution and transmission.
[0003] As CDN scale continues to expand and user demand grows, accurate monitoring and statistical analysis of CDN resource usage has become particularly important. The CDN management system stores infrastructure data about the CDN network structure, such as the location of the computer room, operator lines, switch information, cluster configuration, and POP point details. These infrastructure data are crucial for in-depth understanding of CDN resource usage, optimizing network structure, and improving service quality.
[0004] The current CDN log system can only count CDN bandwidth, traffic, cache hit rate, status code distribution and other information in the CDN log. It cannot count the infrastructure data in the CDN management system in real time, and cannot provide users with comprehensive and accurate CDN data. Summary of the invention
[0005] In order to overcome the problems existing in the related technologies, the present application provides a statistical method, system, device and medium for CDN infrastructure data.
[0006] According to a first aspect of any embodiment of the present application, a statistical method for CDN infrastructure data is provided, the method being applied to a CDN log system, the CDN log system including a monitoring service component, the method comprising:
[0007] The monitoring service component receives a change identifier of the CDN infrastructure data sent by the CDN management system;
[0008] The monitoring service component stores the change identifier in the path data corresponding to the CDN infrastructure data;
[0009] The monitoring service component monitors the change of the path data, triggering the CDN log system to send a data query request to the CDN management system;
[0010] Data statistics are performed based on the CDN infrastructure data returned by the CDN management system.
[0011] According to a second aspect of any one of the embodiments of the present application, a statistical method for CDN infrastructure data is provided, the method being applied to a CDN management system, the method comprising:
[0012] In response to detecting a change operation of the CDN infrastructure data, sending a change identifier of the CDN infrastructure data to a monitoring service component in the CDN log system, so that the monitoring service component monitors changes in path data corresponding to the CDN infrastructure data, triggering the sending of a data query request;
[0013] In response to receiving the data query request sent by the CDN log system, querying the CDN infrastructure data;
[0014] The CDN infrastructure data is sent to the CDN log system so that the CDN log system performs data statistics.
[0015] According to a third aspect of any embodiment of the present application, a CDN log system is provided, wherein the CDN log system includes a monitoring service component, and the CDN log system further includes:
[0016] A receiving module, used for receiving a change identifier of CDN infrastructure data sent by a CDN management system;
[0017] A storage module, used for storing the change identifier in the path data corresponding to the CDN infrastructure data;
[0018] A monitoring module, configured to monitor changes in the path data and trigger the CDN log system to send a data query request to the CDN management system;
[0019] The statistics module is used to perform data statistics according to the CDN infrastructure data returned by the CDN management system.
[0020] According to a fourth aspect of any embodiment of the present application, a CDN management system is provided, the CDN management system comprising:
[0021] A detection module, configured to, in response to detecting a change operation of CDN infrastructure data, send a change identifier of the CDN infrastructure data to a monitoring service component in a CDN log system, so that the monitoring service component monitors changes in path data corresponding to the CDN infrastructure data, thereby triggering the sending of a data query request;
[0022] A query module, configured to query the CDN infrastructure data in response to receiving the data query request sent by the CDN log system;
[0023] The sending module is used to send the CDN infrastructure data to the CDN log system so that the CDN log system can perform data statistics.
[0024] According to a fifth aspect of any embodiment of the present application, there is provided an electronic device, including:
[0025] processor;
[0026] a memory for storing processor-executable instructions;
[0027] The processor executes the executable instructions to implement the method executed by the CDN log system or the method executed by the CDN management system in any of the above embodiments of the present application.
[0028] According to a sixth aspect of any embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, a method executed by a CDN log system or a method executed by a CDN management system in any embodiment of the present application is implemented.
[0029] According to a seventh aspect of any embodiment of the present application, a computer program product is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the method performed by the CDN log system or the method performed by the CDN management system in any embodiment of the present application described above is implemented.
[0030] The technical solution provided by this application may have the following beneficial effects:
[0031] According to the above embodiments, the change identifier of the CDN infrastructure data sent by the CDN management system is received by the monitoring service component, and the monitoring service component stores the change identifier in the path data corresponding to the CDN infrastructure data. The monitoring service component monitors the change of the path data, triggers the CDN log system to send a data query request to the CDN management system, and performs data statistics based on the CDN infrastructure data returned by the CDN management system. The monitoring service component can monitor and capture any changes in the CDN infrastructure data in real time, avoid unnecessary polling or timed queries, thereby efficiently and accurately counting real-time CDN infrastructure data and providing users with comprehensive CDN data support.
[0032] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in the specification and constitute a part of this application, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0034] Figure 1 is a schematic diagram of statistical cache data according to an exemplary embodiment of the present application;
[0035] Figure 2 is a flow chart of a CDN infrastructure data statistics method shown in the present application according to an exemplary embodiment;
[0036] Figure 3 is a flow chart of another CDN infrastructure data statistics method shown in the present application according to an exemplary embodiment;
[0037] Figure 4 is an interactive diagram of a statistical method for CDN infrastructure data according to an exemplary embodiment of the present application;
[0038] Figure 5 is a structural schematic diagram of an electronic device according to an exemplary embodiment of the present application;
[0039] Figure 6 is a block diagram of a CDN log system according to an exemplary embodiment of the present application;
[0040] Figure 7 It is a block diagram of a CDN management system shown in the present application according to an exemplary embodiment. DETAILED DESCRIPTION
[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0042] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0043] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0044] Currently, the CDN management platform can synchronize CDN infrastructure data to Redis for caching, and the CDN log system obtains cache data from Redis. Figure 1 , Figure 1 A schematic diagram of statistical cache data is shown. The CDN management platform sends CDN infrastructure data to Redis, Redis caches the CDN infrastructure data, and the distributed CDN log system reads the cache data from Redis at regular intervals.
[0045] However, the cached data in Redis is lost and inconsistent with the original infrastructure data in the CDN management platform. The Redis data structure is complex, and the reading and storage process of cached data is relatively cumbersome. In addition, the CDN log system reads infrastructure data from Redis at regular intervals and cannot count the latest CDN infrastructure data in real time.
[0046] In order to solve the above problems, the present application proposes a statistical method for CDN infrastructure data. Before introducing the statistical method, in order to make the description of the method easier to understand, some concepts involved in the subsequent description of the embodiments of the present application are first explained:
[0047] 1) CDN
[0048] CDN is an intelligent virtual network that relies on edge servers deployed in various places. Through the load balancing, content distribution, scheduling and other functional modules of the central platform, users can obtain the required content nearby, which can reduce network congestion and improve user access response speed and hit rate. The key technologies of CDN include content routing technology, content distribution technology, content storage technology, content management technology, etc.
[0049] 2) Zookeeper
[0050] Zookeeper is a distributed service management framework designed based on the observer pattern. It is responsible for storing and managing data and notifying registered observers when the data status changes.
[0051] To further illustrate the present application, the following examples are provided:
[0052] See also Figure 2 , Figure 2 The present application is a flowchart of a statistical method for CDN infrastructure data according to an exemplary embodiment. The statistical method can be applied to a CDN log system, which is a system responsible for recording, processing and analyzing CDN-related log data.
[0053] The CDN log system may include a monitoring service component, which is a service component that monitors and notifies the CDN log system of changes in CDN infrastructure data. The CDN management system is a system that manages and monitors CDN infrastructure data.
[0054] The statistical method may include the following steps:
[0055] Step 202: The monitoring service component receives a change identifier of the CDN infrastructure data sent by the CDN management system.
[0056] In this step, users can use the CDN management system to perform change operations such as adding, deleting or modifying CDN infrastructure data. After the CDN management system detects the change operation of CDN infrastructure data, it generates a change identifier of CDN infrastructure data and sends the change identifier of CDN infrastructure data to the monitoring service component in the CDN log system. The monitoring service component receives the change identifier of CDN infrastructure data sent by the CDN management system.
[0057] Among them, CDN infrastructure data is the data of CDN infrastructure, which is used to describe the status information of CDN infrastructure, such as: the computer room to which CDN belongs, operator lines, switch information, cluster information, CDN access point (Point of Presence, POP) information, etc. Change identifier is an identifier of changes in CDN infrastructure data, such as: timestamp, version number, hash value, etc.
[0058] In one embodiment, the change identifier may include the latest update time of the CDN infrastructure data. When the CDN management system detects a change operation of the CDN infrastructure data, it may use the current time of the change operation as the latest update time of the CDN infrastructure data and send the latest update time to the monitoring service component.
[0059] The monitoring service component receives the latest update time sent by the CDN management system and compares the latest update time with the path data stored in the path. If the latest update time is inconsistent with the path data stored in the path, the latest update time is stored in the path data. The monitoring service component determines that the path data has changed, triggering the CDN log system to send a data query request to the CDN management system.
[0060] As described above, by including the latest update time of the CDN infrastructure data in the change identifier, the uniqueness of the change identifier data is ensured, thereby improving the accuracy of monitoring path data changes.
[0061] Step 204: The monitoring service component stores the change identifier in the path data corresponding to the CDN infrastructure data.
[0062] In this step, the monitoring service component stores the change identifier in the path data corresponding to the CDN infrastructure data. Each statistical dimension of the CDN infrastructure corresponds to a path, and the change identifier can be stored as the path data under the path. When the CDN infrastructure data changes, the change identifier can be updated to the corresponding path data, providing a basis for subsequent data synchronization.
[0063] The path is a specific location or node in the monitoring service component for storing change identifiers, and the path data is specific information or values stored in the path corresponding to the CDN infrastructure data, which can be the value of the path.
[0064] Step 206: The monitoring service component monitors that the path data has changed, and triggers the CDN log system to send a data query request to the CDN management system.
[0065] In this step, the monitoring service component continuously monitors whether the path data in the monitoring service component has changed. When the monitoring service component monitors the path data change, it triggers the CDN log system to send a data query request to the CDN management system.
[0066] The CDN management system receives the data query request sent by the CDN log system, queries the CDN infrastructure data, and sends the CDN infrastructure data to the CDN log system. The data query request is a request sent by the CDN log system to the CDN management system for querying the latest CDN infrastructure data.
[0067] Step 208: Perform data statistics based on the CDN infrastructure data returned by the CDN management system.
[0068] In this step, after receiving the CDN infrastructure data returned by the CDN management system, the CDN log system performs data statistics based on the CDN infrastructure data. For example, the returned data is associated and bound with the data in the CDN log system to calculate CDN usage such as various bandwidths, traffic, number of requests, hit rates, status code distribution, etc., to provide a decision-making basis for subsequent evaluation of CDN performance, optimization of resource allocation, and monitoring of network status. Among them, CDN usage refers to the consumption of related data and resources generated when using CDN.
[0069] For example, by counting the switch information and cluster information in the CDN infrastructure data, the data transmission path and load balancing inside the CDN can be analyzed to optimize the network configuration and improve the data transmission efficiency. For another example, by counting the computer room and operator line information in the CDN infrastructure data, the fault point can be quickly located and the troubleshooting time can be shortened.
[0070] In one embodiment, the CDN log system obtains the node identification information in the CDN log and the CDN usage corresponding to each CDN node.
[0071] The node identification information in the CDN log is matched with the node identification information in the CDN infrastructure data, and the corresponding item in the infrastructure data for each CDN node recorded in the log is found, so as to associate the log data with the infrastructure data.
[0072] The CDN log system aggregates the matching CDN usage data to obtain the CDN usage corresponding to the CDN infrastructure data. The aggregated CDN usage can be displayed in the form of charts, reports, etc., so that users can intuitively understand the performance and resource usage of CDN services in the infrastructure dimension.
[0073] Among them, the CDN usage corresponding to the CDN infrastructure data is the usage of related resources generated by each CDN node in the process of providing services, which is recorded and summarized based on the infrastructure dimension. It can be the total bandwidth of the CDN nodes corresponding to each computer room, the total traffic of the CDN nodes corresponding to each operator line, etc.
[0074] As described above, by obtaining the node identification information in the CDN log and the CDN usage corresponding to each CDN node, matching the node identification information in the CDN log with the node identification information in the CDN infrastructure data, and obtaining the CDN usage corresponding to the CDN infrastructure data, the load and resource consumption corresponding to each CDN infrastructure can be clarified, which helps CDN service providers optimize resource allocation, avoid idle or excessive use of resources, and improve CDN resource utilization.
[0075] The statistical method for CDN infrastructure data of this embodiment receives the change identifier of CDN infrastructure data sent by the CDN management system through a monitoring service component, and the monitoring service component stores the change identifier in the path data corresponding to the CDN infrastructure data. When the monitoring service component monitors the change of the path data, it triggers the CDN log system to send a data query request to the CDN management system, and performs data statistics based on the CDN infrastructure data returned by the CDN management system. The monitoring service component can monitor and capture any changes in the CDN infrastructure data in real time, avoiding unnecessary polling or timed queries, thereby efficiently and accurately counting real-time CDN infrastructure data and providing users with comprehensive CDN data support.
[0076] In addition, by utilizing the monitoring mechanism of the monitoring service component, there is no need to introduce third-party cache components such as Redis to cache data, thus avoiding data loss, data inconsistency, and the cumbersome storage and reading of cached data, and ensuring the efficiency and timeliness of statistical CDN infrastructure data.
[0077] See also Figure 3 , Figure 3 This is a flow chart of another statistical method for CDN infrastructure data according to an exemplary embodiment of the present application. The statistical method can be applied to a CDN management system, and the statistical method may include the following steps:
[0078] Step 302: In response to detecting a change operation of the CDN infrastructure data, a change identifier of the CDN infrastructure data is sent to a monitoring service component in the CDN log system, so that the monitoring service component monitors changes in the path data corresponding to the CDN infrastructure data, triggering a data query request.
[0079] In this step, when the CDN infrastructure data of the CDN infrastructure changes, the CDN management system detects the change operation of the CDN infrastructure data and sends a change identifier to the monitoring service component in the CDN log system.
[0080] The monitoring service component is responsible for monitoring messages from the CDN infrastructure management system. Once a change identifier is received, the change identifier is stored in the path data corresponding to the CDN infrastructure data. When the monitoring service component monitors changes in the path data, it triggers the CDN log system to send a data query request to the CDN management system.
[0081] Step 304: In response to receiving the data query request sent by the CDN log system, query the CDN infrastructure data.
[0082] In this step, the CDN management system receives the data query request sent by the CDN log system, and retrieves the CDN infrastructure data from the CDN management system according to the data query request.
[0083] Step 306: Send the CDN infrastructure data to the CDN log system so that the CDN log system can perform data statistics.
[0084] In this step, the CDN management system sends the CDN infrastructure data to the CDN log system so that the CDN log system can perform data statistics.
[0085] The statistical method for CDN infrastructure data of the present embodiment sends a change identifier of CDN infrastructure data to a monitoring service component in a CDN log system in response to detecting a change operation of CDN infrastructure data, so that the monitoring service component monitors the change of path data corresponding to the CDN infrastructure data, triggers the sending of a data query request, and in response to receiving the data query request sent by the CDN log system, queries the CDN infrastructure data and sends the CDN infrastructure data to the CDN log system, so that the CDN log system performs data statistics. The monitoring service component can monitor and capture any changes in the CDN infrastructure data in real time, avoid unnecessary polling or timed queries, thereby efficiently and accurately counting real-time CDN infrastructure data and providing users with comprehensive CDN data support.
[0086] In the above-mentioned embodiment, it is introduced that the monitoring service component is used to monitor the changes of CDN infrastructure data. Once the path data is monitored to change, the CDN infrastructure data is queried from the CDN management platform. In the following embodiment, the query and statistics process of CDN infrastructure data will be introduced in more detail, and can be applied to any of the above embodiments.
[0087] In one embodiment, the CDN log system receives the CDN infrastructure data returned by the CDN management system, puts the CDN infrastructure data into the memory resources of the CDN log system, and stores the CDN infrastructure data. The CDN log system can use the stored CDN infrastructure data for data statistics.
[0088] As described above, by storing CDN infrastructure data and using the stored CDN infrastructure data for data statistics, the efficiency of subsequent data statistics can be improved, and the accuracy of the statistical results can be ensured.
[0089] In one embodiment, the monitoring service component in the CDN log system is responsible for monitoring data changes from the CDN management system. The monitoring service component is configured to monitor multiple paths corresponding to different statistical dimensions of the CDN infrastructure. Each statistical dimension (such as computer room, operator line, etc.) corresponds to a specific path.
[0090] When the CDN management system detects a change operation of the CDN infrastructure data, it sends a data change message to the CDN log system. The data change message may include a change identifier of the CDN infrastructure data and the corresponding target statistical dimension.
[0091] The monitoring service component determines the path corresponding to the CDN infrastructure data according to the target statistical dimension in the data change message, and stores the change identifier in the path data according to the path corresponding to the CDN infrastructure data, ensuring that the change identifier is correctly placed in the path corresponding to the target statistical dimension. The monitoring service component stores the change identifier in the path data to mark the latest status of the CDN infrastructure data.
[0092] The monitoring service component monitors changes in path data and triggers the CDN log system to send a data query request to the CDN management system. The data query request carries the target statistical dimension corresponding to the CDN infrastructure data.
[0093] The CDN management system queries the dimension facility data corresponding to the target statistical dimension based on the target statistical dimension carried in the data query request, and sends the dimension facility data to the CDN log system.
[0094] The CDN log system performs data statistics based on the dimensional facility data corresponding to the target statistical dimension returned by the CDN management system. The CDN log system can calculate various CDN indicators such as bandwidth utilization, traffic distribution, response time, etc. based on different statistical dimensions.
[0095] The CDN log system monitoring service component includes multiple paths corresponding to different statistical dimensions. The target statistical dimension is the statistical dimension of the CDN infrastructure to which the CDN infrastructure data belongs.
[0096] Dimensional facility data is data that describes the detailed information and status of CDN infrastructure in different statistical dimensions. Dimensional facility data is used to reflect key information about CDN infrastructure, such as detailed information about computer rooms, detailed information about operator lines, etc. Dimensional facility data can include CDN infrastructure data that has changed.
[0097] As described above, by determining the path corresponding to the CDN infrastructure data based on the target statistical dimension corresponding to the CDN infrastructure data, and storing the change identifier in the path data according to the path corresponding to the CDN infrastructure data, the data changes of the target statistical dimension can be monitored more finely, and data statistics can be performed based on the dimensional facility data corresponding to the target statistical dimension returned by the CDN management system. It is only necessary to query and transmit the dimensional facility data of the changed target statistical dimension, which can significantly reduce the data transmission volume, reduce the network burden and save bandwidth resources.
[0098] To further introduce the statistical process of CDN infrastructure data, Figure 4 An interactive diagram showing a statistical method for CDN infrastructure data. Figure 4 As shown, the CDN log system can be deployed on a distributed cluster server, and the monitoring service component can be Zookeeper. The statistical method may include the following steps:
[0099] Step 402: The CDN management system detects the change operation of CDN infrastructure data.
[0100] In this step, the CDN management system is responsible for monitoring the dynamic changes of CDN infrastructure data. When changes such as addition, deletion or modification of CDN infrastructure data occur, the CDN management system can detect these changes in real time.
[0101] Step 404: The CDN management system sends the latest update time and target statistical dimensions of the CDN infrastructure data to Zookeeper in the CDN log system.
[0102] In this step, the CDN management system detects the change operation of the CDN infrastructure data, generates a data change message including the latest update time and target statistical dimensions, and sends the data change message to Zookeeper in the CDN log system.
[0103] Step 406: Zookeeper determines the path corresponding to the CDN infrastructure data based on the target statistical dimension corresponding to the CDN infrastructure data.
[0104] In this step, after receiving the message from the CDN management system, Zookeeper determines the path corresponding to the CDN infrastructure data according to the target statistical dimension in the data change message.
[0105] Step 408: Zookeeper stores the change identifier in the path data corresponding to the CDN infrastructure data.
[0106] In this step, Zookeeper stores the change identifier in the path data determined in step 406 according to the path corresponding to the CDN infrastructure data, marking the latest status of the CDN infrastructure data.
[0107] Step 410: The CDN log system sends a data query request to the CDN management system.
[0108] In this step, Zookeeper monitors changes in path data and triggers an event. The CDN log system sends a data query request to the CDN management system. The data query request carries the target statistical dimension corresponding to the changed path data so that the CDN management system can accurately query and return relevant dimensional facility data.
[0109] Step 412: The CDN management system queries the dimensional facility data corresponding to the target statistical dimension based on the target statistical dimension carried in the data query request.
[0110] In this step, after receiving the data query request from the CDN log system, the CDN management system queries the corresponding dimension facility data according to the target statistical dimension carried in the data query request.
[0111] Step 414: The CDN management system sends the dimension facility data to the CDN log system.
[0112] In this step, the CDN management system sends dimensional facility data to the CDN log system, and the dimensional facility data includes the changed CDN infrastructure data.
[0113] Step 416: The CDN log system determines the changed CDN infrastructure data based on the dimensional facility data.
[0114] In this step, after receiving the dimensional facility data from the CDN management system, the CDN log system compares the dimensional facility data with the locally stored CDN infrastructure data to determine the changed CDN infrastructure data.
[0115] Step 418: The CDN log system matches the node identification information in the CDN log with the node identification information in the stored CDN infrastructure data to obtain the CDN usage corresponding to the CDN infrastructure data.
[0116] In this step, the CDN log system will match the node identification information in the CDN log with the node identification information in the stored CDN infrastructure data, and associate the log data with the CDN infrastructure data, thereby calculating the CDN usage corresponding to the CDN infrastructure data, providing strong data support for CDN performance evaluation, resource optimization, and network status monitoring.
[0117] By deploying the CDN log system on a distributed cluster server and introducing Zookeeper as a monitoring service component for data synchronization and monitoring, Zookeeper can immediately notify the CDN log system once the path data changes, reducing unnecessary network transmission, thereby improving the overall performance of the CDN log system. In addition, it can prevent the cluster servers of the CDN log system from being affected by the stability of the third-party cache components when they are connected to the third-party cache components, thereby improving the stability of the CDN log system.
[0118] Figure 5 1 is a schematic diagram of a structure of an electronic device according to an exemplary embodiment of the present application. The electronic device may be, for example, a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a personal digital assistant, a server, a smart home appliance, etc. Figure 5 At the hardware level, the electronic device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, and may also include hardware required for other services. The processor 502 reads the corresponding computer program from the non-volatile memory 510 into the memory 508 and then runs it, forming a CDN log system or CDN management system at the logical level. Of course, in addition to the software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0119] Figure 6 is a block diagram of a CDN log system according to an exemplary embodiment of the present application. Figure 6 , the device may include: a receiving module 602, a storage module 604, a monitoring module 606 and a statistical module 608, wherein:
[0120] The receiving module 602 is used to receive a change identifier of CDN infrastructure data sent by the CDN management system;
[0121] The storage module 604 is used to store the change identifier in the path data corresponding to the CDN infrastructure data;
[0122] The monitoring module 606 is used to monitor changes in the path data and trigger the CDN log system to send a data query request to the CDN management system;
[0123] The statistics module 608 is used to perform data statistics according to the CDN infrastructure data returned by the CDN management system.
[0124] In one example, the statistics module 608, when used to perform data statistics based on the CDN infrastructure data returned by the CDN management system, includes: obtaining the node identification information in the CDN log and the CDN usage corresponding to each CDN node; matching the node identification information in the CDN log with the node identification information in the CDN infrastructure data to obtain the CDN usage corresponding to the CDN infrastructure data.
[0125] In one example, the monitoring service component includes multiple paths corresponding to different statistical dimensions, and the data query request carries the target statistical dimension corresponding to the CDN infrastructure data, and the target statistical dimension is the statistical dimension of the CDN infrastructure to which the CDN infrastructure data belongs; the storage module 604, when used to store the change identifier in the path data corresponding to the CDN infrastructure data, includes: based on the target statistical dimension corresponding to the CDN infrastructure data, determining the path corresponding to the CDN infrastructure data; according to the path corresponding to the CDN infrastructure data, storing the change identifier in the path data; the statistical module 608, when used to perform data statistics based on the CDN infrastructure data returned by the CDN management system, includes: performing data statistics based on the dimension facility data corresponding to the target statistical dimension returned by the CDN management system, and the dimension facility data includes the CDN infrastructure data.
[0126] In one example, the statistics module 608, when used to perform data statistics based on the CDN infrastructure data returned by the CDN management system, includes: storing the CDN infrastructure data; and performing data statistics using the stored CDN infrastructure data.
[0127] In one example, the CDN log system is deployed on a distributed cluster server, and the monitoring service component includes Zookeeper.
[0128] In one example, the change identifier includes the latest update time of the CDN infrastructure data.
[0129] Figure 7 is a block diagram of a CDN management system according to an exemplary embodiment of the present application. Figure 7 , the device may include: a detection module 702, a query module 704 and a sending module 706, wherein:
[0130] The detection module 702 is used for sending a change identifier of the CDN infrastructure data to a monitoring service component in the CDN log system in response to detecting a change operation of the CDN infrastructure data, so that the monitoring service component monitors the change of the path data corresponding to the CDN infrastructure data, and triggers the sending of a data query request;
[0131] The query module 704 is configured to query the CDN infrastructure data in response to receiving the data query request sent by the CDN log system;
[0132] The sending module 706 is used to send the CDN infrastructure data to the CDN log system so that the CDN log system can perform data statistics.
[0133] In one example, the query module 704, when used to query the CDN infrastructure data in response to receiving the data query request sent by the CDN log system, includes: based on the target statistical dimension carried by the data query request, querying the dimensional facility data corresponding to the target statistical dimension, the target statistical dimension is the statistical dimension of the CDN infrastructure to which the CDN infrastructure data belongs, and the dimensional facility data includes the CDN infrastructure data; the sending module 706, when used to send the CDN infrastructure data to the CDN log system, includes: sending the dimensional facility data to the CDN log system.
[0134] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0135] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0136] In an exemplary embodiment, a non-temporary computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor to implement a method performed by a CDN log system or a method performed by a CDN management system as in any of the above embodiments.
[0137] The non-temporary computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc., and the present application does not limit this.
[0138] In an exemplary embodiment, a computer program product including a computer program / instructions is also provided. The computer program / instructions can be executed by a processor to implement the method performed by the CDN log system or the method performed by the CDN management system in any of the above embodiments.
[0139] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0140] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions claimed herein. The present application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
[0141] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A statistical method for content distribution network CDN infrastructure data, characterized in that: The method is applied to a CDN log system, wherein the CDN log system includes a monitoring service component, and the method includes: The monitoring service component receives a change identifier of the CDN infrastructure data sent by the CDN management system; The monitoring service component stores the change identifier in the path data corresponding to the CDN infrastructure data; The monitoring service component monitors the change of the path data, triggering the CDN log system to send a data query request to the CDN management system; Data statistics are performed according to the CDN infrastructure data returned by the CDN management system to obtain CDN usage corresponding to the CDN infrastructure data.
2. The method according to claim 1, characterized in that The performing data statistics according to the CDN infrastructure data returned by the CDN management system includes: Obtain the node identification information and CDN usage corresponding to each CDN node in the CDN log; The node identification information in the CDN log is matched with the node identification information in the CDN infrastructure data.
3. The method according to claim 1, characterized in that The monitoring service component includes multiple paths corresponding to different statistical dimensions, and the data query request carries a target statistical dimension corresponding to the CDN infrastructure data, where the target statistical dimension is a statistical dimension of the CDN infrastructure to which the CDN infrastructure data belongs; The monitoring service component stores the change identifier in the path data corresponding to the CDN infrastructure data, including: Determining a path corresponding to the CDN infrastructure data based on a target statistical dimension corresponding to the CDN infrastructure data; According to the path corresponding to the CDN infrastructure data, storing the change identifier in the path data; The performing data statistics according to the CDN infrastructure data returned by the CDN management system includes: Data statistics are performed according to the dimension facility data corresponding to the target statistical dimension returned by the CDN management system, wherein the dimension facility data includes the CDN infrastructure data.
4. The method according to claim 1, characterized in that: The performing data statistics according to the CDN infrastructure data returned by the CDN management system includes: Storing the CDN infrastructure data; Use the stored CDN infrastructure data for data statistics.
5. The method according to claim 1, characterized in that The CDN log system is deployed on a distributed cluster server, and the monitoring service component includes Zookeeper.
6. The method according to claim 1, characterized in that The change identifier includes the latest update time of the CDN infrastructure data.
7. A statistical method for CDN infrastructure data, characterized in that: The method is applied to a CDN management system, and the method includes: In response to detecting a change operation of the CDN infrastructure data, sending a change identifier of the CDN infrastructure data to a monitoring service component in the CDN log system, so that the monitoring service component monitors changes in path data corresponding to the CDN infrastructure data, triggering the sending of a data query request; In response to receiving the data query request sent by the CDN log system, querying the CDN infrastructure data; The CDN infrastructure data is sent to the CDN log system so that the CDN log system performs data statistics to obtain CDN usage corresponding to the CDN infrastructure data.
8. The method according to claim 7, characterized in that The step of querying the CDN infrastructure data in response to receiving the data query request sent by the CDN log system includes: Based on the target statistical dimension carried in the data query request, query the dimension facility data corresponding to the target statistical dimension, wherein the target statistical dimension is the statistical dimension of the CDN infrastructure to which the CDN infrastructure data belongs, and the dimension facility data includes the CDN infrastructure data; The sending the CDN infrastructure data to the CDN log system includes: The dimensional facility data is sent to the CDN log system.
9. A CDN log system, characterized in that: The CDN log system includes a monitoring service component, and the CDN log system also includes: A receiving module, used for receiving a change identifier of CDN infrastructure data sent by a CDN management system; A storage module, used for storing the change identifier in the path data corresponding to the CDN infrastructure data; A monitoring module, configured to monitor changes in the path data and trigger the CDN log system to send a data query request to the CDN management system; The statistics module is used to perform data statistics according to the CDN infrastructure data returned by the CDN management system to obtain the CDN usage corresponding to the CDN infrastructure data.
10. A CDN management system, characterized in that: The CDN management system includes: A detection module, configured to, in response to detecting a change operation of CDN infrastructure data, send a change identifier of the CDN infrastructure data to a monitoring service component in a CDN log system, so that the monitoring service component monitors changes in path data corresponding to the CDN infrastructure data, thereby triggering the sending of a data query request; A query module, configured to query the CDN infrastructure data in response to receiving the data query request sent by the CDN log system; The sending module is used to send the CDN infrastructure data to the CDN log system, so that the CDN log system performs data statistics and obtains the CDN usage corresponding to the CDN infrastructure data.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 8 by running the executable instructions.
12. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by the processor, the method described in any one of claims 1 to 6 or the method described in any one of claims 7 to 8 is implemented.
13. A computer program product having a computer program / instructions stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 8 is implemented.
Citation Information
Patent Citations
CDN bandwidth scheduling system and method
CN107465708A
CDN monitoring system and method
CN107707414A