Domain name configuration information consistency processing method and device, equipment and medium
By reading and converting domain name configuration information in the CDN, a summary list is formed and distributed to the edge machine, comparing and fixing the problem of inconsistent configuration information, the problem of inconsistent domain name configuration information in the CDN is solved, and the accuracy and real-time acceleration are improved.
Patent Information
- Application Number
- CN202411667641.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-04
AI Technical Summary
During the acceleration process of content distribution network (CDN), due to the large number of edge machines, the problem of inconsistent domain name configuration information is prone to affect the accuracy and real-time nature of CDN acceleration.
By reading the target configuration information in the configuration platform's database, converting it into the target value, and saving it in the cache, forming a summary list. Then the manifest file is sent to the edge machine, the edge machine decompresses and compares the target value with the standard value, determines the difference and reports it to the configuration platform, so as to achieve consistency repair of domain name configuration information.
It realizes the rapid identification and repair of domain name configuration information, improves the accuracy and real-time nature of CDN acceleration, and avoids the problem of manual inspection and handling of inconsistent configurations.
Smart Images

Figure CN119766779A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for processing consistency of domain name configuration information. Background Art
[0002] In the process of implementing content delivery network (CDN) acceleration, a very important link is the configuration and delivery of domain names. Domain name configuration information includes but is not limited to basic information of domain names, acceleration range, back-to-source configuration, Hypertext Transfer Protocol Secure (HTTPS) configuration, cache configuration, access control, file processing, etc. The accuracy of domain name configuration often determines the availability and accuracy of CDN accelerated content, and ultimately affects the user experience. However, in the specific configuration delivery scenario, due to the large number of edge machines (tens of thousands or even more), various reasons are often encountered, such as edge machine systems, network jitter, resource pool data anomalies, and the addition of new edge machines to the resource pool, which causes the domain name configuration information in some servers to be inconsistent with the current latest domain name configuration information.
[0003] Therefore, there is an urgent need for a consistency processing method that can quickly identify and repair inconsistent domain name configuration information to improve the accuracy and real-time performance of CDN acceleration. Summary of the invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the problem in the related art that inconsistent domain name configuration information cannot be quickly identified and repaired.
[0005] In order to solve the above technical problems, the present invention provides a method for processing domain name configuration information consistency, and the method for processing domain name configuration information consistency includes:
[0006] The target configuration information is read from a database of the configuration platform according to a preset reading method with a first preset time as a cycle, and the target configuration information is converted into a target value according to a preset conversion method, and the target value is stored in a cache to obtain a summary list; the target configuration information is the domain name configuration information currently in effect for a single component; and a single component corresponds to at least one domain name configuration information;
[0007] Taking a second preset time as a period, obtaining the summary list, packaging the summary list to obtain a list file, and sending it to the edge machine;
[0008] When the edge machine receives the manifest file, decompressing the manifest file into a target component directory;
[0009] With a third preset time as a period, the target value is read from the target component directory to obtain a standard value, wherein the standard value is obtained by converting the standard configuration information in the edge machine according to the preset conversion method, and the standard configuration information is the domain name configuration information corresponding to a single component in the actual component directory in the edge machine, and when there is a difference between the target value and the standard value, the difference value is determined; based on a preset reporting format, corresponding reporting data is determined according to the difference value, and the reporting data is sent to the configuration platform;
[0010] In the configuration platform, when it is determined that there is a difference between the target value in the cache and the difference value in the reported data, and there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value, the domain name configuration information corresponding to the difference value is re-sent to the edge machine.
[0011] In an optional implementation manner, the step of reading the target configuration information from a database of the configuration platform according to a preset reading method includes:
[0012] The target configuration information is read from the database of the configuration platform in sequence according to the components, resource pools, levels, and domain names.
[0013] In an optional implementation, when the preset conversion method is the MD5 algorithm, converting the target configuration information into a target value according to the preset conversion method includes:
[0014] Convert the target configuration information into a target MD5 value according to the MD5 algorithm;
[0015] The standard value is a standard MD5 value, and the standard MD5 value is obtained by converting the standard configuration information in the edge machine according to the MD5 algorithm.
[0016] In an optional embodiment, when there is a difference between the target value and the standard value, after determining the difference value, the method further includes: adding 1 to the cumulative number; wherein, when the target value and the standard value are the same, the cumulative number is reset to zero.
[0017] In an optional implementation, the determining corresponding reporting data according to the difference value based on a preset reporting format, and sending the reporting data to the configuration platform includes:
[0018] When the accumulated number of times is greater than the preset number of times, corresponding reporting data is determined according to the difference value based on a preset reporting format, and the reporting data is sent to the configuration platform.
[0019] In an optional embodiment, the method further includes:
[0020] With the fourth preset time as a period, the edge machine is controlled to convert the domain name configuration information corresponding to each component in the actual component directory of the edge machine according to the preset conversion method to obtain a full configuration list, and based on the preset reporting format, the full reporting data corresponding to the full configuration list is determined, and the full reporting data is sent to the configuration platform.
[0021] In an optional embodiment, the preset reporting format includes a message header format and a message body format, the message header format includes the unique identifier of the edge machine, a timestamp and a reporting data description, the reporting data description includes a target component directory and a data offset, and the message body format includes the file name corresponding to a single component in the actual component directory and the difference value.
[0022] In a second aspect, the present invention provides a domain name configuration information consistency processing device, the domain name configuration information consistency processing device comprising:
[0023] The first processing module is used to read the target configuration information from the database of the configuration platform according to the preset reading method at a first preset time period, and convert the target configuration information into a target value according to the preset conversion method, and store the target value in the cache to obtain a summary list; the target configuration information is the domain name configuration information currently in effect for a single component; and a single component corresponds to at least one domain name configuration information;
[0024] A second processing module is used to obtain the summary list at a second preset time period, package the summary list to obtain a list file, and send it to the edge machine;
[0025] A third processing module, configured to decompress the manifest file into a target component directory when the edge machine receives the manifest file;
[0026] A fourth processing module is used to read the target value from the target component directory at a third preset time period to obtain a standard value, wherein the standard value is obtained by converting the standard configuration information in the edge machine according to the preset conversion method, and the standard configuration information is the domain name configuration information corresponding to a single component in the actual component directory in the edge machine, and when there is a difference between the target value and the standard value, determine the difference value; based on a preset reporting format, determine corresponding reporting data according to the difference value, and send the reporting data to the configuration platform;
[0027] The fifth processing module is used to re-send the domain name configuration information corresponding to the difference value to the edge machine in the configuration platform when it is determined that there is a difference between the target value in the cache and the difference value in the reported data, and there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value.
[0028] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the domain name configuration information consistency processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a single computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the domain name configuration information consistency processing method of the above-mentioned first aspect or any corresponding embodiment thereof.
[0030] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the domain name configuration information consistency processing method of the above-mentioned first aspect or any corresponding embodiment thereof.
[0031] The technical solution provided by the present invention has the following technical effects:
[0032] The technical solution of the embodiment of the present invention reads the domain name configuration information of a single component that is in effect from the database of the configuration platform, and performs format conversion according to a preset conversion method, and performs archive cache processing on the target value after the format conversion to obtain a summary list, which can effectively reduce the amount of data and effectively utilize the cache space. The first preset time is used as a period, and the cache processing is performed periodically to ensure the real-time and accuracy of the target value stored in the cache, that is, the real-time and accuracy of the domain name configuration information are improved. The summary list is packaged into a list file and sent to the edge machine. Only the target value (specifically the target MD5 value) is sent to the edge machine, and there is no domain name configuration information, which improves the transmission speed. In the edge machine, the received manifest file is decompressed to the target component directory, and the domain name configuration information corresponding to the component in the actual component directory in the edge machine is periodically converted according to the preset conversion method to obtain a standard value (specifically, a standard MD 5 value), and the standard value corresponding to the component in the actual component directory in the edge machine is compared with the target value issued by the configuration platform to determine whether there is a difference between the two. For example, for component 1, there are 5 target values issued by the configuration platform, and the component in the edge machine has 4 standard values, which means that there is a difference between the two, and it is necessary to determine the difference value, for example, the difference value b. After that, it is necessary to determine the corresponding reporting data B based on the difference value b based on the preset reporting format, and send the reporting data B to the configuration platform. In order to ensure that the difference really exists and improve the accuracy of the judgment, a secondary confirmation is performed on the configuration platform, and the data in the cache and the data in the database are compared respectively. If there is a difference, the domain name configuration information corresponding to the difference value b is re-issued to the edge machine. With the third preset time as the period, periodic comparison can be performed, so that inconsistencies can be discovered in time, and the domain name configuration information can be re-issued in time to achieve consistency of the domain name configuration information. Based on the technical solution of the present invention, there is no need to manually check and process configuration inconsistencies, and inconsistent data can be automatically repaired, and inconsistent domain name configuration information can be quickly identified and repaired, thereby improving the accuracy and real-time performance of CDN acceleration. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 It is a flowchart of a method for processing consistency of domain name configuration information according to an embodiment of the present invention;
[0035] Figure 2is a schematic diagram of a list file according to an embodiment of the present invention;
[0036] Figure 3 It is a schematic diagram of the overall framework of an embodiment of the present invention;
[0037] Figure 4 It is a structural diagram of a device for processing consistency of domain name configuration information according to an embodiment of the present invention;
[0038] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0040] The embodiments of the present invention provide a method, device, equipment and medium for processing consistency of domain name configuration information to solve the problem that inconsistent domain name configuration information cannot be quickly identified and repaired.
[0041] According to an embodiment of the present invention, an embodiment of a method for processing consistency of domain name configuration information is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 1 It is a flowchart of a method for processing consistency of domain name configuration information according to an embodiment of the present invention.
[0043] like Figure 1 As shown, a method for processing domain name configuration information consistency is provided in an embodiment of the present invention. In order to more clearly describe the technical solution of the present invention, a single component of a single resource pool is used as an example to illustrate the method for processing domain name configuration information consistency. In actual application, it is aimed at all resource pools in the configuration platform and all components under each resource pool. The technical solution of the present invention is applied to each component in each resource pool in the configuration platform to realize the identification and repair of inconsistent domain name configuration information.
[0044] The domain name configuration information consistency processing method includes:
[0045] S101: Read target configuration information from a database of a configuration platform according to a preset reading method with a first preset time as a cycle, convert the target configuration information into a target value according to a preset conversion method, store the target value in a cache, and obtain a summary list.
[0046] In this embodiment, the target configuration information is the domain name configuration information currently in effect for a single component. A single component corresponds to at least one domain name configuration information. For example, the component (e.g., component 1) corresponds to 5 domain name configuration information. When performing conversion, the 5 domain name configuration information can be converted into 5 target values according to a preset conversion method, and the 5 target values are stored in the cache, and the summary list includes the 5 target values.
[0047] In this embodiment, the first preset time is set to at least minute level, and on this basis, it can be set and modified according to actual needs, for example, it can be set to 30 seconds.
[0048] In this embodiment, the target configuration information is read from the database of the configuration platform according to a preset reading method in S101, specifically including: reading the target configuration information from the database of the configuration platform in sequence according to components, resource pools, levels, and domain names.
[0049] In this embodiment, when the preset conversion method is the MD5 algorithm, converting the target configuration information into a target value according to the preset conversion method in S101 specifically includes:
[0050] The target configuration information is converted into a target MD5 value according to the MD5 algorithm. Taking the above example, the summary list corresponding to the component 1 includes 5 target MD5 values.
[0051] In this embodiment, the MD5 algorithm is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value, which can improve the integrity and consistency of information during transmission. Considering that the storage space of the MD5 value is large, which is not conducive to storage and transmission, in order to further reduce the number of characters, the MD5 value can be Base64 encoded after the MD5 value is calculated. The Base64 encoding can convert binary data into printable ASCII characters, thereby reducing the number of characters required. By improving the speed of data storage, transmission, packaging, and decompression in the entire process, the identification and repair of inconsistent domain name configuration information can be further improved.
[0052] As an example, S101 may specifically be: a scheduled task is executed once every 30 seconds (configurable), and the domain name configuration information that is in effect and corresponds to a component in the target resource pool in the configuration platform is read from the database to the cache. The domain name configuration information is read from the database by component, resource pool, level, and domain name, the MD5 value corresponding to the domain name configuration information is calculated, and the MD5 value is cached in the memory.
[0053] S102: Taking the second preset time as a period, obtaining a summary list, packaging the summary list, obtaining a list file, and sending it to an edge machine, for example, a bottom-level Agent component.
[0054] In this embodiment, the second preset time is set to at least minute level, and on this basis, it can be set and modified according to actual needs, for example, it can be set to 30 seconds.
[0055] In actual application, since it is aimed at all components in each resource pool in the configuration platform, the summary list obtained with the second preset time as the period includes the target values corresponding to multiple components. Before packaging and issuing, the target values in the summary list need to be classified by resource pool and level, and the components are used as the directory to generate an MD5 list file of domain name configuration content divided by components with resource pool and level as the dimension, such as Figure 2 As shown, the manifest files named "Component 1", "Component 2", "Component 3", and "Component 4" are included. The manifest file named "Component 1" is compressed and packaged to obtain a manifest file named "MD5 Manifest 1". The format of the manifest file is a JSON array: domain name id (used to uniquely identify the domain name), file name, MD5 value, timestamp (timestamp when the manifest file is generated), version number. By calculating the MD5 value of the domain name configuration information, the component is used as the internal directory of the compressed package as a distinction, and the content can be separated by commas to reduce the amount of data transmission and save bandwidth and disk space.
[0056] S103: When the edge machine receives the manifest file, it decompresses the manifest file into the target component directory.
[0057] In this embodiment, when the edge machine receives the manifest file, it decompresses the manifest file into the target component directory by component. As an example, the target component directory includes a manifest file named "Component 1". The manifest file named "Component 1" includes 5 MD5 values.
[0058] S104: Read the target value from the target component catalog at a third preset time period, obtain the standard value, and determine the difference value when there is a difference between the target value and the standard value. Based on the preset reporting format, determine the corresponding reporting data according to the difference value, and send the reporting data to the configuration platform.
[0059] In this embodiment, the standard value is obtained by converting the standard configuration information in the edge machine according to a preset conversion method, and the standard configuration information is the domain name configuration information corresponding to a single component in the actual component directory in the edge machine.
[0060] In this embodiment, the third preset time is set to at least the minute level, and on this basis, it can be set and modified according to actual needs. For example, it can be set to 1 minute. As an example, after the underlying Age nt component receives the MD5 manifest file, it decompresses the MD5 manifest file to the specified directory (target component directory) by component, and the underlying Agent component scans the MD5 manifest file regularly for 1 minute (configurable), reads the target MD5 value, and reads the domain name configuration information corresponding to each component from the actual component directory in turn by component, and calculates the standard MD5 value based on the domain name. Compare the target value and the standard value to find out the missing and inconsistent difference values in the edge machine. When the difference value is scanned, the reporting data is generated and reported to the configuration platform through the reporting service.
[0061] In this embodiment, the target value issued by the configuration platform is stored in the target component directory, and the standard value in the edge machine is stored in the actual component directory. When the preset conversion method is the MD5 algorithm, the corresponding standard value is the standard MD5 value, and the standard MD5 value is obtained by converting the standard configuration information in the edge machine according to the MD5 algorithm. The difference value is the MD5 value. In this embodiment, when it is determined that there is a difference between the target value and the standard value, all the standard values in the component are determined as the difference value. As an example, the target value corresponding to component 1 issued by the configuration platform is: MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4. The standard value corresponding to component 1 in the edge machine is MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4, MD5 value 5, and there is a difference between the two, and MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4, MD5 value 5 are used as the difference value. As another example, the target value corresponding to component 1 issued by the configuration platform is: MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4, MD5 value 5. The standard values corresponding to component 1 in the edge machine are MD5 value 1, MD5 value 2, MD5 value 3, and MD5 value 6. There are differences between the two, and the difference values are determined to be MD5 value 1, MD5 value 2, MD5 value 3, and MD5 value 6.
[0062] The preset reporting format includes a message header format and a message body format. The message header format includes the unique identifier of the edge machine, a timestamp, and a reporting data description. The message body format includes the file name and difference value corresponding to a single component in the actual component directory. The reporting data description includes a component directory and a data offset. The component directory is determined according to the difference value. When the difference value is the target value, the component directory is the target component directory. When the difference value is the standard value, the component directory is the actual component directory. The data offset is used to divide the components to which the difference values belong. For example, from nm (including m) belongs to component 1, and from m (excluding m)-k belongs to component 2.
[0063] As an example, when all standard values in a single component are determined as difference values, the message header format is:
[0064]
[0065] The above “component catalogue” is the actual component catalogue.
[0066] As an example, when all standard values in a single component are determined as difference values, the message body format is: file name, MD5 value, for example, component 1, MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4, MD5 value 5.
[0067] In the present invention, in another optional implementation, the difference value may also be the different MD5 values between the target value and the standard value. As an example, the target value corresponding to component 1 issued by the configuration platform is: MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4. The standard value corresponding to component 1 in the edge machine is MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4, MD5 value 5, then there is a difference between the two, and the difference value is determined to be MD5 value 5. As another example, the target value corresponding to component 1 issued by the configuration platform is: MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 4, MD5 value 5. The standard value corresponding to component 1 in the edge machine is MD5 value 1, MD5 value 2, MD5 value 3, MD5 value 6, then there is a difference between the two, and the difference value is determined to be MD5 value 4, MD5 value 5, and MD5 value 6.
[0068] Correspondingly, when the different MD5 values between the target value and the standard value are determined as the difference value, the message header format includes two sets of component directories and data offsets, one set is the actual component directory and data offset, and the other set is the target component directory and data offset. Correspondingly, the "MD5 value" in the message body format is the different MD5 value between the target value and the standard value.
[0069] In this embodiment, data reporting is implemented through a customized message header format and message body format, which reduces the amount of data transmission, saves bandwidth, and improves the efficiency of deserializing messages on the configuration platform.
[0070] In this embodiment, in order to improve the accuracy of the judgment, when there is a difference between the target value and the standard value, after determining the difference value, the domain name configuration information consistency processing method also includes: accumulating abnormal statistics on the difference value, and adding 1 to the cumulative number. When the target value and the standard value are the same, the cumulative number is reset. For example, in the first cycle, it is determined that there is a difference value A, and the cumulative number is 1. In the second cycle, it is determined that there is a difference value A, and the cumulative number is added by 1, and the cumulative number is 2. In the third cycle, it is determined that there is a difference value A, and the cumulative number is added by 1, and the cumulative number is 3. When the cumulative number is greater than the preset number, based on the preset reporting format, the corresponding reporting data is determined according to the difference value, and the reporting data is sent to the configuration platform. As an example, when the preset number is set to 2, reporting is required when the cumulative number is 3.
[0071] S105: In the configuration platform, when it is determined that there is a difference between the target value in the cache and the difference value in the reported data, and there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value, the domain name configuration information corresponding to the difference value is re-sent to the edge machine.
[0072] In this embodiment, when all standard values corresponding to a single component are determined as difference values, in the configuration platform, when it is determined that there is a difference between the target value in the cache and the difference value in the reported data, and there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value, the domain name configuration information corresponding to the difference value is re-sent to the edge machine. In order to further improve the accuracy and speed of judgment, the present invention preferably determines all standard values corresponding to a single component as difference values, and based on this, performs a secondary confirmation in the configuration platform.
[0073] In this embodiment, in order to further improve the accuracy of identification, after the reported data is reported to the configuration platform, the configuration platform performs a secondary confirmation to determine whether there is a difference between the target value in the cache and the difference value in the reported data. When it is determined that there is a difference between the target value in the cache and the difference value in the reported data, it is determined whether there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value, or whether there is a difference between the target value and the difference value corresponding to the target configuration information in the database. When it is determined that there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value, or when it is determined that there is a difference between the target value and the difference value corresponding to the target configuration information in the database, the domain name configuration information corresponding to the difference value is re-issued to the edge machine, and the configuration information corresponding to the domain name is re-issued to update and modify the domain name configuration information. The reported difference value is first compared with the target value in the cache maintained in S101 to confirm whether there is a difference. If a difference is found, the latest domain name configuration information is obtained from the database again and compared with the domain name configuration information converted from the difference value. Finally, it is confirmed that there is a difference, and the configuration of the domain name on the edge machine is re-issued to achieve final consistency of the configuration data.
[0074] In this embodiment, when the different MD5 values between the target value and the standard value are determined as the difference value, the secondary confirmation method is as follows: in the configuration platform, it is determined whether the target value in the cache has the difference value (MD5 value) in the target component directory in the reported data. If it is determined that it exists, it is determined that there is a difference between the target value in the cache and the standard value in the edge machine. Alternatively, it is determined whether the target value in the cache has the MD5 value in the actual component directory in the reported data. If it is determined that it does not exist, it is determined that there is a difference between the target value in the cache and the standard value in the edge machine. When it is determined that there is a difference between the target value in the cache and the standard value in the edge machine, it is determined whether there is domain name configuration information corresponding to the MD5 value in the target component directory in the reported data in the target configuration information in the database. If it is determined that it exists, or it is determined whether there is domain name configuration information corresponding to the MD5 value in the actual component directory in the reported data in the target configuration information in the database. If it is determined that it does not exist, the domain name configuration information corresponding to the component is re-issued to the edge machine. Specifically, all domain name configuration information corresponding to the component can be re-issued, and the domain name configuration information of the component in the edge machine is updated to the re-issued domain name configuration information. You can also add the domain name configuration information corresponding to the MD5 value in the target component directory in the reported data, and delete the domain name configuration information corresponding to the MD5 value in the actual component directory in the reported data.
[0075] The overall process of consistency comparison and automatic repair of the technical solution of the present invention is: MD5 data cache, MD5 data delivery, bottom-level comparison, abnormal reporting, secondary confirmation, and execution of repair. The overall framework of the technical solution of the present invention is as follows: Figure 3As shown. The configuration platform periodically performs MD5 calculations on all domain name configuration information that is in effect in the configuration platform according to the four dimensions of component, resource pool, level, and domain name, and obtains several unique strings. The MD5 values corresponding to the effective domain name configuration information are summarized according to the resource pool + level dimensions, and the summarized data is compressed and packaged through gzip as an MD5 list file, which is sent to the corresponding edge machine. The edge machine decompresses the received compressed package data to the specified directory. The underlying Agent component in the edge machine periodically scans the data in the MD5 list directory into the memory, and performs MD5 calculations on the domain name configuration information in the actual component directory. The calculated standard value is compared with the target value in the MD5 list file. If the comparison is inconsistent, it is reported to the configuration platform. After the configuration platform makes a second confirmation and determines that there is indeed a problem with the data, the latest domain name configuration information of the corresponding domain name is immediately re-sent to the edge machine, so as to achieve final data consistency.
[0076] In this embodiment, in addition to reporting the difference value and repairing the inconsistent domain name configuration information, the full configuration list of each component price can also be reported periodically, with the fourth preset time as the period, the edge machine is controlled to convert the domain name configuration information corresponding to each component in the actual component directory in the edge machine according to the preset conversion method to obtain the full configuration list, based on the preset reporting format, determine the full reporting data corresponding to the full configuration list, and send the full reporting data to the configuration platform. The fourth preset time can be set and modified according to actual needs.
[0077] Taking a single component as an example, the full configuration list corresponding to component 1 includes the MD5 values corresponding to all domain name configuration information in component 1. If component 1 corresponds to 10 domain name configuration information, then the full configuration list corresponding to component 1 includes 10 MD5 values. Based on the preset reporting format, the full reporting data corresponding to the full configuration list corresponding to component 1 is determined, and the full reporting data corresponding to component 1 is sent to the configuration platform.
[0078] In this embodiment, in addition to processing the domain name configuration information with differences, the configuration platform will also determine the full configuration list reported by the underlying Agent component. This is also a secondary confirmation. The configuration platform finds the differences and sends them down for repair. If the delivery fails, the preset time is retried (it can be set and modified as needed, for example, 3 times). If it still fails after the retry, the operation and maintenance personnel are prompted to check whether the edge machine is abnormal through an alarm.
[0079] The technical effects of the technical solution of the present invention are as follows:
[0080] Consistency: The domain name configuration information currently in effect in the database is archived and cached, and packaged and sent to the bottom layer. If a difference occurs, a second confirmation is performed on the configuration platform to ensure the accuracy of the data. The domain name configuration information with differences is then redeployed and sent to achieve the final consistency of the data.
[0081] Real-time: MD5 manifest files are sent out every minute, and configurations are reported and repaired every minute. Once any inconsistency in the configuration occurs, it can be repaired within minutes.
[0082] Convenience: After the operation and maintenance or the customer issues the configuration, there is no need to manually check and handle configuration inconsistencies, and inconsistent data can be automatically repaired.
[0083] Efficiency: By performing Base64 encoding on the MD5 value, the number of characters is reduced and the transmission efficiency is improved.
[0084] It should be noted that the contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.
[0085] In this embodiment, a domain name configuration information consistency processing device is also provided. A single device is used to implement the above-mentioned embodiment and optional implementation methods. The descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0086] Figure 4 It is a structural diagram of a device for processing consistency of domain name configuration information according to an embodiment of the present invention.
[0087] The present invention provides a domain name configuration information consistency processing device, such as Figure 4 As shown, the domain name configuration information consistency processing device includes:
[0088] The first processing module 11 is used to read the target configuration information from the database of the configuration platform according to the preset reading method at a first preset time period, and convert the target configuration information into a target value according to the preset conversion method, and store the target value in the cache to obtain a summary list. The target configuration information is the domain name configuration information currently in effect for a single component. A single component corresponds to at least one domain name configuration information.
[0089] The second processing module 12 is used to obtain the summary list with the second preset time as a period, and pack the summary list into a list file, and send it to the edge machine.
[0090] The third processing module 13 is used to decompress the manifest file into a target component directory when the edge machine receives the manifest file.
[0091] The fourth processing module 14 is used to read the target value from the target component directory at a third preset time period to obtain the standard value, where the standard value is obtained by converting the standard configuration information in the edge machine according to the preset conversion method, and the standard configuration information is the domain name configuration information corresponding to a single component in the actual component directory in the edge machine. When there is a difference between the target value and the standard value, the difference value is determined. Based on the preset reporting format, the corresponding reporting data is determined according to the difference value, and the reporting data is sent to the configuration platform.
[0092] The fifth processing module 15 is used to re-send the domain name configuration information corresponding to the difference value to the edge machine in the configuration platform when it is determined that there is a difference between the target value in the cache and the difference value in the reported data, and there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value.
[0093] In an optional implementation, the first processing module 11 includes a first processing unit.
[0094] The first processing unit is used to read the target configuration information from the database of the configuration platform in sequence according to the components, resource pools, levels, and domain names.
[0095] In an optional implementation, the first processing module 11 further includes a second processing unit.
[0096] The second processing unit is configured to convert the target configuration information into a target MD5 value according to the MD5 algorithm when the preset conversion method is the MD5 algorithm.
[0097] In an optional implementation, the fourth processing module 14 includes a first processing unit, which is used to convert the standard configuration information in the edge machine according to the MD5 algorithm to obtain a standard value, specifically a standard MD5 value.
[0098] In an optional implementation, the fourth processing module 14 is further configured to, when there is a difference between the target value and the standard value, after determining the difference value, add 1 to the cumulative number. When the target value and the standard value are the same, the cumulative number is reset to zero.
[0099] In an optional implementation, the fifth processing module 15 is specifically configured to determine corresponding reporting data according to the difference value based on a preset reporting format when the cumulative number of times is greater than a preset number of times, and send the reporting data to the configuration platform.
[0100] In an optional implementation, the domain name configuration information consistency processing device further includes: a full reporting module.
[0101] The full reporting module is used to control the edge machine to convert the domain name configuration information corresponding to each component in the actual component directory of the edge machine according to the preset conversion method to obtain a full configuration list with the fourth preset time as a period, determine the full reporting data corresponding to the full configuration list based on the preset reporting format, and send the full reporting data to the configuration platform.
[0102] In an optional embodiment, the preset reporting format includes a message header format and a message body format. The message header format includes the unique identifier of the edge machine, a timestamp and a reporting data description. The reporting data description includes a target component directory and a data offset. The message body format includes the file name and difference value corresponding to a single component in the actual component directory.
[0103] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0104] The domain name configuration information consistency processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0105] The embodiment of the present invention also provides a computer device having the above Figure 4 The domain name configuration information consistency processing device shown.
[0106] See also Figure 5 , Figure 5 Schematic diagram of the hardware structure of the computer device according to the embodiment of the present invention. Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In an optional embodiment, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor device). Figure 5 A processor 10 is taken as an example.
[0107] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0108] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0109] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating device, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In an optional embodiment, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.
[0111] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0112] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0113] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0114] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for processing consistency of domain name configuration information, characterized in that: include: The target configuration information is read from a database of the configuration platform according to a preset reading method with a first preset time as a cycle, and the target configuration information is converted into a target value according to a preset conversion method, and the target value is stored in a cache to obtain a summary list; the target configuration information is the domain name configuration information currently in effect for a single component; A single component corresponds to at least one domain name configuration information; Taking a second preset time as a period, obtaining the summary list, packaging the summary list to obtain a list file, and sending it to the edge machine; When the edge machine receives the manifest file, decompressing the manifest file into a target component directory; The target value is read from the target component directory at a third preset time period to obtain a standard value, wherein the standard value is obtained by converting the standard configuration information in the edge machine according to the preset conversion method, and the standard configuration information is the domain name configuration information corresponding to a single component in the actual component directory in the edge machine, and when there is a difference between the target value and the standard value, the difference value is determined; Based on a preset reporting format, determining corresponding reporting data according to the difference value, and sending the reporting data to the configuration platform; In the configuration platform, when it is determined that there is a difference between the target value in the cache and the difference value in the reported data, and there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value, the domain name configuration information corresponding to the difference value is re-sent to the edge machine.
2. The method according to claim 1, characterized in that The step of reading the target configuration information from a database of the configuration platform according to a preset reading method includes: The target configuration information is read from the database of the configuration platform in sequence according to the components, resource pools, levels, and domain names.
3. The method according to claim 1, characterized in that When the preset conversion method is the MD5 algorithm, converting the target configuration information into a target value according to the preset conversion method includes: Convert the target configuration information into a target MD5 value according to the MD5 algorithm; The standard value is a standard MD5 value, and the standard MD5 value is obtained by converting the standard configuration information in the edge machine according to the MD5 algorithm.
4. The method according to claim 1, characterized in that When there is a difference between the target value and the standard value, after determining the difference value, the method further includes: adding 1 to the cumulative number; wherein, when the target value and the standard value are the same, the cumulative number is reset to zero.
5. The method according to claim 4, characterized in that The determining corresponding reporting data according to the difference value based on the preset reporting format, and sending the reporting data to the configuration platform includes: When the accumulated number of times is greater than the preset number of times, corresponding reporting data is determined according to the difference value based on a preset reporting format, and the reporting data is sent to the configuration platform.
6. The method according to claim 1, characterized in that The method further comprises: With the fourth preset time as a period, the edge machine is controlled to convert the domain name configuration information corresponding to each component in the actual component directory of the edge machine according to the preset conversion method to obtain a full configuration list, and based on the preset reporting format, the full reporting data corresponding to the full configuration list is determined, and the full reporting data is sent to the configuration platform.
7. The method according to claim 1, characterized in that The preset reporting format includes a message header format and a message body format. The message header format includes the unique identifier of the edge machine, a timestamp and a reporting data description. The reporting data description includes a target component directory and a data offset. The message body format includes the file name corresponding to a single component in the actual component directory and the difference value.
8. A domain name configuration information consistency processing device, characterized in that: include: The first processing module is used to read the target configuration information from the database of the configuration platform according to the preset reading method at a first preset time period, convert the target configuration information into a target value according to the preset conversion method, store the target value in the cache, and obtain a summary list; the target configuration information is the domain name configuration information currently in effect for a single component; A single component corresponds to at least one domain name configuration information; A second processing module is used to obtain the summary list at a second preset time period, package the summary list to obtain a list file, and send it to the edge machine; A third processing module, configured to decompress the manifest file into a target component directory when the edge machine receives the manifest file; A fourth processing module is used to read the target value from the target component directory at a third preset time period to obtain a standard value, wherein the standard value is obtained by converting the standard configuration information in the edge machine according to the preset conversion method, and the standard configuration information is the domain name configuration information corresponding to a single component in the actual component directory in the edge machine, and when there is a difference between the target value and the standard value, determine the difference value; based on a preset reporting format, determine corresponding reporting data according to the difference value, and send the reporting data to the configuration platform; The fifth processing module is used to re-send the domain name configuration information corresponding to the difference value to the edge machine in the configuration platform when it is determined that there is a difference between the target value in the cache and the difference value in the reported data, and there is a difference between the target configuration information in the database and the standard configuration information corresponding to the difference value.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the domain name configuration information consistency processing method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the domain name configuration information consistency processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for pulling configuration data by client
CN105187231A
Method, device and system for updating configuration information
CN105553727A
Distributed system and configuration method
CN106059825A
Configuration file repairing method and device for CDN (Content Delivery Network) system
CN118677774A
Consistency check method and apparatus for distributed edge cloud edge nodes
WO2023093079A1