CN114389942A - CDN configuration method and device, electronic equipment and storage medium - Google Patents

CDN configuration method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114389942A
CN114389942A CN202210028395.0A CN202210028395A CN114389942A CN 114389942 A CN114389942 A CN 114389942A CN 202210028395 A CN202210028395 A CN 202210028395A CN 114389942 A CN114389942 A CN 114389942A
Authority
CN
China
Prior art keywords
cdn
target
configuration information
service configuration
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210028395.0A
Other languages
Chinese (zh)
Inventor
张玉凤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210028395.0A priority Critical patent/CN114389942A/en
Publication of CN114389942A publication Critical patent/CN114389942A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

The application provides a CDN configuration method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring service configuration information which is used for performing service configuration on the current CDN node and corresponds to a target domain name, and acquiring network configuration information used for performing network configuration on the current CDN node; and completing service configuration on the current CDN node according to the target domain names and the target CDN node set identifications which correspond to each other in the service configuration information, and completing network configuration on the current CDN node according to the target CDN node set identifications and the CDN father node information which correspond to each other in the network configuration information. According to the method and the device, the service configuration is carried out through the service configuration information, and the network configuration is carried out through the network configuration information, so that the technical problems that the configuration information issuing efficiency is low in the related technology, and the single configuration content is too large after the network configuration information and the service configuration information are combined, so that the analysis time consumption is long, and the configuration efficiency is low are solved.

Description

CDN configuration method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of cloud service technologies, and in particular, to a CDN configuration method and apparatus, an electronic device, and a storage medium.
Background
Currently, CDN configuration can be roughly divided into two major categories according to a service usage scenario, one category is service configuration, that is, a customer can configure autonomously, and the second category is configuration describing a CDN network structure, which is referred to as network configuration for short. CDN configuration, namely, a user translates acceleration rule information configured by a webpage into a data format in a text or byte code form which can be recognized by a bottom CDN node, so that a data expression form of a customer configuration rule behavior is realized.
In the related technology, because the configuration format of the bottom node is fixed, the network configuration content and the user service configuration content are both issued to the same file and belong to different fields of the same configuration, because the service configuration user is a client, the network structure adjustment user is a technician of a CDN service provider, and the bottom layer fits the network configuration content and the user service configuration content together for analysis, so that the configuration issuing system has to merge the two into a complete configuration before writing the configuration file after issuing the configuration, which brings higher complexity to the configuration issuing and seriously affects the issuing efficiency.
Therefore, the related art has a problem of inefficient CDN configuration.
Disclosure of Invention
The application provides a CDN configuration method and device, electronic equipment and a storage medium, so as to at least solve the problem of low CDN configuration efficiency in the related technology.
According to an aspect of an embodiment of the present application, a CDN configuration method is provided, including:
acquiring service configuration information which is used for performing service configuration on a current CDN node and corresponds to a target domain name, and acquiring network configuration information used for performing network configuration on the current CDN node;
the method comprises the steps of completing service configuration on a current CDN node according to a target domain name and a target CDN node set identifier which correspond to each other in service configuration information, and completing network configuration on the current CDN node according to the target CDN node set identifier and CDN father node information which correspond to each other in network configuration information, wherein the target CDN node set identifier is used for indicating a target CDN node set corresponding to the target domain name, and the CDN father node information is used for indicating a CDN father node of the current CDN node in the target CDN node set.
Optionally, as in the foregoing method, the completing the service configuration on the current CDN node according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information includes:
modifying the historical service configuration file through the service configuration information to obtain a current service configuration file;
and after the historical service configuration information in the memory is updated through the service configuration information in the current service configuration file, and the target domain name and the target CDN node set identifier are correspondingly written into the memory, the service configuration is completed.
Optionally, as in the foregoing method, before the updating the historical service configuration information located in the memory by using the service configuration information in the current service configuration file, the method further includes:
and under the condition that the first modification time of the current service configuration file obtained by modification is determined to be later than the recorded second modification time, obtaining the service configuration information in the current service configuration file, wherein the second modification time is the time of obtaining the historical service configuration file by modification.
Optionally, as in the foregoing method, the completing, according to the target CDN node set identifier and the CDN father node information that correspond to each other in the network configuration information, network configuration on the current CDN node includes:
modifying the historical network structure file through the network configuration information to obtain a current network structure file;
and after the historical network configuration information in a target database is updated through the network configuration information in the current network structure file, and the corresponding relation between the target CDN node set identification and the CDN father node information is established in the target database, the network configuration is completed.
Optionally, as in the foregoing method, before the updating the historical network configuration information located in the target database by the network configuration information in the current network configuration file, the method further includes:
and under the condition that the third modification time of the current network structure file obtained by modification is determined to be later than the recorded fourth modification time, acquiring the network configuration information in the current network structure file, wherein the fourth modification time is the time of obtaining the historical network structure file by modification.
Optionally, as in the foregoing method, after the historical service configuration information located in the memory is updated by the service configuration information in the current service configuration file, the method further includes:
and when a request for target content pointed by the target domain name is received, the target content does not exist in the current CDN node, and the service configuration information does not include a target identifier, acquiring address information of a source station node corresponding to the target domain name from the service configuration information, wherein the target identifier is used for indicating that the source station node has an associated CDN node.
Optionally, as in the foregoing method, after the service configuration of the current CDN node is completed according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information, and the network configuration of the current CDN node is completed according to the target CDN node set identifier and the CDN father node information that correspond to each other in the network configuration information, the method further includes:
when a request for target content pointed by the target domain name is received and the target content does not exist in the current CDN node, querying CDN father node information corresponding to the target CDN node set identification in a target database through the target CDN node set identification;
and obtaining the target content through the CDN father node information.
According to another aspect of the embodiments of the present application, there is also provided a CDN configuration apparatus, including:
the system comprises an acquisition module, a service configuration module and a service configuration module, wherein the acquisition module is used for acquiring service configuration information which is used for performing service configuration on a current CDN node and corresponds to a target domain name, and acquiring network configuration information used for performing network configuration on the current CDN node;
the configuration module is configured to complete service configuration on the current CDN node according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information, and complete network configuration on the current CDN node according to the target CDN node set identifier and CDN father node information that correspond to each other in the network configuration information, where the target CDN node set identifier is used to indicate a target CDN node set corresponding to the target domain name, and the CDN father node information is used to indicate a CDN father node of the current CDN node in the target CDN node set. Alternatively, the method as described previously
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used for storing the computer program; a processor for performing the method steps in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the method steps of any of the above embodiments when the computer program is executed.
In the embodiment of the application, by respectively analyzing the service configuration information and the network configuration information in a mode of respectively performing service configuration through the service configuration information and performing network configuration through the network configuration information, the purpose of simplifying the complexity of issuing the configuration information to the CDN node and improving the analysis efficiency can be achieved, the technical effect of improving the configuration efficiency is achieved, and the technical problems that in the related art, the issue efficiency of the configuration information is seriously affected by combining the network configuration information and the service configuration information into the same file, and the analysis consumes long time and the configuration efficiency is low due to the fact that the content of a single configuration is too large after the network configuration information and the service configuration information are combined are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic flowchart of an alternative CDN configuration method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart diagram illustrating an alternative CDN configuration method according to another embodiment of the present disclosure;
fig. 3 is a schematic flow chart diagram illustrating an alternative CDN configuration method according to another embodiment of the present disclosure;
fig. 4 is a schematic flowchart of an alternative CDN configuration method according to an application example of the present application;
FIG. 5 is a schematic diagram of an alternative configuration file format in accordance with an application example of the present application;
fig. 6 is a block diagram of an alternative CDN configuration device according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, a CDN configuration method is provided. Optionally, in this embodiment, the CDN configuration method may be applied to a hardware environment formed by a terminal and a server. The server is connected with the terminal through a network, can be used for providing services (such as game services and application services) for the terminal or a client installed on the terminal, and can be provided with a database on the server or independent of the server for providing data storage services for the server.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. The terminal may not be limited to a PC, a mobile phone, a tablet computer, and the like.
The CDN configuration method in the embodiment of the present application may be executed by a server, may also be executed by a terminal, and may also be executed by both the server and the terminal. The terminal may execute the CDN configuration method according to the embodiment of the present disclosure, or may execute the CDN configuration method by a client installed on the terminal.
Taking the CDN configuration method in this embodiment executed by a CDN node server as an example, fig. 1 is a schematic flowchart of an optional CDN configuration method according to an embodiment of the present application, and as shown in fig. 1, a flowchart of the method may include the following steps:
step S101, obtaining service configuration information which is used for performing service configuration on the current CDN node and corresponds to the target domain name.
The present application may be applied to a scenario in which any CDN node in a CDN network is configured, for example, a CDN node in the CDN network for performing live streaming delivery is configured, or a CDN node in the CDN network for providing a web browsing service is configured, and the like.
In this embodiment, service configuration information, which is used for performing service configuration on the current CDN node and corresponds to the target domain name, is separately obtained.
The current CDN node may be any CDN node in a target CDN network corresponding to the target domain name, each CDN node may include a plurality of servers, and each server may be configured according to the method in this embodiment.
The target domain name may be a domain name that needs to be configured for a service, and different domain names correspond to different CDN networks, so that different domain names may correspond to different service configuration information.
The service configuration information may be information for configuring a CDN network used for the target domain name.
For example, a customer may determine a CDN node to be configured through a configuration system, perform service configuration on a target domain name, generate service configuration information, and finally issue the service configuration information to the current CDN node.
Step S102, completing service configuration of the current CDN node according to the target domain name and the target CDN node set identification which correspond to each other in the service configuration information, wherein the target CDN node set identification is used for indicating the target CDN node set corresponding to the target domain name.
The service configuration information includes a target domain name and a target CDN node set identifier, so that according to the service configuration information, the current CDN node can obtain a correspondence between the target domain name and the target CDN node set identifier, and based on the correspondence, can locate IP address information of a next-hop node of the current CDN node in the entire network topology.
Further, the target node set identifier may further include a master node set identifier and a backup node set identifier, where the master node set identifier is used to indicate a CDN master node set corresponding to the target domain name, and the backup node set identifier is used to indicate a CDN backup node set corresponding to the target domain name.
In general, each master node in the CDN master node set is preferentially used, and when a master node in the CDN master node set is unavailable (e.g., fails), a backup node in the CDN backup node set is used.
For example, the target domain name and the target CDN node set identifier may be correspondingly loaded into a memory of the current CDN node, so that when the current CDN node determines that the user accesses the target domain name, the content pointed to by the target domain name may be obtained from the target CDN node set according to the target node set identifier.
Step S103, obtaining network configuration information for performing network configuration on the current CDN node.
In this embodiment, network configuration information for performing network configuration on the current CDN node is separately obtained.
The network configuration information may be configuration information generated by operation and maintenance personnel who maintain the CDN network where the current CDN node is located and adjust a logical relationship between each CDN node in the CDN network. A network tree structure may be formed among CDN nodes in the CDN network, and the CDN network may be divided into multiple CDN node layers, where when there is no content accessed by a user in an edge CDN node, the edge CDN node obtains the content from a CDN node in an upper layer thereof, or when there is no content in the CDN node in the upper layer, the edge CDN node continues to access the upper layer until the content is obtained.
Further, there is no specific precedence relationship between step S101 and step 103.
Step S104, according to the target CDN node set identification and CDN father node information which correspond to each other in the network configuration information, network configuration of the current CDN node is completed, wherein the CDN father node information is used for indicating a CDN father node of the current CDN node in the target CDN node set.
The network configuration information includes target CDN node set identifiers and CDN father node information corresponding to each other. Therefore, according to the network configuration information, the current CDN node may obtain a correspondence between the target CDN node set identifier and the CDN father node information.
The CDN father node information is used for indicating the CDN father nodes of the current CDN node in the target CDN node set. For example, the CDN parent node information may be IP information of the CDN parent node; and the CDN parent node may be a node located in the target CDN node set and located at an upper layer of the current CDN node, and the current CDN node may access the CDN parent node, optionally, the CDN parent node information may include but is not limited to: node name, node weight and IP information of the device where the node is located, wherein the node weight determines the proportional relation of the request reaching the node of the layer back to the upper layer.
Further, the target node set identifier may further include a master node set identifier and a backup node set identifier, where the master node set identifier is used to indicate a CDN master node set corresponding to the target domain name, and the backup node set identifier is used to indicate a CDN backup node set corresponding to the target domain name. Thus, CDN parent node information may include: the main CDN father node information is used for indicating a main CDN father node of the current CDN node, the standby CDN father node information is used for indicating a standby CDN father node of the current CDN node, and the priority of the main CDN father node information is higher than that of the standby CDN father node information, so that the current CDN node preferentially accesses the main CDN father node. The backup CDN parent node is only accessed when the primary CDN parent node is unavailable (e.g., fails).
For example, the target CDN node set identifier and the CDN father node information may be stored in a manner of Redis storage, so that when the current CDN node determines that the user accesses the target domain name, the corresponding target CDN node set identifier may be determined by the target domain name, and then the CDN father node information is obtained according to the target CDN node set identifier, so as to access the CDN father node corresponding to the CDN father node information.
Further, there is no specific precedence relationship between step S102 and step 104.
And after the service configuration and the network configuration are completed, the configuration of the current CDN node is completed.
After the service configuration and the network configuration are completed, the configuration of the current CDN node is completed.
Through the CDN configuration method in this embodiment, service configuration is performed through service configuration information, and network configuration is performed through network configuration information, so that the service configuration information and the network configuration information can be analyzed separately, complexity of issuing configuration information to a CDN node can be simplified, and further, the technical problems that in the related art, the network configuration information and the service configuration information are merged into the same file, so that efficiency of issuing configuration information is seriously affected, a configuration single content is too large after merging the network configuration information and the service configuration information, and because multiple domain names can use the same network configuration at the same time, so that duplication of content configuration of an original configuration file is high, when the number of domain names increases, an occupied storage space of the configuration file increases exponentially, and thus analysis time consumption is long can be solved.
As shown in fig. 2, as an alternative embodiment, as the foregoing method, the step S102 of completing service configuration for the current CDN node according to the target domain name and the target CDN node set identifier corresponding to each other in the service configuration information includes the following steps:
step S201, the historical service configuration file is modified through the service configuration information, and the current service configuration file is obtained.
After the service configuration information is obtained, the historical service configuration file of the target CDN node side may be modified according to the service configuration information to obtain a current service configuration file including the service configuration information.
Optionally, a relevant program (agent) may be configured and issued on the node server, and the agent may write the service configuration information into the historical service configuration file, so as to obtain the current service configuration file. For example, all configuration quantities of the agent end are output to a new configuration file, the bottom layer covers the original file in a rename mode to obtain the current service configuration file, and the agent end has a storage component of the agent end: and the derby database stores the domain name configuration sent each time into the derby database. And, the current service configuration file may be used to write service configuration information corresponding to a plurality of domain names.
Optionally, when the historical service configuration file includes the historical service configuration information corresponding to the target domain name, the historical service configuration information may be covered by the service configuration information. When the historical service configuration file does not have the historical service configuration information corresponding to the target domain name, the service configuration information can be directly written into the historical service configuration file, and the current service configuration file is obtained.
Step S202, after updating the historical service configuration information located in the memory through the service configuration information in the current service configuration file, and writing the target domain name and the target CDN node set identifier into the memory correspondingly, completing the service configuration.
After the service configuration information is written in the current CDN node, the service configuration information may be read into the memory of the current CDN node to refresh the historical service configuration information in the memory, so as to achieve the purpose of writing the target domain name and the target CDN node set identifier into the memory correspondingly, thereby completing the service configuration.
By the method in the embodiment, the service configuration of the current CDN node can be quickly realized, the target domain name and the target CDN node set identifier are correspondingly written into the memory, the service configuration can be quickly read at a later stage, and the access efficiency is improved.
As an alternative embodiment, as in the foregoing method, before the step S202 updates the historical service configuration information located in the memory by using the service configuration information in the current service configuration file, the method further includes the following steps:
step S301, under the condition that the first modification time of the current service configuration file obtained by modification is determined to be later than the recorded second modification time, obtaining the service configuration information in the current service configuration file, wherein the second modification time is the time of obtaining the historical service configuration file by modification.
After the service configuration file is modified, the modification time of the service configuration file can also be determined, so that the first modification time of the current service configuration file can be determined, the first modification time is compared with the second modification time of the historical service configuration file obtained through modification, and under the condition that the first modification time is later than the second modification time, the current service configuration file is indicated to be the updated service configuration file.
Further, the service configuration information corresponding to the first modification time in the current service configuration file is acquired, so that the historical service configuration information in the memory can be updated at a later stage according to the service configuration information of the target domain name. Optionally, the service configuration information of all domain names including the target domain name in the current service configuration file may also be obtained, so as to refresh the historical service configuration information in the memory according to the service configuration information of all domain names at a later stage.
For example, by bee _ hive, periodically detecting modifytime (modification time) of a service profile, and when it is determined that the modifytime (modification time) in the service profile is later than the time obtained by the previous detection, determining the service profile as a modified current service profile, and determining service configuration information therein; when the modifytime (modification time) is not changed, the service configuration is determined to be not changed, and bee _ hive is instructed to continue to periodically detect the modifytime (modification time) of the service configuration file.
By the method in the embodiment, the service configuration information can be read only when the service configuration file is determined to be changed, so that the reading times can be effectively reduced.
As shown in fig. 3, as an alternative embodiment, as the foregoing method, the step S104 of completing network configuration on the current CDN node according to the target CDN node set identifier and the CDN parent node information that correspond to each other in the network configuration information includes the following steps:
step S401, the historical network structure file is modified through the network configuration information, and the current network structure file is obtained.
After the service configuration information is obtained, the historical service configuration file of the target CDN node side may be modified according to the service configuration information to obtain a current service configuration file including the service configuration information.
For example, a relevant program (agent) may be configured and issued on the node server, and the agent may write the service configuration information into the historical network structure file, so as to obtain the current network structure file. In addition, the current network configuration file may be used to write network configuration information corresponding to a plurality of domain names.
Optionally, when the historical network structure file includes the historical network configuration information corresponding to the target domain name, the historical network configuration information may be covered by the network configuration information. When the historical network configuration information corresponding to the target domain name does not exist in the historical network configuration file, the network configuration information can be directly written into the historical network configuration file, and the current network configuration file is obtained.
For example, in the case where the historical network configuration information corresponding to the target domain name is included in the historical network configuration file: first historical CDN network structure information corresponding to the target CDN node set identification can be determined in the historical network structure file, wherein the CDN network structure information is used for indicating a logic relationship between CDN nodes in the corresponding CDN network. And modifying the first historical CDN network structure information through the CDN father node information to obtain modified CDN network structure information and obtain a current network structure file obtained by modifying the historical network structure file.
Step S402, after updating the historical network configuration information in the target database through the network configuration information in the current network structure file and establishing the corresponding relation between the target CDN node set identification and the CDN father node information in the target database, the network configuration is completed.
After the network configuration information is written in the current CDN node, the network configuration information can be read into a target database of the current CDN node, so that historical network configuration information in the target database is refreshed according to the network configuration information, and the aim of establishing a corresponding relation between a target CDN node set identifier and CDN father node information in the target database is fulfilled, so that service configuration is completed.
For example, in the case where the historical network configuration information corresponding to the target domain name is included in the historical network configuration file: the second historical CDN network structure information in the Redis storage (a high-performance key-value database) may be updated according to the modified CDN network structure information in the current network structure file, and after a corresponding relationship between the target CDN node set identifier and the CDN parent node information is established in the Redis storage, network configuration is completed, where the second historical CDN network structure information is CDN network structure information corresponding to the target CDN node set identifier in the Redis storage.
By the method in the embodiment, network configuration of the current CDN node can be quickly achieved, the corresponding relation between the target CDN node set identification and the CDN father node information is established in the target database, the target CDN node set identification and the CDN father node information can be read from the target database conveniently in the later period, and therefore the access efficiency of the CDN father node corresponding to the CDN father node information is improved.
As an alternative embodiment, before the step S402 updates the historical network configuration information located in the target database by the network configuration information in the current network configuration file, the method further includes the following steps:
step S501, under the condition that the third modification time of the current network structure file obtained by modification is determined to be later than the recorded fourth modification time, the network configuration information in the current network structure file is obtained, wherein the fourth modification time is the time of obtaining the historical network structure file by modification.
After the network structure file is modified, the modification time of the network structure file can also be determined, so that the third modification time of the current network structure file can be determined, the third modification time is compared with the fourth modification time of the historical network structure file obtained through modification, and under the condition that the third modification time is later than the fourth modification time, the current network structure file is indicated to be the updated network structure file.
And further, network configuration information corresponding to the third modification time in the current network structure file is obtained, so that the historical network configuration information in the target database can be updated according to the network configuration information of the target domain name at a later stage. Optionally, the network configuration information of all domain names including the target domain name in the current network structure file may also be obtained, so that the historical network configuration information in the memory is refreshed according to the network configuration information of all domain names at a later stage.
For example, by bee _ hive, periodically detecting modifytime (modification time) of the network structure file, and when it is determined that the modifytime (modification time) in the network structure file is later than the time obtained by the previous detection, determining the network structure file as a modified current network structure file, and determining network configuration information therein; when the modifytime (modification time) is not changed, the network structure is judged to be not changed, and bee _ hive is instructed to continue to periodically detect the modifytime (modification time) of the network structure file.
By the method in the embodiment, the network configuration information can be read only when the change of the network structure file is determined, so that the reading times can be effectively reduced.
As an alternative embodiment, as in the foregoing method, after the step S202 updates the historical service configuration information located in the memory by using the service configuration information in the current service configuration file, the method further includes the following step S601:
step S601, when a request for target content pointed by a target domain name is received, and a target content does not exist in a current CDN node, and service configuration information does not include a target identifier, acquiring address information of a source node corresponding to the target domain name from the service configuration information, where the target identifier is used to indicate that the source node has an associated CDN node.
When a user accesses a target domain name to request to acquire target content pointed by the target domain name, and the current CDN node can only access an upper CDN node to acquire the target content under the condition that the target content does not exist in the current CDN node. However, if the current CDN node specifies a return client source station, that is, when the current CDN node is not a CDN node provided by the CDN network, the service configuration information does not include the target identifier at this time, so that the address information of the source station node corresponding to the target domain name is directly obtained from the service configuration file, and the target content is read to the local (that is, the current CDN node) by accessing the source station node.
By the method in the embodiment, a mode of directly accessing the source station node and acquiring the target content is provided.
As an optional embodiment, as the foregoing method, after the step S102 completes service configuration on the current CDN node according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information, and the step S104 completes network configuration on the current CDN node according to the target CDN node set identifier and the CDN father node information that correspond to each other in the network configuration information, the method further includes the following steps:
step S701, querying CDN father node information corresponding to a target CDN node set identifier in a target database through the target CDN node set identifier under the condition that a request for target content pointed by a target domain name is received and the target content does not exist in a current CDN node;
step S702, obtaining target content through CDN father node information.
When a user requests to acquire target content pointed by a target domain name by initiating access to the target domain name, but the current CDN node does not have the target content, the current CDN node can only access the upper layer CDN node to acquire the target content.
At this time, the CDN father node information corresponding to the target CDN node set identifier may be queried in the target database through the target CDN node set identifier, then the CDN father node is accessed according to the CDN father node information, the target content is obtained when the target content exists in the CDN father node, and if the target content does not exist in the CDN father node, the previous layer of the CDN father node is continuously accessed according to the father node set identifier in the memory of the CDN father node until the target content is obtained.
For example, when the CDN parent node information is IP information, the CDN parent node corresponding to each piece of IP information is accessed according to the IP information, and when target content exists in the CDN parent node, the target content is acquired. The priority corresponding to each piece of IP information can be preset, and then each CDN father node can be accessed one by one according to the priority.
By the method in the embodiment, a mode of determining CDN father node information based on the target CDN node set identifier and accessing the CDN father node information to obtain target content is provided.
As shown in fig. 4, an application example applying the method of any of the foregoing embodiments is provided:
the optimized configuration file format is shown in fig. 5. Where CDN _ topo _ config ═ T2_ R10.backup ips are backup node set identifiers used to indicate backup CDN parent nodes, CDN _ topo _ config ═ T2_ R10.mainips are master node set identifiers used to indicate master CDN parent nodes, and the network configuration used (i.e., the target CDN node set identifier) is T2_ R10.
The original single configuration file is resolved into two, a configuration file a (i.e., a current service configuration file) is used for recording domain names and service-related configurations (used for recording network configuration reference relations, i.e., target CDN node set identifiers), a configuration file B (i.e., a current service configuration file) is used for recording node network configurations, i.e., IP information of the upper layer active/standby node of the current node (i.e., CDN parent node information), the lower layer parsing logic needs to parse two configuration files, detect modifytime (modification time) of the configuration files (i.e., configuration file a and configuration file B), if profile a (i.e., the current service profile) changes, indicating that the service profile has changed, the service profile is refreshed, if the configuration file B (i.e., the current network structure file) changes, indicating that the network configuration (i.e., the network structure) changes, refreshing the network configuration; the configuration file does not need to be reloaded if the modification time is unchanged.
When a current CDN node receives a request for target content to which a target domain name points, and there is no "CDN _ topo _ config" in service configuration information corresponding to the target domain name in a memory of the current CDN node, after a detection logic is completed, a source node corresponding to the current CDN node is determined, and an anyhost and an a record (which indicates resolution information of the target domain name at the node, that is, next-hop IP address information that needs to be accessed when content accessed by the node does not exist or expires) are updated.
When there is "CDN _ topo _ config" in the service configuration information corresponding to the target domain name in the memory of the current CDN node, the corresponding network configuration (i.e., CDN parent node information) is queried in the target database storing the network configuration according to the target CDN node set identifier of the target domain name.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, an optical disk) and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the methods according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, a CDN configuration device for implementing the CDN configuration method is further provided. Fig. 6 is a block diagram of an alternative CDN configuration device according to an embodiment of the present disclosure, where as shown in fig. 6, the device may include:
the system comprises an acquisition module 1, a service configuration module and a service configuration module, wherein the acquisition module is used for acquiring service configuration information which is used for performing service configuration on a current CDN node and corresponds to a target domain name, and acquiring network configuration information used for performing network configuration on the current CDN node;
the configuration module 2 is configured to complete service configuration on the current CDN node according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information, and complete network configuration on the current CDN node according to the target CDN node set identifier and the CDN father node information that correspond to each other in the network configuration information, where the target CDN node set identifier is used to indicate a target CDN node set corresponding to the target domain name, and the CDN father node information is used to indicate a CDN father node of the current CDN node in the target CDN node set.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be executed in a hardware environment as described in the foregoing embodiments, and may be implemented by software or hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the CDN configuration method, where the electronic device may be a server, a terminal, or a combination thereof.
According to another embodiment of the present application, there is also provided an electronic apparatus including: as shown in fig. 7, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above-described method embodiments when executing the program stored in the memory 1503.
The bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
The embodiment of the present application further provides a computer-readable storage medium, where the storage medium includes a stored program, and when the program runs, the method steps of the above method embodiment are executed.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A CDN configuration method, comprising:
acquiring service configuration information which is used for performing service configuration on a current CDN node and corresponds to a target domain name, and acquiring network configuration information used for performing network configuration on the current CDN node;
the method comprises the steps of completing service configuration on a current CDN node according to a target domain name and a target CDN node set identifier which correspond to each other in service configuration information, and completing network configuration on the current CDN node according to the target CDN node set identifier and CDN father node information which correspond to each other in network configuration information, wherein the target CDN node set identifier is used for indicating a target CDN node set corresponding to the target domain name, and the CDN father node information is used for indicating a CDN father node of the current CDN node in the target CDN node set.
2. The method of claim 1, wherein the completing the service configuration for the current CDN node according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information includes:
modifying the historical service configuration file through the service configuration information to obtain a current service configuration file;
and after the historical service configuration information in the memory is updated through the service configuration information in the current service configuration file, and the target domain name and the target CDN node set identifier are correspondingly written into the memory, the service configuration is completed.
3. The method according to claim 2, wherein before the updating the historical service configuration information located in the memory by the service configuration information in the current service configuration file, the method further comprises:
and under the condition that the first modification time of the current service configuration file obtained by modification is determined to be later than the recorded second modification time, obtaining the service configuration information in the current service configuration file, wherein the second modification time is the time of obtaining the historical service configuration file by modification.
4. The method of claim 1, wherein the completing the network configuration of the current CDN node according to the target CDN node set identifier and CDN parent node information that correspond to each other in the network configuration information comprises:
modifying the historical network structure file through the network configuration information to obtain a current network structure file;
and after the historical network configuration information in a target database is updated through the network configuration information in the current network structure file, and the corresponding relation between the target CDN node set identification and the CDN father node information is established in the target database, the network configuration is completed.
5. The method of claim 4, wherein prior to the updating the historical network configuration information located in the target database with the network configuration information in the current network configuration file, the method further comprises:
and under the condition that the third modification time of the current network structure file obtained by modification is determined to be later than the recorded fourth modification time, acquiring the network configuration information in the current network structure file, wherein the fourth modification time is the time of obtaining the historical network structure file by modification.
6. The method according to claim 2, wherein after the updating of the historical service configuration information located in the memory by the service configuration information in the current service configuration file, the method further comprises:
and when a request for target content pointed by the target domain name is received, the target content does not exist in the current CDN node, and the service configuration information does not include a target identifier, acquiring address information of a source station node corresponding to the target domain name from the service configuration information, wherein the target identifier is used for indicating that the source station node has an associated CDN node.
7. The method according to claim 1, wherein after the service configuration of the current CDN node is completed according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information, and the network configuration of the current CDN node is completed according to the target CDN node set identifier and CDN parent node information that correspond to each other in the network configuration information, the method further includes:
when a request for target content pointed by the target domain name is received and the target content does not exist in the current CDN node, querying CDN father node information corresponding to the target CDN node set identification in a target database through the target CDN node set identification;
and obtaining the target content through the CDN father node information.
8. A CDN configuration apparatus, comprising:
the system comprises an acquisition module, a service configuration module and a service configuration module, wherein the acquisition module is used for acquiring service configuration information which is used for performing service configuration on a current CDN node and corresponds to a target domain name, and acquiring network configuration information used for performing network configuration on the current CDN node;
the configuration module is configured to complete service configuration on the current CDN node according to the target domain name and the target CDN node set identifier that correspond to each other in the service configuration information, and complete network configuration on the current CDN node according to the target CDN node set identifier and CDN father node information that correspond to each other in the network configuration information, where the target CDN node set identifier is used to indicate a target CDN node set corresponding to the target domain name, and the CDN father node information is used to indicate a CDN father node of the current CDN node in the target CDN node set.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein said processor, said communication interface and said memory communicate with each other via said communication bus,
the memory for storing a computer program;
the processor for performing the method steps of any one of claims 1 to 7 by running the computer program stored on the memory.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method steps of any one of claims 1 to 7 when executed.
CN202210028395.0A 2022-01-11 2022-01-11 CDN configuration method and device, electronic equipment and storage medium Pending CN114389942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210028395.0A CN114389942A (en) 2022-01-11 2022-01-11 CDN configuration method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210028395.0A CN114389942A (en) 2022-01-11 2022-01-11 CDN configuration method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114389942A true CN114389942A (en) 2022-04-22

Family

ID=81201758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210028395.0A Pending CN114389942A (en) 2022-01-11 2022-01-11 CDN configuration method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114389942A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101529863A (en) * 2006-10-30 2009-09-09 朗讯科技公司 Method and apparatus for controlling information available from content distribution points
US20130191443A1 (en) * 2012-01-20 2013-07-25 Huawei Technologies Co., Ltd. Method, system, and node for node interconnection on content delivery network
WO2016106596A1 (en) * 2014-12-30 2016-07-07 21 Vianet Group, Inc. Accelerating content delivery in a residence environment
CN105917656A (en) * 2013-11-01 2016-08-31 爱立信股份有限公司 System and method for pre-provisioning adaptive bitrate (ABR) assets in a content delivery network
CN106230782A (en) * 2016-07-20 2016-12-14 腾讯科技(深圳)有限公司 A kind of information processing method based on content distributing network and device
CN107231436A (en) * 2017-07-14 2017-10-03 网宿科技股份有限公司 A kind of method and apparatus for carrying out traffic scheduling
US20180270534A1 (en) * 2017-03-14 2018-09-20 Charter Communications Operating, Llc Time-based dynamic secondary content placement calls in time-shifted content
CN109150576A (en) * 2017-06-28 2019-01-04 华为技术有限公司 A kind of content data transmission method and equipment
CN109150930A (en) * 2017-06-15 2019-01-04 北京金山云网络技术有限公司 Configuration information loading method and device, method for processing business and device
CN109951338A (en) * 2019-03-28 2019-06-28 北京金山云网络技术有限公司 CDN network configuration method, configuration device, electronic equipment and storage medium
CN111082964A (en) * 2019-10-18 2020-04-28 网宿科技股份有限公司 Distribution method and device of configuration information
CN113301098A (en) * 2021-01-05 2021-08-24 阿里巴巴集团控股有限公司 Path planning method, CDN connection establishing method, device and storage medium
US20210392202A1 (en) * 2020-06-11 2021-12-16 Level 3 Communications, Llc Artificial intelligence log processing and content distribution network optimization

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101529863A (en) * 2006-10-30 2009-09-09 朗讯科技公司 Method and apparatus for controlling information available from content distribution points
US20130191443A1 (en) * 2012-01-20 2013-07-25 Huawei Technologies Co., Ltd. Method, system, and node for node interconnection on content delivery network
CN105917656A (en) * 2013-11-01 2016-08-31 爱立信股份有限公司 System and method for pre-provisioning adaptive bitrate (ABR) assets in a content delivery network
WO2016106596A1 (en) * 2014-12-30 2016-07-07 21 Vianet Group, Inc. Accelerating content delivery in a residence environment
CN106230782A (en) * 2016-07-20 2016-12-14 腾讯科技(深圳)有限公司 A kind of information processing method based on content distributing network and device
US20180270534A1 (en) * 2017-03-14 2018-09-20 Charter Communications Operating, Llc Time-based dynamic secondary content placement calls in time-shifted content
CN109150930A (en) * 2017-06-15 2019-01-04 北京金山云网络技术有限公司 Configuration information loading method and device, method for processing business and device
CN109150576A (en) * 2017-06-28 2019-01-04 华为技术有限公司 A kind of content data transmission method and equipment
CN107231436A (en) * 2017-07-14 2017-10-03 网宿科技股份有限公司 A kind of method and apparatus for carrying out traffic scheduling
CN109951338A (en) * 2019-03-28 2019-06-28 北京金山云网络技术有限公司 CDN network configuration method, configuration device, electronic equipment and storage medium
CN111082964A (en) * 2019-10-18 2020-04-28 网宿科技股份有限公司 Distribution method and device of configuration information
US20210392202A1 (en) * 2020-06-11 2021-12-16 Level 3 Communications, Llc Artificial intelligence log processing and content distribution network optimization
CN113301098A (en) * 2021-01-05 2021-08-24 阿里巴巴集团控股有限公司 Path planning method, CDN connection establishing method, device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
洪一帆;: "运营商CDN系统视频内容存储调度策略探讨", 科技与创新, no. 01 *
胡捷 , 王和宇: "IP城域网业务演进对设备、组网的要求", 电信技术, no. 06 *

Similar Documents

Publication Publication Date Title
US11768811B1 (en) Managing user data in a multitenant deployment
US20190068690A1 (en) Automated management of resource attributes across network-based services
US9122560B2 (en) System and method of optimization for mobile apps
US10735537B2 (en) Information pushing
CN110071978B (en) Cluster management method and device
CN108958959B (en) Method and device for detecting hive data table
CN109151025B (en) Load balancing method and device based on URL, computer storage medium and equipment
CN107103011B (en) Method and device for realizing terminal data search
CN103207882A (en) Shop visiting data processing method and system
CN112364110A (en) Metadata management method, device and equipment and computer storage medium
US9514184B2 (en) Systems and methods for a high speed query infrastructure
CN114356921A (en) Data processing method, device, server and storage medium
US11228490B1 (en) Storage management for configuration discovery data
JP2016514334A (en) Guess application inventory
US10182104B1 (en) Automatic propagation of resource attributes in a provider network according to propagation criteria
CN111818175A (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN107526748B (en) Method and equipment for identifying user click behavior
CN113821307B (en) Method, device and equipment for quickly importing virtual machine images
US20220113987A1 (en) Intelligent launch of applications
CN114389942A (en) CDN configuration method and device, electronic equipment and storage medium
US8938520B2 (en) Methods and systems for smart adapters in a social media content analytics environment
CN112732751B (en) Medical data processing method, device, storage medium and equipment
CN110223108B (en) Click through rate prediction method, device and equipment
CN117435215A (en) Development environment deployment method, system, computer device and storage medium
CN115017185A (en) Data processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination