CDN (Content Delivery Network) server configuration cleaning method, device, equipment, medium and program product
By maintaining domain name and resource pool information, receiving configuration files reported by edge machines and verifying and classifying mapping relationships, and automatically cleaning up redundant configuration files on CDN servers in conjunction with secondary confirmation rules, the system solves the performance degradation and business problems caused by redundant configuration files on CDN servers, and improves service stability and operational efficiency.
Patent Information
- Application Number
- CN202511778242.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-10
AI Technical Summary
The presence of redundant domain name configuration files on CDN servers leads to performance degradation and business problems, and existing technologies struggle to quickly identify and clean up these configuration files.
By maintaining domain name information, resource pool information, and preset mapping relationships, the system receives configuration file information periodically reported by edge machines, uses mapping relationships to verify and identify redundant configuration files, classifies them according to domain name status and resource pool information, and automatically cleans up redundant configuration files based on secondary confirmation rules.
It enables rapid identification and accurate cleanup of redundant configuration files on CDN servers, improving the stability and operational efficiency of CDN services and reducing business issues and customer complaints.
Smart Images

Figure CN121509431A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a CDN server configuration cleanup method, apparatus, device, media, and program product. Background Technology
[0002] In the process of accelerating a Content Delivery Network (CDN), the configuration and distribution of domain names is a crucial step, as its accuracy directly impacts the performance and stability of the CDN service. However, various reasons can lead to redundant and residual configuration files on servers. These include operator negligence or misunderstanding that may result in the incorrect distribution of unnecessary domain name configurations; failure to promptly clean up unused configuration files when adjusting usage strategies or scope; and network fluctuations, abnormal resource pool data, or the addition of new servers to the resource pool when deleting or deactivating domain names. These redundant configuration files can affect efficiency and even trigger business problems. Summary of the Invention
[0003] Therefore, it is necessary to provide a CDN server configuration cleaning method, device, equipment, media, and program product that can quickly identify and automatically clean up redundant domain name configuration files to address the above-mentioned technical problems.
[0004] Firstly, this application provides a CDN server configuration cleanup method, including:
[0005] Maintain domain name information, resource pool information, IP information, and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file;
[0006] Receive target configuration file information reported by edge machines at preset intervals; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component;
[0007] Based on the mapping relationship between the target configuration file information and the domain name and component configuration file, preliminary redundant configuration files are identified.
[0008] Based on the domain name status and resource pool information, the preliminary redundant configuration files are classified to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names.
[0009] Based on the secondary confirmation rules corresponding to the type of the configuration file to be cleaned, identify and delete the target redundant configuration files in the configuration file to be cleaned.
[0010] In one embodiment, the target component includes a gateway, an ATS, a dynamic agent, and the QUIC protocol; the edge machine is used to scan the configuration file directory of the target component at a preset period, and compress and package all configuration file information in the configuration file directory to obtain the target configuration file information.
[0011] The target configuration file information reported by the receiving edge machine at a preset period includes:
[0012] The target configuration file information is received via RocketMQ.
[0013] In one embodiment, the step of verifying and identifying preliminary redundant configuration files based on the mapping relationship between the target configuration file information and the domain name and component configuration files includes:
[0014] Perform integrity verification on the target configuration file information;
[0015] After verification, the resource location is queried based on the IP address, and the mapping relationship between the domain name and the component configuration file is queried using the component-resource pool-reporting file name as the key.
[0016] If no matching record is found, the target configuration file information is marked as a preliminary redundant configuration file.
[0017] In one embodiment, after verifying and identifying preliminary redundant configuration files based on the mapping relationship between the target configuration file information and the domain name and component configuration files, the method further includes:
[0018] The initial redundant configuration files are stored in Redis; wherein, the data type of Redis is zset, the element Score is a timestamp, and the element Member is an IP or file name;
[0019] The preliminary redundant configuration files are classified according to domain name status and resource pool information to obtain configuration files to be cleaned up, including:
[0020] Query the initial redundant configuration files stored in Redis at preset intervals;
[0021] The preliminary redundant configuration files are classified based on the domain name status and resource pool information to obtain four categories of configuration files to be cleaned up: non-platform domain names, deleted domain names, disabled domain names, and non-resource pool domain names. The configuration files to be cleaned up are then added to the configuration deletion table.
[0022] In one embodiment, the step of classifying the preliminary redundant configuration files according to domain name status and resource pool information to obtain configuration files to be cleaned up includes:
[0023] If no record for the current domain name exists in the configuration platform, the current domain name will be classified as a non-platform domain name.
[0024] If the current domain name is in the configuration platform as deleted or failed to be deleted, the current domain name will be classified as a deleted domain name;
[0025] If the current domain name is inactive in the configuration platform, classify the current domain name as an inactive domain name;
[0026] If the current domain name status is valid in the configuration platform, but the current server is not in the global resource pool deployed for the current domain name, the current domain name will be classified as a non-resource pool domain name.
[0027] In one embodiment, the step of identifying and deleting the target redundant configuration files in the configuration files to be cleaned according to the secondary confirmation rule corresponding to the type of the configuration file to be cleaned includes:
[0028] For non-platform domains, if the domain does not exist on the configuration platform and is not in the whitelist configuration file, it is determined to be a redundant target configuration file;
[0029] For deleting a domain, if the domain is in the configuration platform status as deleted or failed to delete, and is not in the whitelist configuration file, it is determined to be a redundant target configuration file;
[0030] For a deactivated domain, if the domain is deactivated in the configuration platform, the deactivation time exceeds the preset number of days threshold, the deactivation work order has been completed and it has not been reactivated, and it is not a whitelist configuration file, it is determined to be a target redundant configuration file.
[0031] For non-resource pool domains, if the domain is in normal status on the configuration platform, the deployment method is global deployment, the resource pool change work order has been completed for more than the preset number of days threshold, it is not a whitelist configuration file, and the current server is not in the global resource pool where the domain is deployed, it is determined to be a target redundant configuration file.
[0032] Secondly, this application also provides a CDN server configuration cleanup device, comprising:
[0033] The maintenance module is used to maintain domain name information, resource pool information, IP information, and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file;
[0034] The receiving module is used to receive target configuration file information reported by the edge machine at a preset period; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component;
[0035] The identification module is used to verify and identify preliminary redundant configuration files based on the mapping relationship between the target configuration file information and the domain name and component configuration file.
[0036] The classification module is used to classify the preliminary redundant configuration files according to the domain name status and resource pool information to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names;
[0037] The cleanup module is used to identify and delete target redundant configuration files in the configuration files to be cleaned according to the secondary confirmation rules corresponding to the type of the configuration file to be cleaned.
[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the CDN server configuration cleanup method described in the first aspect.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the CDN server configuration cleanup method described in the first aspect.
[0040] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the CDN server configuration cleanup method described in the first aspect.
[0041] In summary, this application proposes a CDN server configuration cleanup method, apparatus, device, media, and program product, including: maintaining domain name information, resource pool information, IP information, and preset mapping relationships; receiving target configuration file information reported by edge machines at preset intervals; verifying and identifying preliminary redundant configuration files based on the mapping relationship between target configuration file information, domain names, and component configuration files; classifying the preliminary redundant configuration files according to domain name status and resource pool information to obtain configuration files to be cleaned; and identifying and deleting target redundant configuration files in the configuration files to be cleaned according to secondary confirmation rules corresponding to the type of configuration files to be cleaned. This application achieves rapid identification and accurate cleanup of redundant configuration files on CDN servers through a fully automated design of basic data maintenance, underlying reporting, central comparison and verification, statistical classification, secondary confirmation, and deletion cleanup, effectively improving the stability and operational efficiency of CDN services. Attached Figure Description
[0042] Figure 1 A diagram illustrating the application environment of configuring a cleanup method for a CDN server in one embodiment;
[0043] Figure 2 An application environment diagram for configuring a cleanup method for a CDN server in another embodiment;
[0044] Figure 3 A flowchart illustrating the CDN server configuration cleanup method in one embodiment;
[0045] Figure 4 A structural block diagram of a CDN server configured with a cleanup device in one embodiment;
[0046] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0048] The CDN server configuration cleanup method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0049] The CDN server configuration cleanup method provided in this application embodiment can be applied to, for example, Figure 2The diagram shows the configuration center service of the CDN server. Edge machines (terminals) communicate with the configuration center service via the network. The configuration center service connects to the Remote Dictionary Server (Redis) cache and database (configuration deletion table). Edge machines deploy an Agent service for scanning and reporting configuration file information. The configuration center service deploys a basic data maintenance module, a Compare module, a Statistical module, and a Clear module. The basic data maintenance module performs data maintenance logic, the Compare module performs verification logic, the Statistical module performs classification logic, and the Clear module performs cleanup logic. Redis stores initially identified redundant configuration file information. The database stores classification information for configuration files to be cleaned. Edge machines can be various servers within the CDN nodes, and the configuration center service can be implemented using a standalone server or a server cluster of multiple servers.
[0050] In this embodiment, Redis is an open-source, high-performance key-value distributed in-memory database written in ANSI C, and also a NoSQL database that can be based in memory or persisted.
[0051] In one embodiment, such as Figure 3 As shown, a CDN server configuration cleanup method is provided, which can be applied to... Figure 2 Taking the application environment in [the document] as an example, the following steps are included:
[0052] S301 maintains domain name information, resource pool information, IP information, and preset mapping relationships; among which, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file.
[0053] In this embodiment, the central basic data maintenance module within the configuration center service of the CDN server can be used to maintain domain name information, resource pool information (the system divides multiple resource pools according to business modules), IP information, the mapping relationship between resource pools and IPs, the mapping relationship between domain names and resource pools (one domain name specifies a global resource pool deployment), and the mapping relationship between domain names and component configuration files. The mapping relationship between domain names and configuration files is stored in memory in the format of component-resource pool-file name as key and domain name ID as value.
[0054] For example, when adding a new domain, a canary deployment is used. The domain configuration is only deployed to the canary resource pool for testing and acceptance. After successful acceptance, it is switched to the production resource pool for deployment via the resource pool change function. After receiving the domain configuration, the configuration center service reads the basic domain information and saves the following set of key-value mapping data between the domain and the component configuration file in the cache: Key: Gateway Configuration - Canary Resource Pool ID - Domain.json, value: Domain ID; Key: ATS Configuration - Canary Resource Pool ID - dx_domain, value: Domain ID; Key: QIC Configuration - Canary Resource Pool ID - dx_domain, value: Domain ID.
[0055] S302, Receive target configuration file information reported by edge machines at preset intervals; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component.
[0056] In this embodiment, the Agent service on the edge machine executes a scheduled task at a preset period to scan the configuration file directories of target components such as gateway configuration, ATS configuration, dynamic agent, and QUIC configuration. It then compresses and packages all file information in these directories and reports it to the configuration center service via RocketMQ in JSON format. The preset period can be 30 minutes or 45 minutes. It should be noted that the preset period can be flexibly configured according to the needs of the actual application scenario.
[0057] In practical applications, the reported message can include the reporting IP, reporting type (fixed to full report), reporting reason (scheduled scan or forced full report), reporting timestamp, and a list of reported file information (including file path, total number of files, and file name list). It's important to note that the actual content and message type of the reported message can be customized according to the specific needs of the application scenario.
[0058] In one embodiment, the target component includes a gateway, an ATS, a dynamic agent, and a QUIC protocol; the edge machine is used to scan the configuration file directory of the target component according to a preset period, and compress and package the full configuration file information in the configuration file directory to obtain the target configuration file information; receiving the target configuration file information reported by the edge machine according to a preset period includes: receiving the target configuration file information through RocketMQ.
[0059] Among them, ATS (Apache Traffic Server) is a high-performance, modular HTTP proxy and caching server. QUIC (Quick UDP Internet Connections) is a UDP-based protocol designed to provide a faster, more secure, and more efficient way to transmit data over the network. RocketMQ is an open-source distributed message middleware that provides low-latency, highly reliable message publishing and subscription services based on highly available distributed cluster technology.
[0060] In one embodiment, the edge machine is also configured with a forced full reporting trigger procedure, which triggers forced full reporting when the reporting frequency or success rate is detected to be below a threshold, with the process being consistent with timed reporting.
[0061] In practical applications, the integrity of the reported messages from each edge service stored in the cache can be checked periodically to determine whether the reporting frequency and success rate have reached the threshold (configurable). If not, a mechanism to force the full reporting of configuration file information is triggered, which will force the corresponding edge machine to report the full information.
[0062] S303, based on the mapping relationship between the target configuration file information and the domain name and component configuration file, verify and identify the initial redundant configuration files.
[0063] In one embodiment, the specific steps of S203 include:
[0064] Perform integrity verification on the target configuration file information; after the verification passes, query the resource location based on the IP address, and query the mapping relationship between the domain name and the component configuration file using the component-resource pool-reported file name as the key; if no matching record is found, mark the target configuration file information as a preliminary redundant configuration file.
[0065] In this embodiment, the central data Compare module of the configuration center service receives and decompresses the reported data. First, it performs an integrity check by comparing the total number of files with the length of the filename list, and saves the check result to the cache. Then, it checks and compares the reported data according to component type, queries the resource pool to which the reported IP belongs, and uses the component-resource pool-reported filename as the key to query the mapping relationship between the domain name and the component configuration file in memory. Configuration files for which no matching record is found are marked as preliminary redundant configuration files.
[0066] In one embodiment, after verifying and identifying preliminary redundant configuration files based on the mapping relationship between target configuration file information, domain names, and component configuration files, the CDN server configuration cleanup method further includes:
[0067] Initialize the excess configuration files and store them in Redis; where the Redis data type is zset, the element Score is a timestamp, and the element Member is an IP address or file name.
[0068] S304. Based on the domain name status and resource pool information, the initial redundant configuration files are classified to obtain the configuration files to be cleaned up. The configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names.
[0069] In this embodiment, before performing the file classification step, the preliminary redundant configuration files stored in Redis are queried according to a preset period. Then, the preliminary redundant configuration files are classified in combination with the domain name status and resource pool information to obtain four types of configuration files to be cleaned up: non-platform domain names, deleted domain names, disabled domain names, and non-resource pool domain names. The configuration files to be cleaned up are then added to the configuration deletion table.
[0070] In this embodiment, the classification logic can specifically adopt the following judgment method:
[0071] If no record for the current domain exists in the configuration platform, the current domain is classified as a non-platform domain. If the current domain is in a deleted or failed deletion state in the configuration platform, the current domain is classified as a deleted domain. If the current domain is in a disabled state in the configuration platform, the current domain is classified as a disabled domain. If the current domain is in a valid state in the configuration platform, but the current server is not in the global resource pool deployed for the current domain, the current domain is classified as a non-resource pool domain.
[0072] In this embodiment, non-platform domain names generally result in redundant configuration files due to operator negligence or misunderstanding leading to the incorrect distribution of unnecessary domain name configurations. Domain name deletion typically results in redundant configuration files appearing on some servers due to network jitter, abnormal resource pool data, or new servers being added to the resource pool during the cleanup of configuration files on the CDN server. Deactivated domain names generally result in redundant configuration files appearing on some servers due to network jitter, abnormal resource pool data, or new servers being added to the resource pool during the cleanup of configuration files on the CDN server. Non-resource pool domain names generally result in the failure to promptly clean up unused configuration files during business adjustments to usage strategies or scope.
[0073] In this embodiment, the central Statistical module of the configuration center service can execute a scheduled task at a preset period of 1 hour (configurable) to query Redis for preliminary redundant configuration file information within 1 hour (configurable). It obtains information such as domain status, resource pool, and product type by querying basic domain data, and categorizes the redundant configuration files into four types: non-platform domains, deleted domains, disabled domains, and non-resource pool domains. The categorized configuration file information to be deleted is then stored in the configuration deletion table of the database. It should be noted that the preset period for querying Redis can also be set according to the needs of the actual application scenario.
[0074] S305, based on the secondary confirmation rules corresponding to the type of configuration file to be cleaned, identify and delete the target redundant configuration files in the configuration files to be cleaned.
[0075] In this embodiment, the central Clear module of the configuration center service scans the configuration deletion table in real time and executes the corresponding secondary confirmation rules according to the classification type of the configuration files to be cleaned:
[0076] For non-platform domains, if the domain does not exist on the configuration platform and is not in the whitelist configuration file, it is determined to be a redundant target configuration file;
[0077] For deleting a domain, if the domain is in the configuration platform status as deleted or failed to delete, and is not in the whitelist configuration file, it is determined to be a redundant target configuration file;
[0078] For a deactivated domain, if the domain is deactivated in the configuration platform, the deactivation time exceeds the preset number of days threshold, the deactivation work order has been completed and it has not been reactivated, and it is not a whitelist configuration file, it is determined to be a target redundant configuration file.
[0079] For non-resource pool domains, if the domain is in normal status on the configuration platform, the deployment method is global deployment, the resource pool change work order has been completed for more than the preset number of days threshold, it is not a whitelist configuration file, and the current server is not in the global resource pool where the domain is deployed, it is determined to be a target redundant configuration file.
[0080] In practical applications, special files for dynamic agents require additional confirmation according to customized rules. After confirming that a file is a redundant configuration file, the configuration center service sends a delete command downwards, and the edge machines execute the deletion operation.
[0081] In summary, this embodiment provides a CDN server configuration cleanup method. Through a fully automated design encompassing basic data maintenance, underlying reporting, central comparison and verification, statistical classification, secondary confirmation, and deletion cleanup, it achieves rapid identification and accurate cleanup of redundant CDN server configuration files, completing the entire process from identification to cleanup in as little as 1.5 hours. Custom message format compression reduces data transmission volume, saves bandwidth, and improves deserialization efficiency. Redis's zset is used to store intermediate data, enhancing data processing efficiency. Differentiated secondary confirmation rules ensure the accuracy of the cleanup operation and avoid business risks. The entire method supports dynamic configuration of multiple parameters to adapt to different business scenarios, effectively improving the stability and operational efficiency of CDN services and reducing business problems and customer complaints.
[0082] In a more detailed embodiment, the specific steps of the CDN server configuration cleanup method provided in this embodiment may include:
[0083] Set the background, add a new domain name using gray-scale configuration, only deploy it to the gray-scale resource pool for testing and acceptance. After acceptance, switch to the official resource pool deployment through the resource pool change function. The residual configuration files in the gray-scale resource pool need to be cleaned up.
[0084] At this time, the central basic data maintenance module reads the basic information of the domain name and saves the mapping relationship in the cache: Key=Gateway configuration-Gray resource pool ID-domain.json, value=domain ID; Key=ats configuration-Gray resource pool ID-dx_domain, value=domain ID; Key=quic configuration-Gray resource pool ID-dx_domain, value=domain ID.
[0085] The Agent service of the edge machine (IP: 1.1.1.1) of the gray-scale resource pool scans the configuration file directory through a scheduled task and reports messages including IP, reporting type, reporting reason (scheduled reporting), reporting timestamp and file information list (including files such as "domain.json", "dx_domain", "dx_domain2" etc.).
[0086] After the central data Compare module decompresses and reports the data, it queries the gray-scale resource pool to which it belongs based on IP1.1.1.1. It queries the mapping relationship using "component-gray-scale resource pool ID-file name" as the key. It finds that there is no matching record for "dx_domain2" and marks it as a preliminary redundant configuration file to be stored in Redis.
[0087] The central Statistical module queries Redis to obtain the initial redundant configuration file information, combines it with the domain name's basic data to determine that the domain name's status is normal, classifies it as a non-resource pool domain name, and adds it to the configuration deletion table.
[0088] The central Clear module detected the file to be cleaned, confirmed that it belonged to a non-resource pool domain, and that the resource pool change work order had been completed more than 7 days ago, it was not a whitelist configuration file, and the current server was not in the official resource pool. It then issued a delete command, and the edge machine deleted the "dx_domain2" file.
[0089] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0090] Based on the same inventive concept, this application also provides a CDN server configuration cleanup apparatus for implementing the CDN server configuration cleanup method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations in one or more CDN server configuration cleanup apparatus embodiments provided below can be found in the limitations of the CDN server configuration cleanup method described above, and will not be repeated here.
[0091] In one embodiment, such as Figure 4 As shown, a CDN server configuration cleanup device 400 is provided, including: a maintenance module 410, a receiving module 420, an identification module 430, a classification module 440, and a cleanup module 450, wherein:
[0092] The maintenance module 410 is used to maintain domain name information, resource pool information, IP information and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file;
[0093] The receiving module 420 is used to receive target configuration file information reported by the edge machine at a preset period; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component;
[0094] The identification module 430 is used to verify and identify preliminary redundant configuration files based on the mapping relationship between the target configuration file information and the domain name and component configuration file;
[0095] The classification module 440 is used to classify the preliminary redundant configuration files according to the domain name status and resource pool information to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, disabled domain names, and non-resource pool domain names;
[0096] The cleaning module 450 is used to identify and delete the target redundant configuration files in the configuration files to be cleaned according to the secondary confirmation rules corresponding to the type of the configuration file to be cleaned.
[0097] In one embodiment, the identification module 430 is further configured to perform integrity verification on the target configuration file information; after the verification is successful, the module queries the resource location based on the IP address and queries the mapping relationship between the domain name and the component configuration file using the component-resource pool-reporting file name as the key; if no matching record is found, the target configuration file information is marked as a preliminary redundant configuration file.
[0098] In one embodiment, the classification module 440 is further configured to query the preliminary redundant configuration files stored in Redis according to a preset period; classify the preliminary redundant configuration files by combining the domain name status and resource pool information to obtain four types of configuration files to be cleaned up: non-platform domain names, deleted domain names, disabled domain names, and non-resource pool domain names; and put the configuration files to be cleaned up into the configuration deletion table.
[0099] In one embodiment, the classification module 440 is further configured to classify the current domain name as a non-platform domain name if there is no record corresponding to the current domain name in the configuration platform; classify the current domain name as a deleted domain name if the current domain name in the configuration platform is deleted or the deletion failed; classify the current domain name as a disabled domain name if the current domain name in the configuration platform is disabled; and classify the current domain name as a non-resource pool domain name if the current domain name in the configuration platform is valid, but the current server is not in the global resource pool deployed by the current domain name.
[0100] In one embodiment, the cleanup module 450 is further configured to: for non-platform domains, if the domain does not exist on the configuration platform and is not a whitelisted configuration file, determine it as a target redundant configuration file; for deleted domains, if the domain is in a deleted or failed deletion status on the configuration platform and is not a whitelisted configuration file, determine it as a target redundant configuration file; for deactivated domains, if the domain is in a deactivated status on the configuration platform, the deactivation time exceeds a preset number of days threshold, the deactivation work order has been completed and it has not been reactivated, and it is not a whitelisted configuration file, determine it as a target redundant configuration file; for non-resource pool domains, if the domain is in a normal status on the configuration platform, the deployment method is global deployment, the resource pool change work order has been completed for more than a preset number of days threshold, it is not a whitelisted configuration file, and the current server is not in the global resource pool where the domain is deployed, determine it as a target redundant configuration file.
[0101] In summary, this embodiment provides a CDN server configuration cleanup device. Through a fully automated design encompassing basic data maintenance, underlying reporting, central comparison and verification, statistical classification, secondary confirmation, and deletion cleanup, it achieves rapid identification and accurate cleanup of redundant CDN server configuration files, completing the entire process from identification to cleanup in as little as 1.5 hours. Custom message format compression reduces data transmission volume, saves bandwidth, and improves deserialization efficiency. Redis's zset is used to store intermediate data, enhancing data processing efficiency. Differentiated secondary confirmation rules ensure the accuracy of the cleanup operation and avoid business risks. The entire method supports dynamic configuration of multiple parameters to adapt to different business scenarios, effectively improving the stability and operational efficiency of CDN services and reducing business problems and customer complaints.
[0102] The modules in the aforementioned CDN server configuration cleanup device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can invoke and execute the corresponding operations of each module.
[0103] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a CDN server configuration cleanup method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0104] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0105] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0106] Maintain domain name information, resource pool information, IP information, and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file;
[0107] Receive target configuration file information reported by edge machines at preset intervals; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component;
[0108] Based on the mapping relationship between the target configuration file information and the domain name and component configuration file, preliminary redundant configuration files are identified.
[0109] Based on the domain name status and resource pool information, the preliminary redundant configuration files are classified to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names.
[0110] Based on the secondary confirmation rules corresponding to the type of the configuration file to be cleaned, identify and delete the target redundant configuration files in the configuration file to be cleaned.
[0111] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0112] Maintain domain name information, resource pool information, IP information, and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file;
[0113] Receive target configuration file information reported by edge machines at preset intervals; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component;
[0114] Based on the mapping relationship between the target configuration file information and the domain name and component configuration file, preliminary redundant configuration files are identified.
[0115] Based on the domain name status and resource pool information, the preliminary redundant configuration files are classified to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names.
[0116] Based on the secondary confirmation rules corresponding to the type of the configuration file to be cleaned, identify and delete the target redundant configuration files in the configuration file to be cleaned.
[0117] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0118] Maintain domain name information, resource pool information, IP information, and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file;
[0119] Receive target configuration file information reported by edge machines at preset intervals; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component;
[0120] Based on the mapping relationship between the target configuration file information and the domain name and component configuration file, preliminary redundant configuration files are identified.
[0121] Based on the domain name status and resource pool information, the preliminary redundant configuration files are classified to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names.
[0122] Based on the secondary confirmation rules corresponding to the type of the configuration file to be cleaned, identify and delete the target redundant configuration files in the configuration file to be cleaned.
[0123] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A CDN server configuration cleanup method, characterized in that, include: Maintain domain name information, resource pool information, IP information, and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file; Receive target configuration file information reported by edge machines at preset intervals; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component; Based on the mapping relationship between the target configuration file information and the domain name and component configuration file, preliminary redundant configuration files are identified. Based on the domain name status and resource pool information, the preliminary redundant configuration files are classified to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names. Based on the secondary confirmation rules corresponding to the type of the configuration file to be cleaned, identify and delete the target redundant configuration files in the configuration file to be cleaned.
2. The method according to claim 1, characterized in that, The target components include a gateway, an ATS, a dynamic agent, and the QUIC protocol; the edge machine is used to scan the configuration file directory of the target components according to a preset period, and to compress and package all the configuration file information in the configuration file directory to obtain the target configuration file information. The target configuration file information reported by the receiving edge machine at a preset period includes: The target configuration file information is received via RocketMQ.
3. The method according to claim 1, characterized in that, The step of verifying and identifying preliminary redundant configuration files based on the mapping relationship between the target configuration file information and the domain name and component configuration files includes: Perform integrity verification on the target configuration file information; After verification, the resource location is queried based on the IP address, and the mapping relationship between the domain name and the component configuration file is queried using the component-resource pool-reporting file name as the key. If no matching record is found, the target configuration file information is marked as a preliminary redundant configuration file.
4. The method according to claim 1, characterized in that, After verifying and identifying preliminary redundant configuration files based on the mapping relationship between the target configuration file information and the domain name and component configuration file, the method further includes: The initial redundant configuration files are stored in Redis; wherein, the data type of Redis is zset, the element Score is a timestamp, and the element Member is an IP or file name; The preliminary redundant configuration files are classified according to domain name status and resource pool information to obtain configuration files to be cleaned up, including: Query the initial redundant configuration files stored in Redis at preset intervals; The preliminary redundant configuration files are classified based on the domain name status and resource pool information to obtain four categories of configuration files to be cleaned up: non-platform domain names, deleted domain names, disabled domain names, and non-resource pool domain names. The configuration files to be cleaned up are then added to the configuration deletion table.
5. The method according to claim 1, characterized in that, The preliminary redundant configuration files are classified according to domain name status and resource pool information to obtain configuration files to be cleaned up, including: If no record for the current domain name exists in the configuration platform, the current domain name will be classified as a non-platform domain name. If the current domain name is in the configuration platform as deleted or failed to be deleted, the current domain name will be classified as a deleted domain name; If the current domain name is inactive in the configuration platform, classify the current domain name as an inactive domain name; If the current domain name status is valid in the configuration platform, but the current server is not in the global resource pool deployed for the current domain name, the current domain name will be classified as a non-resource pool domain name.
6. The method according to claim 4, characterized in that, The step of identifying and deleting the target redundant configuration files in the configuration files to be cleaned based on the secondary confirmation rules corresponding to the type of the configuration files to be cleaned includes: For non-platform domains, if the domain does not exist on the configuration platform and is not in the whitelist configuration file, it is determined to be a redundant target configuration file; For deleting a domain, if the domain is in the configuration platform status as deleted or failed to delete, and is not in the whitelist configuration file, it is determined to be a redundant target configuration file; For a deactivated domain, if the domain is deactivated in the configuration platform, the deactivation time exceeds the preset number of days threshold, the deactivation work order has been completed and it has not been reactivated, and it is not a whitelist configuration file, it is determined to be a target redundant configuration file. For non-resource pool domains, if the domain is in normal status on the configuration platform, the deployment method is global deployment, the resource pool change work order has been completed for more than the preset number of days threshold, it is not a whitelist configuration file, and the current server is not in the global resource pool where the domain is deployed, it is determined to be a target redundant configuration file.
7. A CDN server configuration cleanup device, characterized in that, The device includes: The maintenance module is used to maintain domain name information, resource pool information, IP information, and preset mapping relationships; wherein, the preset mapping relationships include the mapping relationship between resource pool and IP, the mapping relationship between domain name and resource pool, and the mapping relationship between domain name and component configuration file; The receiving module is used to receive target configuration file information reported by the edge machine at a preset period; wherein, the target configuration file information includes all configuration file information in the configuration file directory of the target component; The identification module is used to verify and identify preliminary redundant configuration files based on the mapping relationship between the target configuration file information and the domain name and component configuration file. The classification module is used to classify the preliminary redundant configuration files according to the domain name status and resource pool information to obtain configuration files to be cleaned up; the configuration files to be cleaned up include non-platform domain names, deleted domain names, deactivated domain names, and non-resource pool domain names; The cleanup module is used to identify and delete target redundant configuration files in the configuration files to be cleaned according to the secondary confirmation rules corresponding to the type of the configuration file to be cleaned.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the CDN server configuration cleanup method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the CDN server configuration cleanup method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the CDN server configuration cleanup method as described in any one of claims 1 to 6.