Communication method and system of content distribution network based on cloud server

By using cloud servers as edge nodes and using network address translation devices for address mapping, the problem of limited coverage of edge nodes in traditional CDN networks is solved, efficient and secure content distribution is achieved, and the flexibility and security of the system are improved.

CN120455429APending Publication Date: 2025-08-08CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510531970.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The coverage of edge nodes in traditional content distribution networks is limited by geographical distribution, making it difficult to quickly respond to users' content distribution needs in the network, and the security and performance of fixed infrastructure are limited.

Method used

The cloud server is used as an edge node, and address mapping is carried out through network address conversion devices. It uses the elasticity and virtualization characteristics of cloud servers to realize the communication of private IP addresses, and combines the CDN gateway for security protection and logging to optimize performance and security.

Benefits of technology

It realizes the high availability and disaster recovery capabilities of cloud servers, improves system utilization and performance, enhances security, reduces attack risks, and optimizes network performance and user request response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455429A_ABST
    Figure CN120455429A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a communication method and system of a content distribution network based on a cloud server. The method is applied to network address translation (NAT) equipment in a content delivery network (CDN) system based on a cloud server. The system further comprises at least one cloud server corresponding to the NAT equipment; the method comprises the following steps: receiving a first access request; in response to the first access request, determining a private network IP address of the target cloud server based on a pre-constructed address mapping relationship; the private network IP address of the target cloud server is used for communication between the target cloud server and the NAT equipment; the address mapping relationship is used for indicating a corresponding relationship between a private network IP address and a public network IP address of the cloud server; sending a second access request to the target cloud server based on the private network IP address of the target cloud server; the second access request is used for indicating the target cloud server to send the target file. According to the invention, the cloud server is used as the edge node, and the communication of the edge node in the CDN network is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a communication method and system for a content distribution network based on a cloud server. Background Art

[0002] In the traditional architecture of a Content Delivery Network (CDN), edge nodes rely on fixed infrastructure in computer rooms or data centers, and content distribution relies on pre-deployed distributed caching nodes. However, the coverage of fixed edge nodes is limited by their geographical distribution, making it difficult to quickly respond to the content distribution needs of users in the network. Summary of the Invention

[0003] In view of this, the present invention provides a communication method and system for a content distribution network based on a cloud server, which uses the cloud server as an edge node to solve the communication problem of edge nodes in the CDN network.

[0004] In a first aspect, the present invention provides a communication method for a content delivery network based on a cloud server, applied to a network address translation (NAT) device in a content delivery network (CDN) system based on a cloud server; the CDN system further includes at least one cloud server corresponding to the NAT device; the method comprises:

[0005] Receive a first access request; the first access request is used to instruct a user to access a target file in the CDN system, and is used to indicate the public Internet Protocol IP address of a target cloud server corresponding to the target file;

[0006] In response to the first access request, determining the private IP address of the target cloud server based on the pre-established address mapping relationship; the private IP address of the target cloud server is used for communication between the target cloud server and the NAT device; the address mapping relationship is used to indicate the correspondence between the private IP address of the cloud server and the public IP address;

[0007] Based on the private IP address of the target cloud server, a second access request is sent to the target cloud server; the second access request is used to instruct the target cloud server to send the target file.

[0008] The method provided in this embodiment, on the one hand, utilizes cloud servers as edge cache nodes in a CDN network. Compared to physical servers, cloud servers offer a high degree of elasticity and scalability. Cloud servers can quickly adjust their configuration and capacity based on user needs, enabling on-demand expansion and contraction to adapt to business changes. Secondly, the cloud server's operating environment is virtualized, allowing multiple cloud server instances to run simultaneously on a single physical server, effectively utilizing hardware resources and improving system utilization and performance. Furthermore, cloud services offer high availability and disaster recovery capabilities, enabling data backup and redundant storage across different regions or data centers to ensure business continuity and data security. Furthermore, based on the cloud server's use of private IP addresses for communication, address translation is performed through a NAT device, enabling users to access target files on the cloud server using public IP addresses. Furthermore, by converting the public IP address in user requests to a private IP address for communication with the cloud server, external parties cannot directly access the cloud server's actual private IP address, reducing the risk of cloud server attacks and enhancing the security of the CDN system. In addition, the NAT device and the cloud server communicate through a private network, which is not affected by the complex network conditions of the public network, thereby optimizing the performance of the CDN network.

[0009] In an optional implementation, the second access request includes the source IP address corresponding to the first access request, the private IP address of the target cloud server, and a file identifier; the file identifier is used to indicate the target file.

[0010] Through the above implementation, the target file in the CDN system is uniquely determined by the file identifier (such as hash value, path identifier, etc.) in the second access request, thereby improving the retrieval efficiency of the CDN system, helping the target server to quickly respond to the second access request and return the target file to the user as soon as possible.

[0011] In a second aspect, the present invention provides a communication method for a content delivery network based on a cloud server, which is applied to a cloud server in a content delivery network CDN system based on a cloud server; the CDN system also includes a network address translation (NAT) device corresponding to the cloud server; the method includes:

[0012] Receive a second access request from the NAT device; the second access request is used to instruct the cloud server to send the target file;

[0013] In response to the second access request, the target file is sent to the NAT device based on the private Internet Protocol (IP) address of the cloud server.

[0014] The method provided in this embodiment, on the one hand, utilizes cloud servers as edge cache nodes in a CDN network. Compared to physical servers, cloud servers offer a high degree of elasticity and scalability. Cloud servers can quickly adjust their configuration and capacity based on user needs, enabling on-demand expansion and contraction to adapt to business changes. Secondly, the cloud server's operating environment is virtualized, allowing multiple cloud server instances to run simultaneously on a single physical server, effectively utilizing hardware resources and improving system utilization and performance. Furthermore, cloud services offer high availability and disaster recovery capabilities, enabling data backup and redundant storage across different regions or data centers to ensure business continuity and data security. Furthermore, based on the cloud server's use of private IP addresses for communication, address translation is performed through a NAT device, enabling users to access target files on the cloud server using public IP addresses. Furthermore, by converting the public IP address in user requests to a private IP address for communication with the cloud server, external parties cannot directly access the cloud server's actual private IP address, reducing the risk of cloud server attacks and enhancing the security of the CDN system. In addition, the NAT device and the cloud server communicate through a private network, which is not affected by the complex network conditions of the public network, thereby optimizing the performance of the CDN network.

[0015] In an optional implementation, a CDN gateway is deployed on the cloud server; the CDN gateway is used for the cloud server to respond to the second access request in the CDN; and the CDN gateway is bound to the private IP address of the cloud server.

[0016] In an optional embodiment, the method further includes:

[0017] The CDN gateway records the user access log corresponding to the second access request; the user access log includes the public IP address of the cloud server.

[0018] By recording user access logs and the public IP addresses of cloud servers through the above implementation, the source and destination of each access behavior can be clearly traced. Once abnormal access is discovered, such as frequent requests from a specific source IP address or access during unusual time periods, the problem can be quickly located. Furthermore, if a cloud server is attacked, user access logs containing public IP addresses can serve as important evidence for tracing the source, enhancing the CDN network's anti-attack capabilities.

[0019] In an optional implementation, the cloud server records the user access log corresponding to the second access request through the CDN gateway, including:

[0020] Read the private IP address in the second access request through the CDN gateway;

[0021] Determine the public IP address of the cloud server based on the pre-built address mapping relationship and the private IP address in the second access request; the address mapping relationship is used to indicate the correspondence between the private IP address and the public IP address of the cloud server;

[0022] Determine user access logs based on the public IP address of the cloud server.

[0023] With the above implementation, when a user initiates a request, the corresponding public IP address is recorded. This public IP address is then converted to a private IP address by the NAT device before communication with the cloud server. The CDN gateway reads the private IP address in the second access request and determines the cloud server's public IP address based on a pre-established address mapping. This allows for a complete traceability of the attack path, starting from the public IP address requested by the user, through the NAT device, to the cloud server's private IP address, and then to the cloud server's corresponding public IP address. This facilitates precise tracking of the attack path.

[0024] In an optional embodiment, the method further includes:

[0025] Based on the private IP address of the cloud server, determine the tasks to be performed by the cloud server.

[0026] Through the above implementation, the cloud server obtains the tasks to be performed based on the private IP address as an identifier, so as to adapt to the characteristics of using private IP for communication on the cloud server. The cloud server is used as an edge cache node in the CDN network, realizing the task distribution to the cache node in the CDN network.

[0027] In a third aspect, the present invention provides a communication system for a content distribution network based on a cloud server, the system comprising: a network address translation NAT device, and at least one cloud server corresponding to the network address translation NAT device;

[0028] The NAT device is configured to receive a first access request; the first access request is used to instruct a user to access a target file in the CDN system and is used to indicate the public Internet Protocol IP address of a target cloud server corresponding to the target file; in response to the first access request, the private IP address of the target cloud server is determined based on a pre-established address mapping relationship; the private IP address of the target cloud server is used for communication between the target cloud server and the NAT device; the address mapping relationship is used to indicate the correspondence between the private IP address of the cloud server and the public IP address; based on the private IP address of the target cloud server, a second access request is sent to the target cloud server; the second access request is used to instruct the target cloud server to send the target file;

[0029] The target cloud server is configured to receive and respond to the second access request, and send the target file to the NAT device based on the private Internet Protocol (IP) address of the cloud server.

[0030] The system provided by this embodiment, on the one hand, utilizes cloud servers as edge cache nodes within the CDN network. Compared to physical servers, cloud servers offer a high degree of elasticity and scalability. Cloud servers can quickly adjust their configuration and capacity based on user needs, enabling on-demand expansion and contraction to adapt to business changes. Secondly, the cloud server's operating environment is virtualized, allowing multiple cloud server instances to run simultaneously on a single physical server, effectively utilizing hardware resources and improving system utilization and performance. Furthermore, cloud services offer high availability and disaster recovery capabilities, enabling data backup and redundant storage across different regions or data centers to ensure business continuity and data security. Furthermore, based on the cloud server's use of private IP addresses for communication, address translation is performed through a NAT device, enabling users to access target files on the cloud server using public IP addresses. Furthermore, by converting the public IP address in the user request into a private IP address for communication with the cloud server, external parties cannot directly access the cloud server's actual private IP address, reducing the risk of cloud server attacks and enhancing the security of the CDN system. In addition, the NAT device and the cloud server communicate through a private network, which is not affected by the complex network conditions of the public network, thereby optimizing the performance of the CDN network.

[0031] In a fourth 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 computer instructions to execute the communication method of the cloud server-based content distribution network of the above-mentioned first aspect or any corresponding embodiment thereof.

[0032] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the communication method of a cloud server-based content distribution network of the above-mentioned first aspect or any corresponding embodiment thereof.

[0033] In a sixth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the communication method for a content distribution network based on a cloud server according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. 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 any creative work.

[0035] Figure 1 1 is a flow chart of a communication method for a content distribution network based on a cloud server according to an embodiment of the present invention;

[0036] Figure 2 1 is a flow chart of another communication method of a content distribution network based on a cloud server according to an embodiment of the present invention;

[0037] Figure 3 is a flow chart of another communication method of a cloud server-based content distribution network according to an embodiment of the present invention;

[0038] Figure 4 This is a structural block diagram of a content distribution network system based on a cloud server according to an embodiment of the present invention;

[0039] Figure 5 The figure is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying 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 making creative efforts shall fall within the scope of protection of the present invention.

[0041] The embodiment of the present application provides a communication method for a content distribution network based on a cloud server, which uses the cloud server as an edge node to achieve the communication problem of the edge node in the CDN network. It should be noted that the execution subject of the communication method for a content distribution network based on a cloud server provided in the embodiment of the present invention can be a communication device for a content distribution network based on a cloud server, and the communication device for a content distribution network based on a cloud server can be implemented as part or all of an electronic device through software, hardware, or a combination of software and hardware, wherein the electronic device can be a server or a terminal, wherein the server in the embodiment of the present application can be a single server or a server cluster composed of multiple servers, and the terminal in the embodiment of the present application can be a smart phone, a personal computer, a tablet computer, a wearable device, an intelligent robot, and other intelligent hardware devices. In the following method embodiments, the execution subject is an electronic device as an example for explanation.

[0042] According to an embodiment of the present application, an embodiment of a communication method for a content distribution network based on a cloud server is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system 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.

[0043] The following embodiments of this application will be divided into two parts to exemplarily introduce the communication method scheme of the content distribution network based on the cloud server.

[0044] Part I: Combining Figure 1 、 Figure 2 , introduces the communication method of the cloud server-based content distribution network provided in the embodiment of the present application, aiming to introduce the specific implementation method of the cloud service-based content distribution network system responding to user access requests.

[0045] Part II, Combination Figure 3 , introduces the communication method of the cloud server-based content distribution network provided by the embodiment of the present application, aiming to introduce the specific implementation method of task distribution in the cloud server-based content distribution network system.

[0046] The following, combined Figure 1 、 Figure 2 , introduces the first part of the embodiment of this application, namely the specific implementation method of the cloud service-based CDN system responding to user access requests.

[0047] Figure 1This is a flow chart illustrating a communication method for a cloud server-based content delivery network according to an embodiment of the present invention. The method is applied to a Network Address Translation (NAT) device in a cloud server-based content delivery network (CDN) system; the CDN system also includes at least one cloud server (Elastic Compute Service, ECS) corresponding to the NAT device.

[0048] like Figure 1 As shown, the method is implemented by interaction between the NAT device and the target cloud server. The method specifically includes the following S101-S105:

[0049] S101: A NAT device receives a first access request.

[0050] The first access request is used to instruct the user to access a target file in the CDN system, and is used to indicate the public Internet Protocol (IP) address of a target cloud server corresponding to the target file.

[0051] In one possible implementation, a NAT device is a network layer device that maps public and private network addresses. In this embodiment, the NAT device serves as the public network entrance or private network boundary of the system, acting as a gateway between the public and private networks. This prevents the exposure of private IP addresses within the CDN network and enhances system security.

[0052] In one possible implementation, cloud servers offer a simple, efficient, secure, reliable, and elastically scalable computing service. Cloud server management is simpler and more efficient than physical servers. Users can quickly create or deploy any number of cloud servers without having to purchase hardware in advance. Cloud servers enable the rapid development of more stable and secure applications, reducing development, operations, and overall IT costs, allowing users to focus more on core business innovation.

[0053] In the embodiments of the present application, the cloud server acts as an edge cache node in the CDN system and has a public IP address and a private IP address. The public IP address serves as the device identifier of the cloud server outside the system, enabling communication between the user terminal and the cloud server in the system. The private IP address is used for communication within the cloud server within the system, for example, communication between the NAT device and the cloud server, and communication between the cloud server and the central device in the system (for implementing management of the cloud server, etc.).

[0054] In a possible implementation, a user sends a first access request to a NAT device to obtain a target file in the system.

[0055] Exemplarily, a user sends a first access request to the NAT device via a user terminal, wherein the user terminal may be an electronic device such as a mobile phone or a notebook, and this application does not specifically limit this. For example, the user enters a URL in a browser of the user terminal, and the user terminal generates the first access request.

[0056] For example, the target files may be pictures, videos, network resources, etc.

[0057] Optionally, the first access request includes but is not limited to the source IP address (i.e., the IP address of the user terminal), the public IP address of the target cloud server that the user wants to access, and the file identifier of the target file (such as file name, file path, file hash value) and other information.

[0058] The target cloud server refers to the cloud server where the target file is stored. The public IP address of the target cloud server refers to the address of the target cloud server on the public network. In this system, the cloud server is located based on the public IP address.

[0059] Illustratively, the first access request may be encapsulated in a Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) data packet and transmitted to the NAT device via Hypertext Transfer Protocol Secure (HTTP) / Hypertext Transfer Protocol Secure (HTTPS).

[0060] For example, the IP address of the user terminal of user A is 36.72.45.3. When user A needs to access the file a.txt in the target cloud server with the public IP address 1.1.1.1, the first access request sent to the NAT device may be GET / vod / a.txt HTTP1.1.

[0061] S102: The NAT device determines the private IP address of the target cloud server based on a pre-built address mapping relationship in response to the first access request.

[0062] The private IP address of the target cloud server is used for communication between the target cloud server and the NAT device; the address mapping relationship is used to indicate the correspondence between the private IP address of the cloud server and the public IP address.

[0063] In one possible implementation, when the NAT device receives the first access request, it extracts the public IP address in the first access request, and based on a pre-built address mapping relationship, determines the private IP address corresponding to the public IP address in the first access request, and communicates with the target cloud server based on the private IP address.

[0064] S103: The NAT device sends a second access request to the target cloud server based on the private IP address of the target cloud server.

[0065] The second access request is used to instruct the target cloud server to send the target file.

[0066] S104: The target cloud server receives and responds to the second access request, and sends the target file to the NAT device based on the private Internet Protocol IP address of the cloud server.

[0067] In the above S104, if Figure 1 As shown, the target cloud server responds to the second access request by first determining the target file and then sending the target file to the NAT device based on the private Internet Protocol IP address of the cloud server.

[0068] In one possible implementation, the target cloud server receives data packets from the NAT device through a network card, parses the data packets based on the TCP / UDP protocol, extracts the HTTP / HTTPS request, and thus identifies the target file.

[0069] In one possible implementation, the target cloud server uses a private IP address to send the target file to the NAT device.

[0070] S105: The NAT device receives the target file and forwards the target file to the user terminal.

[0071] Through the method provided by the embodiment of the present application, on the one hand, in the CDN network, the cloud server is used as an edge cache node. Compared with the physical server, the cloud server has a high degree of elasticity and scalability. The cloud server can quickly adjust the configuration and capacity of the cloud server according to user needs, and achieve on-demand expansion and contraction, thereby adapting to changes in the business. Secondly, the operating environment of the cloud server is virtualized, and multiple cloud server instances can be run simultaneously on a physical server, effectively utilizing hardware resources and improving the utilization and performance of the system. In addition, the cloud service also has high availability and disaster recovery capabilities. It can realize data backup and redundant storage through configuration in different regions or data centers to ensure business continuity and data security. On the other hand, based on the characteristics of cloud servers using private IP addresses for communication, address conversion is performed through NAT devices, allowing users to access target files in the cloud server through public IP addresses. On the other hand, the public IP address in the user request is converted into a private IP address to communicate with the cloud server, which also makes it impossible for the outside of the system to directly obtain the real private IP address of the cloud server, reducing the risk of cloud servers being attacked and enhancing the security of the CDN system. In addition, the NAT device and the cloud server communicate through a private network, which is not affected by the complex network conditions of the public network, thereby optimizing the performance of the CDN network.

[0072] In some embodiments, the address mapping relationship is used to define the correspondence between the public IP address and the private IP address, so that the NAT device performs address translation when forwarding the user's access request.

[0073] In one possible implementation, the address mapping relationship can be implemented in a list, table, or any other form of information set consisting of public IP addresses and private IP addresses, such as a key-value pair, which can display the correspondence between the public IP addresses and the private IP addresses. For example, the address mapping relationship is shown in Table 1.

[0074] Table 1

[0075]

[0076] In one possible implementation, the address mapping relationship can be stored in the memory or configuration file of the NAT device, or in other devices, such as the central device, storage device, etc. in the system. This application does not specifically limit the storage location of the address mapping relationship, and it can be limited according to actual conditions.

[0077] In some embodiments, the second access request includes the source IP address corresponding to the first access request, the private IP address of the target cloud server, and a file identifier; the file identifier is used to indicate the target file.

[0078] In a possible implementation, the source IP address corresponding to the first access request is used to indicate the source of the first access request, for example, the IP address of the user terminal.

[0079] In one possible implementation, the private IP address of the target cloud server is used as the device identifier of the cloud server in the CDN network (also called the private network) for internal communication between the cloud server and devices in the system, such as NAT devices.

[0080] In a possible implementation, the file identifier is a character string or parameter used to uniquely identify a target file, and may include information such as a path, a hash value, and a version number.

[0081] In an embodiment of the present application, the target file in the CDN system is uniquely determined by the file identifier (such as a hash value, a path identifier, etc.) in the second access request, thereby improving the retrieval efficiency of the CDN system, helping the target server to quickly respond to the second access request and return the target file to the user as soon as possible.

[0082] In some embodiments, a CDN gateway is deployed on the cloud server. The CDN gateway is used by the cloud server to respond to the second access request in the CDN; the CDN gateway is bound to the private IP address of the cloud server.

[0083] In one possible implementation, a CDN gateway is a software component or service deployed on a cloud server. It serves as the ingress / egress for communication between the cloud server and other devices in the CDN system, such as NAT devices and other cloud servers. It is responsible for receiving, parsing, and forwarding relevant requests from the CDN system, such as the secondary access request. By binding the cloud server's IP address to the CDN gateway, the CDN gateway acts as a communication proxy for that private IP address, and all requests sent to that private IP address are processed by the CDN gateway. Optionally, CDN gateway functions include, but are not limited to, protocol conversion, request routing, security protection, logging, access control, and more.

[0084] Protocol conversion refers to converting internal protocols within the CDN system (such as private RPC protocols) into protocols such as HTTP / HTTPS that are recognized by the cloud server. Request routing refers to distributing requests to different processing modules (such as caching software) within the cloud server based on information such as file identifiers and source IP addresses. Security protection refers to implementing security policies such as access control, traffic cleaning, and data encryption within the cloud server. Taking data encryption as an example, the CDN gateway can encrypt data entering and leaving the cloud server to ensure confidentiality and integrity during transmission. For example, encryption protocols such as Secure Sockets Layer (SSL) and Transport Layer Security (TLS) can be used to encrypt data, preventing it from being eavesdropped or tampered with during transmission. Even if data is intercepted during transmission, attackers cannot obtain sensitive information. Logging refers to the recording of user access requests. Log content includes, but is not limited to, the public IP address of the user requesting, the user's source IP address, and the file identifier of the target file. Regarding access control, the CDN gateway can implement strict access control on all requests at the ingress point. The CDN gateway can determine whether to allow the second access request based on various preset rules, including the corresponding source IP address, request content, and request time. If the second access request is approved, it will respond to the second access request. For example, it can only allow users in a specific region or IP address range to access data on the cloud server. Another example is to grant access to a preset service within a preset time period. This approach effectively prevents unauthorized access and malicious attacks, ensuring the secure and stable operation of the cloud server.

[0085] Exemplarily, the communication method provided in the embodiment of the present application further includes:

[0086] The CDN gateway records the user access log corresponding to the second access request. The user access log contains the public IP address of the cloud server.

[0087] In one possible implementation, the user access log records detailed information about users accessing the cloud server through the CDN system, which is used for business tracing, performance analysis, security protection, etc.

[0088] Exemplarily, user access logs include, but are not limited to, the cloud service's public IP address (used to identify the user's access portal), private IP address, source IP address corresponding to the second access request, request time corresponding to the second access request (such as the time when the second access request is received from the CDN gateway), file identifier, response duration, etc. The request time is the time from when the user sends the first access request to when the CDN gateway receives the second access request.

[0089] For example, based on the public IP addresses of cloud servers in user access logs, it is possible to distinguish different edge nodes in the system, analyze the distribution of user access points, and optimize traffic scheduling. For example, cloud server A (the public IP address corresponding to A is 1.1.1.1) and cloud server B (the public IP address corresponding to B is 1.1.1.2) can both provide a certain network service, and users access this network service through cloud server A through their user terminals.

[0090] For example, based on the source IP address in the user access log, the user's network location can be located, or multiple access behaviors of the same user can be identified. User profiling can be achieved based on the user's access behavior.

[0091] For example, based on the public IP address and source IP address in the user access log, the complete path of the user request can be accurately restored, enhancing the full-link tracking capability.

[0092] For example, the response time corresponding to the second access request can be the time from when the CDN gateway receives the second access request to when the cloud server sends the target file to the NAT device. The response time corresponding to the second access request can be used to monitor the performance of the cloud server. If the response time exceeds a preset time, an alarm is generated, thereby detecting cloud server performance anomalies in real time and improving system reliability.

[0093] For example, based on the public IP address, private IP address, and source IP address of the cloud server in the user access log, the network path from the time the user sends the access request to the time the target file is received can be completely restored, providing a basis for the central device in the system to perform troubleshooting, attack tracing, user portrait analysis, and traffic scheduling optimization. Taking the use of user access logs for troubleshooting as an example, if the user access times out, that is, the user does not receive the target file within the preset time, the central device can confirm whether the CDN node is normal through the public IP address in the user access log, check the cloud server load through the private IP address, and determine whether it is a network problem at the user's location through the source IP address. Taking the use of user access logs for attack tracing as an example, the central device determines the attack entry node through the public IP address in the user access log, locates the attacked cloud server in the system through the private IP address, and locates the attacker through the source IP.

[0094] In the embodiments of the present application, by recording user access logs and the public IP addresses of cloud servers, the source and destination of each access behavior can be clearly tracked. Once abnormal access is discovered, such as high-frequency requests from a specific source IP address or access during unusual time periods, the problem can be quickly located. In addition, when a cloud server is attacked by a network, user access logs containing public IP addresses can serve as an important basis for tracing the source, enhancing the CDN network's anti-attack capabilities.

[0095] In one possible implementation, the cloud server records the user access log corresponding to the second access request through the CDN gateway, including:

[0096] Read the private IP address in the second access request through the CDN gateway;

[0097] Determine the public IP address of the cloud server based on the pre-built address mapping relationship and the private IP address in the second access request; the address mapping relationship is used to indicate the correspondence between the private IP address and the public IP address of the cloud server;

[0098] Determine user access logs based on the public IP address of the cloud server.

[0099] In an embodiment of the present application, when a user initiates a request, the public IP address corresponding to the request is recorded. After the NAT device converts the public IP address into a private IP address, communication with the cloud server is carried out. The CDN gateway reads the private IP address in the second access request and determines the public IP address of the cloud server based on a pre-built address mapping relationship. This allows for the construction of a complete attack path tracing chain, starting from the public IP address requested by the user, through the conversion of the NAT device, to the private IP address of the cloud server, and then to the public IP address corresponding to the cloud server. This facilitates the precise tracking of attack paths.

[0100] Figure 2 This is a flow chart of another communication method for a content distribution network based on a cloud server. Figure 2 In the example, a user initiates a first access request through a user terminal. The NAT device corresponding to the cloud server receives the first access request, determines the private IP address of the target server based on the address mapping relationship, and sends a second access request to the user based on the private IP address of the target server. After receiving the second access request, the cloud server processes the second access request and returns the target file to the NAT device in response to the second access request. After receiving the target file sent by the cloud server, the NAT device forwards the target file to the user terminal, thereby completing the response to the first access request. In addition, after the cloud server sends the target file, the CDN gateway in the cloud server records the user access log to provide a basis for data analysis.

[0101] The following describes a specific implementation of a communication method for a content distribution network based on a cloud server through a specific embodiment, so as to exemplify the process of a user accessing a target file in a cloud server.

[0102] Example 1:

[0103] In Example 1, the process of a user accessing a target file in a cloud server includes the following steps a1-a7:

[0104] a1: Through the task distribution process, the address mapping relationship between the cloud server's public IP address and private IP address is sent to the cloud server.

[0105] In the embodiment of the present application, the address mapping relationship can be shown in Table 2.

[0106] Table 2

[0107]

[0108] a2: Deploy CDN gateway, cache and other software on the cloud server.

[0109] The CDN gateway is bound to the private IP address of the cloud server.

[0110] In the embodiment of the present application, the binding between the CDN gateway and the private network IP address is shown in Table 3.

[0111] Table 3

[0112] CDN Gateway ID Bound private IP Cloud Server Gateway 1 192.168.1.11 Cloud Server Gateway 2 192.168.1.12 Cloud Server Gateway 3 192.168.1.13

[0113] a3: When users access the cache on the cloud server, they use the cloud server's public IP address and the NAT device corresponding to the cloud server to establish a link.

[0114] For example, user A, whose user terminal's source IP address is 36.72.45.3, needs to access an edge node in the CDN system with a public IP address of 1.1.1.1. The user terminal might send a first access request like GET / vod / a.txt HTTP 1.1. The user establishes a connection with the NAT device based on the source IP address 36.72.45.3 of the first access request and the public IP address 1.1.1.1 of the target cloud server.

[0115] a4: The NAT device forwards the second access request to the CDN gateway on the target cloud server through the private IP address of the target cloud service.

[0116] For example, the NAT device finds the corresponding target cloud server (with a target IP address of 192.168.1.11) based on the target IP address of 1.1.1.1, and then establishes a link with the cloud server through the private IP address.

[0117] a5: The CDN gateway on the cloud server receives the second access request and forwards the request to the cache software.

[0118] For example, the upper-layer NAT device of the cloud server forwards the second access request to the cloud server. The second access request received by the cloud server includes GET / vod / a.txt HTTP1.1, the source IP address is 36.72.45.3, and the private IP address of the target cloud server is 192.168.1.11.

[0119] a6: The cache software on the cloud server reads the corresponding target file according to the Uniform Resource Identifier (URI) in the second access request and returns it to the CDN gateway, which then responds to the user through the above-mentioned NAT device.

[0120] For example, the cache software reads / vod / a.txt from the cloud server disk, and then responds a.txt to user A through the NAT device.

[0121] a7: After responding to the second access request, the CDN gateway records the user access log.

[0122] Among them, the user access log contains the public IP address of the target cloud server (also called the server IP address). It is necessary to first read the private IP address of the target cloud server in the second access request, and then determine the public IP address of the target cloud server based on the address mapping relationship between the private IP address and the public IP address, and record the public IP address of the target cloud server in the user access log.

[0123] For example, the CDN gateway reads the private IP address 192.168.1.11 of the target cloud server in the second access request, and then determines the public IP address 1.1.1.1 of the target cloud server based on the address mapping relationship between the public IP address and the private IP address. The server IP address recorded by the CDN gateway in the user access log is 1.1.1.1.

[0124] The above is the first part of the embodiment of this application. Figure 3 , introduces the specific implementation method of task distribution in the content distribution network system based on cloud server.

[0125] In some embodiments, the system further includes a central device. The central device is used to distribute tasks to the cloud server. The communication method of the cloud server-based content distribution network provided in the embodiment of the present application also includes the following content:

[0126] Based on the private IP address of the cloud server, determine the tasks to be performed by the cloud server.

[0127] In an embodiment of the present application, the cloud server obtains the tasks to be performed based on the private IP address as an identifier, so as to adapt to the characteristics of using private IP for communication on the cloud server. The cloud server is used as an edge cache node in the CDN network, thereby realizing task distribution to the cache node in the CDN network.

[0128] Figure 3 This is a flow chart of another communication method for a content distribution network based on a cloud server. Figure 3 In this process, the central device first records the address mapping between the cloud server's public IP address and its private IP address, and uses the private IP address and task ID as the unique identifier of the cloud server task. Next, the corresponding task is issued to each cloud server. Finally, the cloud service agent uses the private IP address as the cloud server's identifier to retrieve the task for that cloud server and execute it.

[0129] The following describes a specific implementation of the communication method of the cloud server-based content distribution network through a specific embodiment, so as to exemplify the specific process of the system distributing tasks to the cloud server.

[0130] Example 2:

[0131] In Example 2, the process of the system distributing tasks to the cloud server includes the following steps b1-b5:

[0132] b1: Record the address mapping between the cloud server's public IP and private IP address on the central device, using the cloud server's public IP address as the unique identifier for each cloud server. The mapping between cloud servers and public IP addresses is shown in Table 4.

[0133] Table 4

[0134]

[0135]

[0136] b2: If the central device sends a task to the cloud server, it finds the corresponding private IP address based on the public IP address and uses the private IP address + task ID as the unique identifier of the cloud server task.

[0137] In the embodiment of the present application, the central device sends tasks to the corresponding cloud server as shown in Table 5.

[0138] Table 5

[0139] Private IP Task ID Task content 192.168.1.11 111111 "flush a.com / a.txt" 192.168.1.12 222222 "flush a.com / a.txt" 192.168.1.13 333333 "flush a.com / a.txt"

[0140] b3: Deploy the task agent executor on the cloud server.

[0141] For example, deploy the task agent executor on the following cloud servers:

[0142] Table 6

[0143] Cloud server ID Public IP address of the cloud server Cloud Server 1 1.1.1.1 Cloud Server 2 1.1.1.2 Cloud Server 3 1.1.1.3

[0144] b4: The task agent executor on the cloud server uses the private IP address bound to the network card as an identifier and regularly pulls the tasks corresponding to the current cloud server from the central device.

[0145] For example, the task ID and task content pulled by the cloud server corresponding to the private IP address are as follows:

[0146] Table 7

[0147]

[0148]

[0149] b5: After the task agent executor on the cloud server pulls the task, it executes the corresponding task operation.

[0150] For example, the target cloud server refreshes the file a.com / a.txt based on the pulled task content.

[0151] The above mainly introduces the solution provided in the embodiment of the present application from the perspective of method.

[0152] The following is an exemplary introduction to the system architecture of the embodiment of the present application.

[0153] The embodiment of the present application provides a content distribution network system based on a cloud server. Figure 4 As shown, the system includes a network address translation NAT device 1 and at least one cloud server 2 corresponding to the network address translation NAT device.

[0154] Among them, NAT device 1 is used to receive a first access request; the first access request is used to instruct the user to access the target file in the CDN system, and is used to indicate the public Internet Protocol IP address of the target cloud server corresponding to the target file; in response to the first access request, the private IP address of the target cloud server is determined based on the pre-built address mapping relationship; the private IP address of the target cloud server is used for communication between the target cloud server and the NAT device; the address mapping relationship is used to indicate the correspondence between the private IP address of the cloud server and the public IP address; based on the private IP address of the target cloud server, a second access request is sent to the target cloud server; the second access request is used to instruct the target cloud server to send the target file.

[0155] The target cloud server 2 is used to receive and respond to the second access request, and send the target file to the NAT device based on the private Internet Protocol IP address of the cloud server.

[0156] It should be noted that the specific implementation method of the communication between the above-mentioned NAT device 1 and the target cloud server 2 can refer to the description in the above-mentioned method embodiment, and will not be repeated here.

[0157] An embodiment of the present invention also provides a computer device capable of implementing the above-mentioned communication method of the cloud server-based content distribution network.

[0158] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as 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 utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of a GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0159] 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 an application-specific 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.

[0160] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0161] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on 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 device. In some optional embodiments, the memory 20 may optionally include a memory remotely located 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.

[0162] 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 types of memory.

[0163] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0164] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or downloaded through a network and originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium, 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 magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. 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.

[0165] A portion 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 form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. 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 that can be accessed by the computer.

[0166] Although the embodiments of the present invention have been described with reference to 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. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A communication method for a content distribution network based on a cloud server, characterized in that: A network address translation (NAT) device is applied to a content delivery network (CDN) system based on a cloud server; the CDN system further comprises at least one cloud server corresponding to the NAT device; the method comprises: Receive a first access request; the first access request is used to instruct a user to access a target file in the CDN system, and is used to indicate the public Internet Protocol IP address of a target cloud server corresponding to the target file; In response to the first access request, determining the private IP address of the target cloud server based on a pre-established address mapping relationship; the private IP address of the target cloud server is used for communication between the target cloud server and the NAT device; the address mapping relationship is used to indicate the correspondence between the private IP address of the cloud server and the public IP address; Based on the private IP address of the target cloud server, a second access request is sent to the target cloud server; the second access request is used to instruct the target cloud server to send the target file.

2. The method according to claim 1, characterized in that The second access request includes the source IP address corresponding to the first access request, the private IP address of the target cloud server, and a file identifier; the file identifier is used to indicate the target file.

3. A communication method for a content distribution network based on a cloud server, characterized in that: Applied to cloud servers in cloud server-based content delivery network CDN systems; The CDN system further includes a network address translation (NAT) device corresponding to the cloud server; and the method includes: receiving a second access request from the NAT device; wherein the second access request is used to instruct the cloud server to send a target file; In response to the second access request, the target file is sent to the NAT device based on the private Internet Protocol (IP) address of the cloud server.

4. The method according to claim 3, characterized in that A CDN gateway is deployed on the cloud server; the CDN gateway is used for the cloud server to respond to the second access request in the CDN; the CDN gateway is bound to the private IP address of the cloud server.

5. The method according to claim 4, characterized in that The method further comprises: A user access log corresponding to the second access request is recorded through the CDN gateway; the user access log includes the public IP address of the cloud server.

6. The method according to claim 5, characterized in that The cloud server records, through the CDN gateway, a user access log corresponding to the second access request, including: Reading the private IP address in the second access request through the CDN gateway; Determine the public IP address corresponding to the second access request based on a pre-built address mapping relationship and the private IP address in the second access request; the address mapping relationship is used to indicate the correspondence between the private IP address and the public IP address of the cloud server; The user access log is determined based on the public IP address corresponding to the second access request.

7. The method according to any one of claims 3 to 6, characterized in that The method further comprises: Based on the private IP address of the cloud server, the task to be performed by the cloud server is determined.

8. A content distribution network system based on a cloud server, characterized in that: The system includes: a network address translation NAT device, and at least one cloud server corresponding to the network address translation NAT device; The NAT device is configured to receive a first access request; the first access request is used to instruct a user to access a target file in a cloud server-based content distribution network system, and is used to indicate the public Internet Protocol IP address of a target cloud server corresponding to the target file; in response to the first access request, the private IP address of the target cloud server is determined based on a pre-built address mapping relationship; the private IP address of the target cloud server is used for communication between the target cloud server and the NAT device; the address mapping relationship is used to indicate the correspondence between the private IP address of the cloud server and the public IP address; based on the private IP address of the target cloud server, a second access request is sent to the target cloud server; the second access request is used to instruct the target cloud server to send the target file; The target cloud server is configured to receive and respond to the second access request, and send the target file to the NAT device based on the private Internet Protocol (IP) address of the cloud server.

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 communication method of the cloud server-based content distribution network 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 communication method of the cloud server-based content distribution network according to any one of claims 1 to 7.