[go: up one dir, main page]

WO2025195082A1 - Network request scheduling method and apparatus for cdn, and device and medium - Google Patents

Network request scheduling method and apparatus for cdn, and device and medium

Info

Publication number
WO2025195082A1
WO2025195082A1 PCT/CN2025/077667 CN2025077667W WO2025195082A1 WO 2025195082 A1 WO2025195082 A1 WO 2025195082A1 CN 2025077667 W CN2025077667 W CN 2025077667W WO 2025195082 A1 WO2025195082 A1 WO 2025195082A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
network request
network
scheduling
client
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
PCT/CN2025/077667
Other languages
French (fr)
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 Volcano Engine Technology Co Ltd
Original Assignee
Beijing Volcano Engine 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 Volcano Engine Technology Co Ltd filed Critical Beijing Volcano Engine Technology Co Ltd
Publication of WO2025195082A1 publication Critical patent/WO2025195082A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3234Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving additional secure or trusted devices, e.g. TPM, smartcard, USB or software token
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present disclosure relates to the field of edge cloud technology, and in particular to a method, apparatus, device, and medium for scheduling network requests for CDN.
  • CDNs content delivery networks
  • the present disclosure provides a network request scheduling method for a CDN, the method being applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment, the method comprising:
  • Obtaining a network request sent by a dynamic acceleration gateway wherein the network request is a network request from a client that the dynamic acceleration gateway performs a security check on and sends after passing the security check;
  • the present disclosure provides a network request scheduling method for CDN, characterized in that the method is applied to a dynamic acceleration gateway in an edge cloud server, and the method includes:
  • the corresponding edge cloud server is determined according to the network environment information of the client, and the network request is sent to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.
  • the present disclosure provides a network request scheduling device for a CDN, wherein the device is deployed in a dynamic acceleration routing scheduling engine applied to an edge cloud server configured with a trusted execution environment, and the device includes:
  • the acquisition module is used to obtain the network request sent by the client;
  • a scheduling module configured to forward the network request to a target application server among a plurality of preset application servers in the trusted execution environment according to a preset scheduling policy
  • the response module is used to receive the response result of the target application server to the network request, and to forward the response result to the client.
  • the present disclosure provides a network request scheduling device for CDN, wherein the device is applied to a dynamic acceleration gateway in an edge cloud server, and the method includes:
  • Receiving module used to obtain the network request sent by the client
  • a parsing module configured to parse the network request to determine a request type corresponding to the network request, and query a security check policy corresponding to the request type;
  • the inspection module is used to perform a security inspection on the request content carried by the network request using the security inspection strategy to obtain a preliminary processing result of the request.
  • a sending module is used to determine the corresponding edge cloud server based on the network environment information of the client if the preliminary processing result of the request is a legal result, and send the network request to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.
  • the present disclosure 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 network request scheduling method for CDN according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
  • the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the network request scheduling method for CDN according to the first aspect or any corresponding embodiment thereof.
  • FIG1 is a flow chart of a method for scheduling network requests for a CDN according to an embodiment of the present disclosure
  • FIG2 is a flow chart of another method for scheduling network requests for a CDN according to an embodiment of the present disclosure
  • FIG3 is a flow chart of another method for scheduling network requests for a CDN according to an embodiment of the present disclosure
  • FIG4 is a flow chart of yet another method for scheduling network requests for a CDN according to an embodiment of the present disclosure
  • FIG5 is a flow chart of another method for scheduling network requests for a CDN according to an embodiment of the present disclosure
  • FIG6 is a structural block diagram of a network request scheduling apparatus according to an embodiment of the present disclosure.
  • FIG7 is a structural block diagram of another network request scheduling device according to an embodiment of the present disclosure.
  • FIG8 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure.
  • edge cloud servers In edge cloud technology, content distribution networks have played a significant role. By caching content on edge cloud servers located in edge data centers, CDNs enable users to access required content more quickly, reducing latency between users and central data centers.
  • edge cloud servers in edge data centers presents security challenges, which can also affect the security performance of CDNs.
  • edge cloud servers in edge data centers are more susceptible to interference from malware or attackers, and security performance is often not guaranteed. If a malicious attack occurs, the normal operation of the edge cloud server may be affected.
  • the trustworthiness of the edge cloud server's routing problem may decrease, making the edge cloud server unable to operate normally.
  • the present disclosure provides a network request scheduling method, apparatus, device and medium for CDN, in order to solve the problem that when subjected to external malicious attacks, the trust of the edge cloud server routing problem may be reduced, thereby making the edge cloud server unable to operate normally.
  • the present disclosure provides a network request scheduling method for CDN, which is applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment.
  • the method can schedule network requests according to a preset scheduling strategy in the trusted execution environment in the edge cloud server, and forward the response results of the target application server to the network request to the client; compared with the relevant technology, the solution provided by the present disclosure can distribute the request to the edge cloud server closer to the client by the dynamic acceleration gateway even when the edge cloud server is subjected to malicious attacks, and the edge cloud server performs load balancing on the network request, thereby optimizing the response time of the edge cloud server and improving the reliability through the collaborative work of the edge cloud server and the dynamic acceleration gateway, thereby ensuring data security.
  • the present disclosure also provides a network request scheduling method for CDN, which is applied to a dynamic acceleration gateway in an edge cloud server.
  • the dynamic acceleration gateway obtains and parses the network request sent by the client, and can perform a security check on the request. Malicious requests or attacks can be prevented, improving the security of the system.
  • a detailed security check can be performed on the request content according to the security check policy, thereby providing more comprehensive security protection.
  • a suitable edge cloud server can be determined to minimize latency and improve system performance. Sending network requests to the nearest edge cloud server can reduce the distance and time of data transmission, thereby improving the response speed and performance of the application.
  • the edge cloud server can distribute requests to the back-end server based on the load balancing algorithm and other strategies to further optimize the load balancing and performance of the system.
  • edge cloud servers deployed in the central computer room in the central cloud scenario they are generally equipped with a high-performance security protection system, so they can withstand attacks from malware or attackers.
  • edge cloud servers deployed in edge computer rooms in edge cloud scenarios in order to reduce deployment costs, are generally computer rooms with average or even poor network security.
  • edge cloud servers that schedule network requests may face the following problems when attacked by external malicious attacks:
  • an embodiment of a network request scheduling method for a CDN 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.
  • a network request scheduling method for CDN is provided.
  • the network request scheduling method for CDN is applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment.
  • TEE Trusted Execution Environment
  • CPU Central Processing Unit
  • TEE provides a higher level of security and is therefore more suitable for processing sensitive data.
  • FIG1 is a flow chart of a method for scheduling network requests for a CDN according to an embodiment of the present disclosure. As shown in FIG1 , the flow includes the following steps:
  • Step S101 obtaining a network request sent by a dynamic acceleration gateway.
  • the network request is a security check performed by the dynamic acceleration gateway on a network request from a client and is sent after the security check passes.
  • a client When a client sends a network request, it is first sent to the dynamic acceleration gateway.
  • the dynamic acceleration gateway performs security checks on the network request, including identity verification, malicious behavior detection, and security threat prevention. If the security check passes, the dynamic acceleration gateway sends the network request to the edge cloud server.
  • Edge cloud servers are distributed in different locations, closer to the client, to provide faster response and lower latency. After receiving the network request from the dynamic acceleration gateway, the edge cloud server forwards the request to the most appropriate backend server for processing based on load balancing algorithms and other policies.
  • the edge cloud server and the dynamic acceleration gateway work together to provide higher performance and security.
  • the dynamic acceleration gateway is responsible for security checks and traffic control, while the edge cloud server is responsible for actual request processing and load balancing.
  • the response time and reliability of the edge cloud server can be optimized.
  • the network request can be a request to obtain a web page, data, API (Application Programming Interface) access, or any other type of service.
  • this application can reduce network latency and improve response speed by deploying edge cloud servers in geographical locations closer to users. Users can obtain content from the nearest edge node without the need for remote CDN servers.
  • the edge cloud server can process part of the network requests and cache the content, reducing the load on the remote CDN server. This improves the overall request processing capability and throughput.
  • the dynamic acceleration gateway can perform security checks on the requests before they reach the CDN to prevent malicious requests and attacks. This can provide an additional layer of security to protect the content security of the CDN and users.
  • the CDN can provide faster, more efficient and more secure content distribution services.
  • the edge cloud server provides content at a location closer to the user, reducing network latency and improving response speed.
  • the dynamic acceleration gateway can enhance security and protect the CDN and user content from malicious requests and attacks. Such collaborative work can improve the performance, stability and reliability of the CDN and provide a better user experience.
  • the client involved may specifically include but is not limited to an application client and/or a web page (web terminal) set up on an electronic device, such as a mobile application or other types of client software on an electronic device such as a smartphone, tablet computer or desktop computer.
  • a web page web terminal
  • the network request scheduling method before step S101, further includes but is not limited to the following steps a1 to a4.
  • Step a1 Create the trusted execution environment in the edge cloud server.
  • This embodiment selects TEE technology based on the server's architecture and requirements.
  • Common TEE technologies include Intel SGX and ARM TrustZone.
  • the corresponding TEE software stack is installed.
  • the TEE software stack includes the TEE runtime environment and the TEE SDK.
  • the runtime environment provides a secure runtime environment for the TEE, while the SDK is used to develop and deploy TEE applications.
  • TEE SDK Use the TEE SDK to develop and create a trusted execution environment (TEE). This includes writing TEE applications and related security configurations. TEE applications run in a trusted execution environment, providing additional security protections. The developed TEE applications are then deployed to edge cloud servers.
  • TEE trusted execution environment
  • Step a2 verify the signature of the execution code corresponding to the preset scheduling strategy.
  • the signature of the execution code can be a digital signature; more specifically, the signature can be a certificate chain, from a root certificate to the final code signing certificate. TEE can be used to verify the entire certificate chain to ensure that the signature of the execution code is credible.
  • the executable code before the executable code is deployed to the TEE, it can be signed with a secure digital signature, which usually involves using a trusted signing key (usually controlled by the software publisher or organization).
  • the TEE startup process can include verifying the digital signature of the execution code. Only when the digital signature verification is successful will the execution code be allowed to run, which ensures that only authorized code can run.
  • step a3 if the signature of the execution code passes the verification, the execution code is run in the trusted execution environment.
  • this embodiment can load and run the execution code if the execution code passes security verification, that is, load the traffic scheduling logic within the TEE.
  • the scheduling logic is a program specifically used to decide how to allocate and forward inbound traffic to different preset application servers.
  • step a4 if the signature of the execution code fails to pass the verification, the execution code is denied from running in the trusted execution environment.
  • This embodiment further ensures that the code or program that can be run in the TEE is necessarily safe by performing signature verification on the code used to implement the traffic scheduling function, thereby improving the security of traffic scheduling.
  • Step S102 forwarding the network request to a target application server among a plurality of preset application servers in a trusted execution environment according to a preset scheduling policy.
  • multiple preset application servers are respectively communicated and connected with the edge cloud server, and the preset scheduling strategy is a load balancing strategy.
  • the preset scheduling strategy of this embodiment may include one or more network request scheduling methods, so as to distribute the traffic brought by a large number of network requests to the corresponding preset application server, and specifically forward it to an instance of the preset application server (such as a container or cloud service, etc.).
  • the preset scheduling strategy includes at least one of a round-robin method, a minimum number of connections method, a scheduling method based on application server resources, a hash calculation method, a path hash method, and a domain name hash method.
  • the above step S102 includes: scheduling the network request by at least one of a round-robin method, a minimum number of connections (Least Connections) method, a scheduling method based on application server resources (Resource-Based Scheduling), a hash calculation method, a path hash method, and a domain name hash method, thereby scheduling the network request to the target application server.
  • the polling method includes at least one of the average polling method and the weighted polling method
  • the minimum connection number method includes at least one of the average minimum connection number method and the weighted minimum connection number method
  • the hash calculation method includes at least one of the source Internet interconnection protocol hash method, the request path hash method, and the session information hash method.
  • the dynamic acceleration routing scheduling engine in the trusted execution environment allocates the current network request to the next preset application server (i.e., the target application server) in the preset application server list; if the end of the preset application server list is reached, the network request is allocated again from the preset application server at the beginning of the preset application server list, and the preset application server list is used to record the above-mentioned multiple preset application servers; the above-mentioned polling method can be called average polling, which is suitable for scenarios where all preset application servers have the same configuration and roughly the same processing power.
  • this embodiment may schedule network requests by weighted polling, including: setting a weight for each preset application server in the preset application server list, and the weight is used to reflect the processing power of the preset application server; for example, when the response of a preset application server slows down, the weight of the preset application server can be dynamically reduced, and more network requests can be allocated to the preset application server with a higher weight.
  • weighted polling is more suitable for scenarios where there are performance differences between multiple preset application servers in the back end.
  • the dynamic acceleration routing scheduling engine of this embodiment can monitor the performance indicators of each preset application server in the backend in real time.
  • the performance indicators may include but are not limited to response time, CPU usage, memory usage, and number of active connections. These performance indicators are crucial for implementing traffic scheduling and health checks.
  • the dynamic acceleration routing scheduling engine sends the new network request to the preset application server with the least number of currently active connections;
  • the above-mentioned minimum number of connections method can be called the average minimum number of connections method, which is particularly suitable for processing network requests with uncertain processing time. This method can ensure that no preset application server will become overloaded due to several long-running processes.
  • this embodiment may schedule network requests through the weighted minimum number of connections method, including: setting weights for the above-mentioned multiple preset application servers respectively, and allocating the current network request to the target application server according to the set weights and the current number of active connections. By taking the weight factor into account, a more intelligent load distribution can be achieved, so that the target application server receives an appropriate number of connections and network requests according to its actual processing capacity.
  • the dynamic acceleration routing scheduling engine obtains the current resource usage of the above-mentioned multiple preset application servers, and allocates the current network request to the preset application server with the lowest current resource utilization based on the current resource usage to prevent overloading of certain preset application servers; among which, the current resource usage in this embodiment includes CPU usage and memory usage, etc.
  • the dynamic acceleration routing scheduling engine obtains specific parameters, which may include the client IP address, request path, or session information, and then sends the network request to the corresponding preset application server based on a hash algorithm based on the specific parameters.
  • specific parameters which may include the client IP address, request path, or session information
  • the specific process of the hash algorithm can be selected from related technologies and will not be described in detail in this embodiment.
  • the network request scheduling scheme based on the hash calculation method can ensure that network requests issued by the same client are always sent to the same preset application server. This scheme is suitable for applications with session persistence.
  • the dynamic acceleration routing scheduling engine can specifically hash the path of the network request to determine the route of the network request, thereby allocating the network request to the corresponding preset application server, and directing different URLs (Uniform Resource Locators) to specific preset application servers.
  • the dynamic acceleration routing scheduling engine can specifically hash the domain name of the network request to determine the route of the network request, thereby allocating the network request to the corresponding preset application server, and directing different domain names to specific preset application servers.
  • the network request scheduling algorithm can also be customized to meet specific business needs. For the above-mentioned multiple network request scheduling methods, this embodiment allows users to select the most appropriate scheduling method based on actual needs and the characteristics of the preset application server at the back end.
  • the embodiments of the present disclosure provide a secure computing environment through TEE, and critical operations including network request scheduling will not be interfered with by external malware or attackers.
  • network requests are scheduled by at least one of polling, minimum connection number, application server resource-based scheduling, hash calculation, path hash, and domain name hash, including but not limited to the following steps b1 and b2.
  • Step b1 Acquire response history information and current network status information of multiple preset application servers.
  • the response history information can indicate the response of the preset application server to the network request in the past period of time
  • the current network status information can indicate the network connection status between the edge cloud server and the preset application server.
  • Step b2 according to the response history information and the current network status information, select one or more of the polling method, minimum connection number method, application server resource-based scheduling method, hash calculation method, path hash method, and domain name hash method to schedule the network request.
  • the minimum connection number method can be used according to the network conditions of the preset application servers; if the network conditions of the preset application servers are consistent, the polling method can be used; if the performance of different preset application servers varies greatly, the scheduling method based on application server resources can be used on the basis of the minimum connection number or polling method; if the network request contains specific parameters such as the client IP address, request path or session information, one or more of the hash calculation method, path hash method, and domain name hash method can be used on the basis of the minimum connection number or polling method.
  • the disclosed embodiments can use historical response information and current network status information as the basis for selecting various scheduling methods. This approach enables dynamic adjustment of traffic scheduling strategies to optimize traffic distribution. This demonstrates that the present embodiment can dynamically adjust traffic based on current network conditions and server load, achieving intelligent traffic distribution. Furthermore, the processing mechanism designed for high-traffic situations allows rapid adjustments to sudden traffic increases, ensuring network stability.
  • forwarding the network request to a target application server among multiple preset application servers according to a preset scheduling policy includes: encrypting the network request, and sending the encrypted network request to the target application server according to the preset scheduling policy.
  • this embodiment can encrypt network requests through a dedicated hardware accelerator configured on the edge cloud server.
  • this embodiment can encrypt relevant sensitive data including network requests and ensure the integrity of the code. Therefore, based on the solution provided by this embodiment, data security can be maintained even when data is transmitted in an unsafe environment.
  • Step S103 receiving a response result of the target application server to the network request, and forwarding the response result to the client.
  • the target application server is used to respond to the network request.
  • the preset application server in this embodiment can respond to the received network request in the form of a service pool or instance, obtain a response result, and send the response result back to the edge cloud server.
  • forwarding the response result to the client includes: encrypting the response result, and sending the encrypted response result to the client.
  • the further processing process includes the above-mentioned encryption processing process, and may also include processing processes such as response header modification and compression, and then send the response result after the above-mentioned further processing to the client.
  • the present disclosure can further improve the security of data transmission between the edge cloud server and the client.
  • the network request scheduling method for CDN provides a secure execution environment based on TEE technology for isolating sensitive computing tasks.
  • the execution environment is independent of the edge cloud server host operating system and can prevent external attackers from accessing or modifying the code and data being executed.
  • This embodiment schedules network requests according to a preset scheduling strategy in the trusted execution environment in the edge cloud server, and forwards the response results of the target application server to the network request to the client.
  • the solution provided by the present disclosure can distribute the request to the edge cloud server closer to the client by the dynamic acceleration gateway even when the edge cloud server is attacked maliciously.
  • the edge cloud server performs load balancing on the network request, thereby optimizing the response time of the edge cloud server and improving reliability through the collaborative work of the edge cloud server and the dynamic acceleration gateway, thereby ensuring data security.
  • FIG2 is a flow chart of the network request scheduling method according to an embodiment of the present disclosure. As shown in FIG2 , the flow includes the following steps:
  • Step S201 Obtain a network request sent by a dynamic acceleration gateway.
  • the network request is a security check performed by the dynamic acceleration gateway on a network request from a client and sent after the security check passes. Please refer to step S101 of the embodiment shown in FIG1 for details, which will not be repeated here.
  • Step S202 In the trusted execution environment, the network request is forwarded to a target application server among the plurality of preset application servers according to a preset scheduling policy.
  • a target application server among the plurality of preset application servers according to a preset scheduling policy.
  • Step S203 Receive the response result of the target application server to the network request and forward the response result to the client. Please refer to step S103 of the embodiment shown in Figure 1 for details, which will not be repeated here.
  • Step S204 Record the process of scheduling the network request in the trusted execution environment as a log file, and store the log file.
  • this embodiment records key operations in a trusted execution environment, records them as log files, and stores the log files.
  • the network request scheduling method for CDN also records the process of scheduling network requests in a trusted execution environment as a log, which is crucial for subsequent analysis, auditing, and monitoring.
  • This embodiment also provides a method for tracking and troubleshooting using log files, as shown in FIG3 , which specifically includes:
  • Step c1 Obtain an anomaly detection request.
  • Anomaly detection requests can be obtained in different ways, including anomaly reports submitted by users, alerts from monitoring systems, automated error detection mechanisms, or output from other anomaly detection systems.
  • Step c2 query the target log file associated with the anomaly detection request.
  • the target log file related to the request can be searched and obtained through the system's log management tool or query interface.
  • Step c3 Analyze the target log file to obtain the scheduling path of the corresponding target network request, and obtain the processing status of each node in the scheduling path in processing the target network request.
  • the target log file must first be parsed. Based on the parsed log data, the unique identifier of the target network request is determined. This can be a request ID, URL, IP address, or other request-related identifier. Using the request identifier, the dispatch path of the request is tracked within the log data. This is achieved by searching for each record of the request in the log and the associated information within it. For example, the corresponding log record can be found based on the request ID, along with the node ID or name within the record.
  • the processing status of each node is determined. This includes processing time, response status code, error information, and more. This information can be extracted by analyzing relevant fields or flags in the log records.
  • the processing status of each node is collated and summarized, and the data is stored in a data structure for subsequent processing and analysis.
  • Step c4 perform anomaly detection according to the processing situation to obtain a detection result.
  • the obtained processing data is compared with anomaly detection rules or indicators to generate a judgment. This can be based on threshold comparisons, such as response time exceeding a certain threshold, or rule-based verification, such as error codes not matching expectations.
  • anomaly detection results are generated. For example, abnormal requests may be marked as abnormal, anomaly reports may be generated, or alerts may be set.
  • this application can locate the specific log file at the time the anomaly request was generated, facilitating subsequent analysis and processing. Analyzing the target log file to obtain the dispatch path provides a global perspective on network requests. Then, based on the evaluation and judgment of the processing status of each node in the path, anomaly detection results and reports are quickly generated, helping system administrators or developers to quickly respond to and resolve issues.
  • the target log file records information related to video services. By analyzing this log file, the scheduling path of video network requests can be obtained, and the processing status of each node can be analyzed to detect anomalies.
  • the scheduling path for the video network request is as follows: Node1-Node2.
  • the processing status of each node is as follows: Node1: Processing time is 2.1 seconds, response status code is 200, and there is no error message.
  • Node1's processing time is within the normal range and is normal.
  • Node2's processing time is longer, which may indicate an anomaly. Therefore, the detection results indicate that Node2 and Node3 have anomalies.
  • the dynamic acceleration gateway, the dynamic acceleration routing scheduling engine based on the trusted execution environment i.e., the dynamic acceleration routing scheduling engine in the aforementioned embodiment
  • the dynamic balancing log service can all be deployed on the dynamic acceleration gateway of the edge cloud server.
  • the dynamic acceleration routing scheduling engine of this embodiment can automatically expand and integrate functions with the edge cloud platform, and dynamically adjust back-end resources according to changes in traffic.
  • the dynamic acceleration routing scheduling engine in this embodiment can also perform self-repair. When it detects that a service provided by the preset application server at the back end fails, it automatically reroutes traffic to ensure the continuous operation of the business.
  • the dynamic acceleration routing scheduling engine can also be integrated with a network application firewall (WAF, Web Application Firewall) to provide traffic monitoring and attack defense at the security level.
  • WAF Web Application Firewall
  • the network request scheduling method for CDN of this embodiment may include the following steps:
  • a network request sent by a client e.g., a browser or application on an electronic device
  • a dynamic acceleration gateway dynamic acceleration gateway
  • the dynamic acceleration gateway can perform preliminary processing on network requests, such as SSL (Secure Sockets Layer) terminal inspection, request inspection, and logging.
  • This stage may also include security checks on the requests, such as preventing DDoS (Distributed Denial of Service attack) and SQL (Structured Query Language) injection, to ensure that only legitimate and secure requests are further processed.
  • step S402 the dynamic acceleration gateway forwards traffic to the dynamic acceleration routing scheduling engine based on the trusted execution environment. That is, the dynamic acceleration gateway forwards the network request to the dynamic acceleration routing scheduling engine based on the trusted execution environment.
  • step S403 the dynamic acceleration routing scheduling engine executes the scheduling algorithm in the trusted execution environment, sends the network request to the target application server for processing, receives the response result from the target application server, and feeds back the response result to the corresponding client to complete the network request scheduling.
  • the core function of the dynamic acceleration gateway can be executed, that is, the traffic scheduling logic can be implemented. Even if the edge cloud server host operating system is compromised by malware, the traffic scheduling logic in the trusted execution environment will not be affected.
  • Step S404 Based on the dynamic balancing log service, the dynamic acceleration routing scheduling engine records the trusted execution environment scheduling log.
  • the present disclosure uses TEE technology to protect the dynamic acceleration routing scheduling engine, making it run more securely in a multi-cloud environment including an edge cloud environment. Especially in cases where it needs to be deployed in other data centers or edge computer rooms outside the central cloud, the present disclosure can effectively reduce the interference of malware or attackers on the dynamic acceleration service. Even if the malware infects the operating system (subject to operating system-level threats), the scheduling decisions provided by the present disclosure are safe and reliable. It can be seen that the present disclosure significantly improves service reliability and security, especially improves the security and reliability of traffic scheduling by edge cloud servers; the present disclosure is suitable for scenarios with extremely high security requirements, such as financial service data, sensitive data processing, etc.
  • FIG5 is a flow chart of a method for scheduling network requests for a CDN according to an embodiment of the present disclosure. As shown in FIG5 , the method is applied to a dynamic acceleration gateway, and the method includes:
  • Step S501 Obtain a network request sent by a client.
  • the dynamic acceleration gateway is deployed as an intermediate layer between the client and the edge cloud server.
  • the client sends a network request to the dynamic acceleration gateway, and the request data is transmitted to the dynamic acceleration gateway through the network communication protocol.
  • Step S502 parse the network request to determine the request type corresponding to the network request, and query the security check policy corresponding to the request type.
  • Step S502 includes: obtaining a request header from the network request; parsing the request header to obtain the fields contained therein and obtain a request identifier; and obtaining the request type corresponding to the request identifier. Parsing and security checking the network request quickly determines the request type and security. This allows for the shortest possible initial processing and a decision on whether to send the request to the edge cloud server for dispatch. Rapid response improves user experience and system performance.
  • a request header is sent along with the request.
  • the dynamic acceleration gateway can obtain the request header from the received request data and parse it to extract the fields within.
  • the request header contains metadata and other information related to the request. It can include multiple fields, each with a specific purpose. Common request header fields include User-Agent, Accept, and Content-Type, which provide detailed information about the client and the request content.
  • the dynamic acceleration gateway can parse the request header and obtain the specific values of each field. For example, the User-Agent field can be parsed to obtain information about the client's browser and operating system.
  • the Accept field can also be parsed to obtain the content type accepted by the client.
  • a custom request identifier field can be added based on business needs and parsed to obtain the request identifier.
  • the request identifier is typically used to uniquely identify a request for subsequent identification and processing.
  • the request identifier can be extracted from a specific field in the request header or from a custom request identifier field.
  • the dynamic acceleration gateway can identify, route, or perform other processing operations on the request in subsequent processing.
  • the dynamic acceleration gateway can flexibly process according to the client's needs and specific business logic, providing personalized services and enhanced functions.
  • the dynamic acceleration gateway can determine the corresponding request type. This is achieved through matching, mapping, or querying operations.
  • Request types can be categorized based on business needs, such as GET, POST, and PUT. Based on the request identifier, the request type can be associated with specific processing logic or routing.
  • Step S503 Perform a security check on the request content carried by the network request using the security check policy to obtain a preliminary request processing result.
  • a client submits a request to query user personal information through an application.
  • the request includes the user ID or username to be queried.
  • the dynamic acceleration gateway After receiving the query request, the dynamic acceleration gateway first executes the security check policy.
  • the Dynamic Acceleration Gateway verifies the access credentials (such as access tokens and user IDs) included in the request and checks whether the client has permission to query other users' personal information. If verification fails or the client lacks permission, the query request is rejected and an error message is returned to the client, prompting the client to log in again or obtain the appropriate permissions.
  • the Dynamic Acceleration Gateway verifies the access credentials (such as access tokens and user IDs) included in the request and checks whether the client has permission to query other users' personal information. If verification fails or the client lacks permission, the query request is rejected and an error message is returned to the client, prompting the client to log in again or obtain the appropriate permissions.
  • Security Check Strategy 2 Verify the legitimacy of query parameters.
  • the dynamic acceleration gateway verifies parameters such as the client ID or operation identifier carried in the query request to ensure that the parameters comply with the specified format and requirements.
  • the query request will be rejected and an error message will be returned to the client, prompting the client to re-enter valid query parameters.
  • the Dynamic Acceleration Gateway filters sensitive information in query results based on security policies to ensure that no potential privacy leaks or security risks are returned. If query results contain sensitive information, the Dynamic Acceleration Gateway will desensitize it or only return authorized information.
  • step S504 if the preliminary processing result of the request is a legal result, the corresponding edge cloud server is determined according to the network environment information of the client, and the network request is sent to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.
  • the dynamic acceleration gateway determines the corresponding edge cloud server based on the client's network environment information and sends the network request to the dynamic acceleration routing scheduling engine in the edge cloud server for scheduling and processing.
  • the dynamic acceleration gateway When determining the most suitable edge cloud server, the dynamic acceleration gateway considers the client's network environment information, including geographic location and network conditions. Based on this information, it selects the nearest edge cloud server to provide services. First, the dynamic acceleration gateway uses the client's geographic location to determine the nearest edge cloud server. Edge nodes are typically located in different regions, and the closer they are to the client's geographic location, the lower the network latency. By comparing the client's geographic location with the location of the edge node, the dynamic acceleration gateway can find the nearest edge cloud server. Second, the dynamic acceleration gateway also selects the optimal network path based on the client's network conditions. It monitors network latency, bandwidth, packet loss rate, and other metrics between the client and each edge cloud server. By evaluating these metrics, it selects the network path with the best performance, ensuring low latency and high bandwidth for the client.
  • the dynamic acceleration gateway routes the client's request to that edge cloud server.
  • the edge cloud server can be scheduled based on specific business needs, such as forwarding requests to the nearest application server, performing load balancing based on load, or caching based on content. This allows clients to receive faster response times from the edge cloud server.
  • the dynamic acceleration gateway accelerates and optimizes edge services by comprehensively considering the client's geographic location and network conditions, selecting the nearest edge cloud server and the optimal network path. This approach enables efficient access and effective utilization of edge computing resources.
  • the disclosed dynamic acceleration gateway obtains and parses the network request sent by the client, and can perform security checks on the request. It can prevent malicious requests or attacks and improve the security of the system. By determining the request type corresponding to the request and querying the corresponding security check policy, a detailed security check can be performed on the request content according to the security check policy, thereby providing more comprehensive security protection. Then, the appropriate edge cloud server is determined based on the client's network environment information, which can minimize latency and improve system performance. Sending network requests to the nearest edge cloud server can reduce the distance and time of data transmission, thereby improving the response speed and performance of the application. In addition, the edge cloud server can distribute requests to the back-end server based on the load balancing algorithm and other strategies to further optimize the load balancing and performance of the system.
  • the technical solution of acquiring client network requests and parsing them for security checks offers the advantages of enhanced security, rapid response, and edge cloud server scheduling. It also offers flexibility and scalability to adapt to diverse business and system requirements. Furthermore, scheduling based on client network environment information can improve CDN security, performance, and load balancing capabilities.
  • This embodiment also provides a network request scheduling device for a CDN.
  • This device is used to implement the above-mentioned embodiments and preferred implementations. Details that have already been described will not be repeated.
  • the term "module” may refer to a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
  • This embodiment provides a network request scheduling device for CDN.
  • the network request scheduling device is deployed in a dynamic acceleration routing scheduling engine applied to an edge cloud server configured with a trusted execution environment. As shown in FIG6 , the network request scheduling device includes:
  • the acquisition module 601 is used to acquire a network request sent by the dynamic acceleration gateway.
  • the network request is sent by the dynamic acceleration gateway after the dynamic acceleration gateway performs a security check on the network request from the client and passes the security check.
  • the scheduling module 602 is configured to forward the network request to a target application server among a plurality of preset application servers according to a preset scheduling policy in a trusted execution environment.
  • the response module 603 is used to receive the response result of the target application server to the network request, and to forward the response result to the client.
  • the network request scheduling device further includes a logging module.
  • the logging module is used to record the process of scheduling network requests in the trusted execution environment as a log file, and to store the log file.
  • the preset scheduling strategy includes at least one of a polling method, a minimum connection number method, a scheduling method based on application server resources, a hash calculation method, a path hash method, and a domain name hash method.
  • the scheduling module 602 is specifically used to schedule network requests through at least one of polling, minimum connection number, application server resource-based scheduling, hash calculation, path hash, and domain name hash to schedule network requests to the target application server.
  • the network request scheduling apparatus further includes:
  • the environment creation module is used to create a trusted execution environment on the dynamic acceleration gateway in the edge cloud server.
  • the signature verification module is used to verify the signature of the execution code corresponding to the preset scheduling strategy.
  • the code execution module is used to execute the execution code in a trusted execution environment based on the signature verification of the execution code.
  • the execution rejection module is used to reject the execution code from running in the trusted execution environment based on the signature of the execution code failing to pass the verification.
  • the scheduling module 602 is further configured to encrypt the network request and send the encrypted network request to the target application server according to a preset scheduling policy.
  • the response module 603 is further configured to encrypt the response result and send the encrypted response result to the client.
  • the network request scheduling device also includes: an anomaly detection module, used to obtain an anomaly detection request; query the target log file associated with the anomaly detection request; analyze the target log file to obtain the scheduling path of the corresponding target network request, and obtain the processing status of each node in the scheduling path processing the target network request; perform anomaly detection based on the processing status to obtain a detection result.
  • an anomaly detection module used to obtain an anomaly detection request
  • query the target log file associated with the anomaly detection request analyze the target log file to obtain the scheduling path of the corresponding target network request, and obtain the processing status of each node in the scheduling path processing the target network request; perform anomaly detection based on the processing status to obtain a detection result.
  • This embodiment also provides a network request scheduling device for a CDN.
  • This device is used to implement the above-mentioned embodiments and preferred implementations. Details that have already been described will not be repeated.
  • the term "module” may refer to a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
  • This embodiment provides a network request scheduling device for CDN, as shown in FIG7 , the network request scheduling device includes:
  • the parsing module 702 is used to parse the network request to determine the request type corresponding to the network request and query the security check policy corresponding to the request type;
  • the inspection module 703 is used to perform a security inspection on the request content carried by the network request using the security inspection strategy to obtain a preliminary processing result of the request.
  • the sending module 704 is used to determine the corresponding edge cloud server according to the network environment information of the client if the preliminary processing result of the request is a legal result, and send the network request to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.
  • the parsing module 702 is configured to obtain a request header in a network request; parse the request header to obtain field contents contained in the request header, and obtain a request identifier; and obtain a request type corresponding to the request identifier.
  • 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.
  • the various components are connected to each other using different buses and can be installed on a common motherboard or installed in other ways as needed.
  • the processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface).
  • an external input/output device such as a display device coupled to the interface.
  • multiple processors and/or multiple buses can be used together with multiple memories and multiple memories.
  • 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).
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
  • the embodiments of the present disclosure also provide a computer-readable storage medium.
  • the above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network 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.
  • 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.
  • 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure relates to the technical field of edge clouds. Disclosed are a network request scheduling method and apparatus for a CDN, and a device and a medium. The method comprises: acquiring a network request sent by a dynamic acceleration gateway, wherein the network request is sent when the dynamic acceleration gateway performs security check on a network request from a client and the security check is passed; in a trusted execution environment, forwarding the network request to a target application server among a plurality of preset application servers on the basis of a preset scheduling strategy; and receiving a response result of the target application server to the network request, and forwarding the response result to the client.

Description

用于CDN的网络请求调度方法、装置、设备及介质Method, device, equipment and medium for CDN network request scheduling

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请要求于2024年3月21日提交中国国家知识产权局、申请号为202410330069.4、发明名称为“用于CDN的网络请求调度方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 21, 2024, with application number 202410330069.4 and invention name “Network request scheduling method, device, equipment and medium for CDN”, the entire contents of which are incorporated by reference into this application.

技术领域Technical Field

本公开涉及边缘云技术领域,具体涉及用于CDN的网络请求调度方法、装置、设备及介质。The present disclosure relates to the field of edge cloud technology, and in particular to a method, apparatus, device, and medium for scheduling network requests for CDN.

背景技术Background Art

随着边缘云技术的发展,内容分发网络(Content Delivery Network,CDN)起到了重要的作用。CDN通过将内容缓存到位于边缘机房的边缘云服务器上,使得用户能够更快速地获取所需的内容,减少了用户与中心数据中心之间的延迟。With the development of edge cloud technology, content delivery networks (CDNs) have played a vital role. By caching content on edge cloud servers located in edge data centers, CDNs enable users to access required content more quickly, reducing latency between users and central data centers.

发明内容Summary of the Invention

第一方面,本公开提供了一种用于CDN的网络请求调度方法,所述方法应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎,所述方法包括:In a first aspect, the present disclosure provides a network request scheduling method for a CDN, the method being applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment, the method comprising:

获取动态加速网关发送的网络请求,所述网络请求是所述动态加速网关对来自于客户端的网络请求进行安全检查,并在安全检查通过后发送的;Obtaining a network request sent by a dynamic acceleration gateway, wherein the network request is a network request from a client that the dynamic acceleration gateway performs a security check on and sends after passing the security check;

在所述可信执行环境中,按照预设调度策略,将所述网络请求转发至多个预设应用服务器中的目标应用服务器;In the trusted execution environment, forwarding the network request to a target application server among a plurality of preset application servers according to a preset scheduling policy;

接收所述目标应用服务器对所述网络请求的响应结果,以及将所述响应结果转发至所述客户端。Receive a response result of the target application server to the network request, and forward the response result to the client.

第二方面,本公开提供了一种用于CDN的网络请求调度方法,其特征在于,所述方法应用于边缘云服务器中的动态加速网关,所述方法包括:In a second aspect, the present disclosure provides a network request scheduling method for CDN, characterized in that the method is applied to a dynamic acceleration gateway in an edge cloud server, and the method includes:

获取客户端发送的网络请求;Get the network request sent by the client;

解析所述网络请求中确定所述网络请求对应的请求类型,查询所述请求类型对应的安全检查策略;Parsing the network request to determine the request type corresponding to the network request, and querying the security check policy corresponding to the request type;

利用所述安全检查策略对所述网络请求所携带的请求内容进行安全检查,得到请求初步处理结果;Performing a security check on the request content carried by the network request using the security check strategy to obtain a preliminary request processing result;

若所述请求初步处理结果为合法结果,则根据所述客户端的网络环境信息确定相应的边缘云服务器,并发送所述网络请求至所述边缘云服务器中的动态加速路由调度引擎,以通过所述边缘云服务器对所述网络请求进行调度。If the preliminary processing result of the request is a legal result, the corresponding edge cloud server is determined according to the network environment information of the client, and the network request is sent to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.

第三方面,本公开提供了一种用于CDN的网络请求调度装置,所述装置部署于应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎,所述装置包括:In a third aspect, the present disclosure provides a network request scheduling device for a CDN, wherein the device is deployed in a dynamic acceleration routing scheduling engine applied to an edge cloud server configured with a trusted execution environment, and the device includes:

获取模块,用于获取客户端发送的网络请求;The acquisition module is used to obtain the network request sent by the client;

调度模块,用于在所述可信执行环境中,按照预设调度策略,将所述网络请求转发至多个预设应用服务器中的目标应用服务器;A scheduling module, configured to forward the network request to a target application server among a plurality of preset application servers in the trusted execution environment according to a preset scheduling policy;

响应模块,用于接收所述目标应用服务器对所述网络请求的响应结果,以及用于将所述响应结果转发至所述客户端。The response module is used to receive the response result of the target application server to the network request, and to forward the response result to the client.

第四方面,本公开提供了一种用于CDN的网络请求调度装置,所述装置应用于边缘云服务器中的动态加速网关,所述方法包括:In a fourth aspect, the present disclosure provides a network request scheduling device for CDN, wherein the device is applied to a dynamic acceleration gateway in an edge cloud server, and the method includes:

接收模块,用于获取客户端发送的网络请求;Receiving module, used to obtain the network request sent by the client;

解析模块,用于解析所述网络请求中确定所述网络请求对应的请求类型,查询所述请求类型对应的安全检查策略;A parsing module, configured to parse the network request to determine a request type corresponding to the network request, and query a security check policy corresponding to the request type;

检查模块,用于利用所述安全检查策略对所述网络请求所携带的请求内容进行安全检查,得到请求初步处理结果,The inspection module is used to perform a security inspection on the request content carried by the network request using the security inspection strategy to obtain a preliminary processing result of the request.

发送模块,用于若所述请求初步处理结果为合法结果,则根据所述客户端的网络环境信息确定相应的边缘云服务器,并发送所述网络请求至所述边缘云服务器中的动态加速路由调度引擎,以通过所述边缘云服务器对所述网络请求进行调度。A sending module is used to determine the corresponding edge cloud server based on the network environment information of the client if the preliminary processing result of the request is a legal result, and send the network request to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.

第三方面,本公开提供了一种计算机设备,包括:存储器和处理器,存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行计算机指令,从而执行上述第一方面或其对应的任一实施方式的用于CDN的网络请求调度方法。In a third aspect, the present disclosure 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 network request scheduling method for CDN according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

第四方面,本公开提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机指令,计算机指令用于使计算机执行上述第一方面或其对应的任一实施方式的用于CDN的网络请求调度方法。In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the network request scheduling method for CDN according to the first aspect or any corresponding embodiment thereof.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本公开具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific embodiments of the present disclosure 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

图1是根据本公开实施例的用于CDN的网络请求调度方法的流程示意图;FIG1 is a flow chart of a method for scheduling network requests for a CDN according to an embodiment of the present disclosure;

图2是根据本公开实施例的另一用于CDN的网络请求调度方法的流程示意图;FIG2 is a flow chart of another method for scheduling network requests for a CDN according to an embodiment of the present disclosure;

图3是根据本公开实施例的又一用于CDN的网络请求调度方法的流程示意图;FIG3 is a flow chart of another method for scheduling network requests for a CDN according to an embodiment of the present disclosure;

图4是根据本公开实施例的再一用于CDN的网络请求调度方法的流程示意图;FIG4 is a flow chart of yet another method for scheduling network requests for a CDN according to an embodiment of the present disclosure;

图5是根据本公开实施例的再一用于CDN的网络请求调度方法的流程示意图;FIG5 is a flow chart of another method for scheduling network requests for a CDN according to an embodiment of the present disclosure;

图6是根据本公开实施例的网络请求调度装置的结构框图;FIG6 is a structural block diagram of a network request scheduling apparatus according to an embodiment of the present disclosure;

图7是根据本公开实施例的另一网络请求调度装置的结构框图;FIG7 is a structural block diagram of another network request scheduling device according to an embodiment of the present disclosure;

图8是本公开实施例的计算机设备的硬件结构示意图。FIG8 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure.

具体实施方式DETAILED DESCRIPTION

为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.

如上文所述,随着边缘云技术的发展,内容分发网络起到了重要的作用。CDN通过将内容缓存到位于边缘机房的边缘云服务器上,使得用户能够更快速地获取所需的内容,减少了用户与中心数据中心之间的延迟。然而,边缘云服务器在边缘机房部署存在安全挑战,这也会影响到CDN的安全性能。相比于中心云技术场景下的中心机房,边缘机房内的边缘云服务器更容易受到恶意软件或攻击者的干扰,安全性能往往无法得到保证。如果发生恶意攻击,边缘云服务器的正常工作可能会受到影响。特别是作为对网络请求进行调度的边缘云服务器,在受到外部的恶意攻击时,可能会导致边缘云服务器路由选择问题的信任度下降,从而使边缘云服务器无法正常运行。As mentioned above, with the development of edge cloud technology, content distribution networks have played a significant role. By caching content on edge cloud servers located in edge data centers, CDNs enable users to access required content more quickly, reducing latency between users and central data centers. However, deploying edge cloud servers in edge data centers presents security challenges, which can also affect the security performance of CDNs. Compared to central data centers in central cloud technology scenarios, edge cloud servers in edge data centers are more susceptible to interference from malware or attackers, and security performance is often not guaranteed. If a malicious attack occurs, the normal operation of the edge cloud server may be affected. In particular, as an edge cloud server that schedules network requests, when subjected to external malicious attacks, the trustworthiness of the edge cloud server's routing problem may decrease, making the edge cloud server unable to operate normally.

有鉴于此,本公开提供了一种用于CDN的网络请求调度方法、装置、设备及介质,以解决在受到外部的恶意攻击时,可能导致边缘云服务器路由选择问题的信任度下降,从而使边缘云服务器无法正常运行的问题。本公开提供了一种用于CDN的网络请求调度方法,应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎。该方法能够在边缘云服务器中的可信执行环境中按照预设调度策略对网络请求进行调度,以及将目标应用服务器对网络请求的响应结果转发给客户端;与相关技术相比而言,本公开提供的方案即使在边缘云服务器受到恶意攻击时,由动态加速网关将请求分发到距离客户端更近的边缘云服务器,边缘云服务器对网络请求负载均衡处理,以此通过边缘云服务器和动态加速网关的协同工作,优化边缘云服务器的响应时间以及提高可靠性,保障了数据安全。In view of this, the present disclosure provides a network request scheduling method, apparatus, device and medium for CDN, in order to solve the problem that when subjected to external malicious attacks, the trust of the edge cloud server routing problem may be reduced, thereby making the edge cloud server unable to operate normally. The present disclosure provides a network request scheduling method for CDN, which is applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment. The method can schedule network requests according to a preset scheduling strategy in the trusted execution environment in the edge cloud server, and forward the response results of the target application server to the network request to the client; compared with the relevant technology, the solution provided by the present disclosure can distribute the request to the edge cloud server closer to the client by the dynamic acceleration gateway even when the edge cloud server is subjected to malicious attacks, and the edge cloud server performs load balancing on the network request, thereby optimizing the response time of the edge cloud server and improving the reliability through the collaborative work of the edge cloud server and the dynamic acceleration gateway, thereby ensuring data security.

本公开还提供了一种用于CDN的网络请求调度方法,应用于边缘云服务器中的动态加速网关。在该方法中,动态加速网关获取并解析客户端发送的网络请求,可以对请求进行安全检查。可以防止恶意请求或攻击,提高系统的安全性。通过确定请求对应的请求类型,并查询相应的安全检查策略,可以根据安全检查策略对请求内容进行详细的安全检查,从而提供更全面的安全保护。然后根据客户端的网络环境信息确定合适的边缘云服务器,可以最大限度地降低延迟并提高系统的性能。将网络请求发送到最近的边缘云服务器可以减少数据传输的距离和时间,从而提升应用程序的响应速度和性能。此外,边缘云服务器可以根据负载均衡算法和其他策略,将请求分发到后端服务器,进一步优化系统的负载均衡和性能。The present disclosure also provides a network request scheduling method for CDN, which is applied to a dynamic acceleration gateway in an edge cloud server. In this method, the dynamic acceleration gateway obtains and parses the network request sent by the client, and can perform a security check on the request. Malicious requests or attacks can be prevented, improving the security of the system. By determining the request type corresponding to the request and querying the corresponding security check policy, a detailed security check can be performed on the request content according to the security check policy, thereby providing more comprehensive security protection. Then, based on the client's network environment information, a suitable edge cloud server can be determined to minimize latency and improve system performance. Sending network requests to the nearest edge cloud server can reduce the distance and time of data transmission, thereby improving the response speed and performance of the application. In addition, the edge cloud server can distribute requests to the back-end server based on the load balancing algorithm and other strategies to further optimize the load balancing and performance of the system.

随着私有化云、边缘计算的发展,多云部署的趋势的延伸,越来越多的动态加速服务需要部署在相对于自主可控的中心云之外的其他数据中心甚至边缘机房中。对于中心云场景下的中心机房内部署的中心云服务器,一般配备有高性能安全防护体系,所以可以承受恶意软件或攻击者的攻击。但对于边缘云场景下的边缘机房内部署的边缘云服务器来说,为了降低部署成本,所选择的边缘机房一般为网络安全性一般甚至网络安全性差的机房,特别是作为对网络请求进行调度的边缘云服务器,在受到外部的恶意攻击时可能面临以下问题:With the development of private cloud and edge computing, and the extension of the trend of multi-cloud deployment, more and more dynamic acceleration services need to be deployed in other data centers or even edge computer rooms outside of the autonomous and controllable central cloud. For central cloud servers deployed in the central computer room in the central cloud scenario, they are generally equipped with a high-performance security protection system, so they can withstand attacks from malware or attackers. However, for edge cloud servers deployed in edge computer rooms in edge cloud scenarios, in order to reduce deployment costs, the edge computer rooms selected are generally computer rooms with average or even poor network security. In particular, edge cloud servers that schedule network requests may face the following problems when attacked by external malicious attacks:

(1)恶意攻击可能会导致边缘云服务器路由选择的信任度下降。攻击者可能伪造或篡改网络请求,导致边缘云服务器做出错误的路由选择。这可能会导致请求被发送到不合适的服务器,影响服务质量或安全性。或者,攻击者可以利用漏洞或恶意行为,改变边缘云服务器的路由策略,从而导致请求被发送到不安全或未经授权的目标。(1) Malicious attacks can cause the trustworthiness of edge cloud server routing to degrade. Attackers can forge or tamper with network requests, causing edge cloud servers to make incorrect routing choices. This can cause requests to be sent to inappropriate servers, impacting service quality or security. Alternatively, attackers can exploit vulnerabilities or malicious behavior to change the edge cloud server's routing policy, causing requests to be sent to unsafe or unauthorized destinations.

(2)当边缘云服务器受到恶意攻击时,其抵御攻击的能力可能会下降。攻击者可能利用各种攻击手段,如DDoS攻击、拒绝服务攻击等,使边缘云服务器无法正常运行,从而影响整个边缘网络的稳定性和可靠性。(2) When an edge cloud server is attacked by malicious means, its ability to resist attacks may be reduced. Attackers may use various attack methods, such as DDoS attacks and denial of service attacks, to prevent the edge cloud server from operating normally, thereby affecting the stability and reliability of the entire edge network.

根据本公开实施例,提供了一种用于CDN的网络请求调度方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present disclosure, an embodiment of a network request scheduling method for a CDN 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.

在本实施例中提供了一种用于CDN的网络请求调度方法,该用于CDN的网络请求调度方法应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎。In this embodiment, a network request scheduling method for CDN is provided. The network request scheduling method for CDN is applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment.

可信执行环境(TEE,Trusted Execution Environment),或者可称之为可信计算,本实施例将其用于保护下文的动态加速路由调度引擎,即使在不安全或被攻击的环境下也能够保持其安全性和完整性。具体地,TEE基于硬件的安全机制,将参与计算的代码和数据加载至一个受CPU(Central Processing Unit,中央处理器)保护的可信环境中,在机密性和完整性上提供保护。与操作系统相比,TEE提供了更高级别的安全性,因此,TEE更适合在其中对敏感数据进行处理。The Trusted Execution Environment (TEE), also known as trusted computing, is used in this embodiment to protect the dynamic acceleration routing scheduling engine described below, maintaining its security and integrity even in unsafe or attacked environments. Specifically, TEE uses hardware-based security mechanisms to load the code and data involved in the calculation into a trusted environment protected by the CPU (Central Processing Unit), providing confidentiality and integrity protection. Compared with the operating system, TEE provides a higher level of security and is therefore more suitable for processing sensitive data.

图1是根据本公开实施例的用于CDN的网络请求调度方法的流程图,如图1所示,该流程包括如下步骤:FIG1 is a flow chart of a method for scheduling network requests for a CDN according to an embodiment of the present disclosure. As shown in FIG1 , the flow includes the following steps:

步骤S101,获取动态加速网关发送的网络请求,网络请求是动态加速网关对来自于客户端的网络请求进行安全检查,并在安全检查通过后发送的。Step S101: obtaining a network request sent by a dynamic acceleration gateway. The network request is a security check performed by the dynamic acceleration gateway on a network request from a client and is sent after the security check passes.

其中,当客户端发送网络请求时,网络请求会先被发送到动态加速网关。动态加速网关会对这个网络请求进行安全检查,包括验证身份、检测恶意行为、防范安全威胁等。如果安全检查通过,动态加速网关会将网络请求发送到边缘云服务器。边缘云服务器分布在不同的地点,离客户端更近,以提供更快的响应和更低的延迟。边缘云服务器接收到来自动态加速网关发送的网络请求后,会根据负载均衡算法和其他策略,将请求转发给最合适的后端服务器进行处理。When a client sends a network request, it is first sent to the dynamic acceleration gateway. The dynamic acceleration gateway performs security checks on the network request, including identity verification, malicious behavior detection, and security threat prevention. If the security check passes, the dynamic acceleration gateway sends the network request to the edge cloud server. Edge cloud servers are distributed in different locations, closer to the client, to provide faster response and lower latency. After receiving the network request from the dynamic acceleration gateway, the edge cloud server forwards the request to the most appropriate backend server for processing based on load balancing algorithms and other policies.

通过上述的架构和流程,边缘云服务器和动态加速网关协同工作,可以提供更高的性能和安全性。动态加速网关负责安全检查和流量控制,而边缘云服务器负责实际的请求处理和负载均衡。以通过动态加速网关将请求分发到客户端更近的边缘云服务器,可以优化边缘云服务器的响应时间和可靠性。具体地,网络请求可以是为了获取网页、数据、API(Application Programming Interface,应用程序编程接口)访问或任何其他类型的服务的请求。Through the above architecture and process, the edge cloud server and the dynamic acceleration gateway work together to provide higher performance and security. The dynamic acceleration gateway is responsible for security checks and traffic control, while the edge cloud server is responsible for actual request processing and load balancing. By distributing requests to edge cloud servers closer to the client through the dynamic acceleration gateway, the response time and reliability of the edge cloud server can be optimized. Specifically, the network request can be a request to obtain a web page, data, API (Application Programming Interface) access, or any other type of service.

基于此,本申请通过将边缘云服务器部署在离用户更近的地理位置,可以减少网络延迟并提高响应速度。用户可以从最近的边缘节点获取内容,而不需要远程的CDN服务器。边缘云服务器可以处理一部分网络请求,并对内容进行缓存,减轻远程CDN服务器的负载。从而提高整体的请求处理能力和吞吐量。另外动态加速网关可以在请求到达CDN之前对其进行安全检查,防止恶意请求和攻击。这可以提供额外的安全层,保护CDN和用户的内容安全。通过边缘云服务器和动态加速网关的协同工作,CDN可以提供更快速、高效和安全的内容分发服务。边缘云服务器在离用户更近的位置提供内容,减少网络延迟,提高响应速度。同时,动态加速网关可以加强安全性,保护CDN和用户的内容免受恶意请求和攻击。这样的协同工作可以提升CDN的性能、稳定性和可靠性,提供更好的用户体验。Based on this, this application can reduce network latency and improve response speed by deploying edge cloud servers in geographical locations closer to users. Users can obtain content from the nearest edge node without the need for remote CDN servers. The edge cloud server can process part of the network requests and cache the content, reducing the load on the remote CDN server. This improves the overall request processing capability and throughput. In addition, the dynamic acceleration gateway can perform security checks on the requests before they reach the CDN to prevent malicious requests and attacks. This can provide an additional layer of security to protect the content security of the CDN and users. Through the collaborative work of the edge cloud server and the dynamic acceleration gateway, the CDN can provide faster, more efficient and more secure content distribution services. The edge cloud server provides content at a location closer to the user, reducing network latency and improving response speed. At the same time, the dynamic acceleration gateway can enhance security and protect the CDN and user content from malicious requests and attacks. Such collaborative work can improve the performance, stability and reliability of the CDN and provide a better user experience.

本公开实施例中,涉及的客户端具体可以包括但不限于电子设备上设置的应用程序客户端和/或网页端(web端),例如智能手机、平板电脑或台式计算机等电子设备上的移动应用或者其他类型的客户端软件。In the embodiments of the present disclosure, the client involved may specifically include but is not limited to an application client and/or a web page (web terminal) set up on an electronic device, such as a mobile application or other types of client software on an electronic device such as a smartphone, tablet computer or desktop computer.

在一些可选的实施方式中,在步骤S101之前,该网络请求调度方法还包括但不限于如下的步骤a1至步骤a4。In some optional implementations, before step S101, the network request scheduling method further includes but is not limited to the following steps a1 to a4.

步骤a1,在边缘云服务器中创建所述可信执行环境。Step a1: Create the trusted execution environment in the edge cloud server.

其中,本实施例根据服务器的架构和需求,选择TEE技术。目前常见的TEE技术包括Intel SGX、ARM TrustZone等。根据所选择的TEE技术,安装相应的TEE软件栈。TEE软件栈包括TEE运行时环境和TEE SDK。运行时环境提供TEE的安全运行时环境,而SDK用于开发和部署TEE应用程序。根据TEE技术的要求,配置边缘云服务器的硬件和固件。主要包括BIOS设置、微码更新、安全启动等。This embodiment selects TEE technology based on the server's architecture and requirements. Common TEE technologies include Intel SGX and ARM TrustZone. Based on the selected TEE technology, the corresponding TEE software stack is installed. The TEE software stack includes the TEE runtime environment and the TEE SDK. The runtime environment provides a secure runtime environment for the TEE, while the SDK is used to develop and deploy TEE applications. Configure the edge cloud server's hardware and firmware according to the requirements of the TEE technology. This primarily includes BIOS settings, microcode updates, and secure boot.

使用TEE SDK,开发并创建可信执行环境。具体包括:编写TEE应用程序和相关的安全配置。TEE应用程序是在可信执行环境中运行的应用程序,可以获得额外的安全保护。然后将开发好的TEE应用程序部署到边缘云服务器。Use the TEE SDK to develop and create a trusted execution environment (TEE). This includes writing TEE applications and related security configurations. TEE applications run in a trusted execution environment, providing additional security protections. The developed TEE applications are then deployed to edge cloud servers.

步骤a2,对预设调度策略对应的执行代码的签名进行验证。Step a2: verify the signature of the execution code corresponding to the preset scheduling strategy.

其中,执行代码的签名可以是一种数字签名;更为具体的,该签名可以是一条证书链,从一个根证书到最终的代码签名证书,TEE可用于验证整条证书链,以确保执行代码的签名是可信的。Among them, the signature of the execution code can be a digital signature; more specifically, the signature can be a certificate chain, from a root certificate to the final code signing certificate. TEE can be used to verify the entire certificate chain to ensure that the signature of the execution code is credible.

本实施例在将执行代码部署到TEE之前,可使用安全的数字签名对其进行签名,这通常涉及到使用一个可信的签名密钥(通常由软件发布者或组织控制)。In this embodiment, before the executable code is deployed to the TEE, it can be signed with a secure digital signature, which usually involves using a trusted signing key (usually controlled by the software publisher or organization).

当执行代码加载到TEE时,TEE的启动过程可以包括验证执行代码的数字签名,只有在数字签名验证成功时,执行代码才会被允许运行,这确保了只有经过授权的代码才能够运行。When the execution code is loaded into the TEE, the TEE startup process can include verifying the digital signature of the execution code. Only when the digital signature verification is successful will the execution code be allowed to run, which ensures that only authorized code can run.

步骤a3,若执行代码的签名通过验证,则在可信执行环境中运行执行代码。In step a3, if the signature of the execution code passes the verification, the execution code is run in the trusted execution environment.

具体地,本实施例可在执行代码通过安全验证的情况下,加载和运行执行代码,即在TEE内加载流量调度逻辑,该调度逻辑是专门用于决定如何分配和转发入站流量到不同预设应用服务器的程序。Specifically, this embodiment can load and run the execution code if the execution code passes security verification, that is, load the traffic scheduling logic within the TEE. The scheduling logic is a program specifically used to decide how to allocate and forward inbound traffic to different preset application servers.

步骤a4,若执行代码的签名未通过验证,则拒绝执行代码在可信执行环境中运行。In step a4, if the signature of the execution code fails to pass the verification, the execution code is denied from running in the trusted execution environment.

本实施例通过对用于实现流量调度功能的代码进行签名验证,进一步保证可在TEE中运行的代码或程序必然是安全的,提高了流量调度的安全性。This embodiment further ensures that the code or program that can be run in the TEE is necessarily safe by performing signature verification on the code used to implement the traffic scheduling function, thereby improving the security of traffic scheduling.

步骤S102,在可信执行环境中,按照预设调度策略,将网络请求转发至多个预设应用服务器中的目标应用服务器。Step S102 : forwarding the network request to a target application server among a plurality of preset application servers in a trusted execution environment according to a preset scheduling policy.

其中,多个预设应用服务器与边缘云服务器分别通信连接,预设调度策略是一种负载均衡策略。Among them, multiple preset application servers are respectively communicated and connected with the edge cloud server, and the preset scheduling strategy is a load balancing strategy.

本实施例的预设调度策略可以包括一个或多个网络请求调度方式,从而将大量网络请求带来的流量分发至对应的预设应用服务器,具体可以转发到预设应用服务器的实例(例如容器或云服务等)上。The preset scheduling strategy of this embodiment may include one or more network request scheduling methods, so as to distribute the traffic brought by a large number of network requests to the corresponding preset application server, and specifically forward it to an instance of the preset application server (such as a container or cloud service, etc.).

在一些可选的实施方式中,预设调度策略包括轮询方式、最小连接数方式、基于应用服务器资源的调度方式、哈希计算方式、路径散列方式以及域名散列方式中的至少一种方式,上述步骤S102包括:通过轮询(Round Robin)方式、最小连接数(Least Connections)方式、基于应用服务器资源的调度(Resource-Based Scheduling)方式、哈希(Hashing)计算方式、路径散列方式、域名散列方式中的至少一种方式对网络请求进行调度,从而将网络请求调度至目标应用服务器。In some optional implementations, the preset scheduling strategy includes at least one of a round-robin method, a minimum number of connections method, a scheduling method based on application server resources, a hash calculation method, a path hash method, and a domain name hash method. The above step S102 includes: scheduling the network request by at least one of a round-robin method, a minimum number of connections (Least Connections) method, a scheduling method based on application server resources (Resource-Based Scheduling), a hash calculation method, a path hash method, and a domain name hash method, thereby scheduling the network request to the target application server.

具体地,轮询方式包括平均轮询方式、加权轮询方式中的至少一种,最小连接数方式包括平均最小连接数方式、加权最小连接数方式中的至少一种,哈希计算方式包括源网际互连协议哈希方式、请求路径哈希方式、会话信息哈希方式中的至少一种。Specifically, the polling method includes at least one of the average polling method and the weighted polling method, the minimum connection number method includes at least one of the average minimum connection number method and the weighted minimum connection number method, and the hash calculation method includes at least one of the source Internet interconnection protocol hash method, the request path hash method, and the session information hash method.

通过轮询方式对网络请求进行调度的过程中,可信执行环境下的动态加速路由调度引擎,将当前的网络请求分配到预设应用服务器列表中的下一个预设应用服务器(即目标应用服务器);如果预设应用服务器列表的末尾被到达,则重新从预设应用服务器列表的开头的预设应用服务器进行网络请求的分配,预设应用服务器列表用于记载上述的多个预设应用服务器;上述轮询方式可以称之为平均轮询,该方式适合于所有预设应用服务器配置相同且处理能力大致相当的场景。在此基础上,本实施例或可通过加权轮询方式对网络请求进行调度,包括:为预设应用服务器列表中的每个预设应用服务器分别设置权重,且权重用于反映预设应用服务器的处理能力;例如,在某个预设应用服务器的响应变慢时可动态地将该预设应用服务器的权重降低,并为具有更高权重的预设应用服务器分配更多的网络请求。其中,加权轮询更适合于后端的多个预设应用服务器之间存在性能差异的场景。本实施例的动态加速路由调度引擎能够实时监控后端的每个预设应用服务器的性能指标,性能指标可包括但不限于响应时间、CPU使用率、内存使用率及活动连接数等,这些性能指标对于实施流量调度和健康检查至关重要。In the process of scheduling network requests by polling, the dynamic acceleration routing scheduling engine in the trusted execution environment allocates the current network request to the next preset application server (i.e., the target application server) in the preset application server list; if the end of the preset application server list is reached, the network request is allocated again from the preset application server at the beginning of the preset application server list, and the preset application server list is used to record the above-mentioned multiple preset application servers; the above-mentioned polling method can be called average polling, which is suitable for scenarios where all preset application servers have the same configuration and roughly the same processing power. On this basis, this embodiment may schedule network requests by weighted polling, including: setting a weight for each preset application server in the preset application server list, and the weight is used to reflect the processing power of the preset application server; for example, when the response of a preset application server slows down, the weight of the preset application server can be dynamically reduced, and more network requests can be allocated to the preset application server with a higher weight. Among them, weighted polling is more suitable for scenarios where there are performance differences between multiple preset application servers in the back end. The dynamic acceleration routing scheduling engine of this embodiment can monitor the performance indicators of each preset application server in the backend in real time. The performance indicators may include but are not limited to response time, CPU usage, memory usage, and number of active connections. These performance indicators are crucial for implementing traffic scheduling and health checks.

通过最小连接数方式对网络请求进行调度的过程中,动态加速路由调度引擎将新的网络请求发送到当前活动连接数最少的预设应用服务器;上述最小连接数方式可以称之为平均最小连接数方式,该方式适合于在处理时间不确定的网络请求时尤其适用,通过该方式可以确保没有一个预设应用服务器会因为若干长时间运行的进程而变得过载。在此基础上,本实施例或可通过加权最小连接数方式对网络请求进行调度,包括:为上述的多个预设应用服务器分别设置权重,并根据所设置的权重和当前活动连接数,将当前的网络请求分配至目标应用服务器。通过将权重因素考虑在内,可实现更智能地分配负载,使得目标应用服务器根据其实际处理能力接收到合适数量的连接和网络请求。In the process of scheduling network requests through the minimum number of connections, the dynamic acceleration routing scheduling engine sends the new network request to the preset application server with the least number of currently active connections; the above-mentioned minimum number of connections method can be called the average minimum number of connections method, which is particularly suitable for processing network requests with uncertain processing time. This method can ensure that no preset application server will become overloaded due to several long-running processes. On this basis, this embodiment may schedule network requests through the weighted minimum number of connections method, including: setting weights for the above-mentioned multiple preset application servers respectively, and allocating the current network request to the target application server according to the set weights and the current number of active connections. By taking the weight factor into account, a more intelligent load distribution can be achieved, so that the target application server receives an appropriate number of connections and network requests according to its actual processing capacity.

通过基于应用服务器资源的调度方式对网络请求进行调度的过程中,动态加速路由调度引擎获取上述多个预设应用服务器的当前资源使用情况,并根据当前资源使用情况将当前的网络请求分配给当前资源利用率最低的预设应用服务器,以防止某些预设应用服务器过载;其中,本实施例的当前资源使用情况包括CPU使用率和内存使用率等。In the process of scheduling network requests based on application server resources, the dynamic acceleration routing scheduling engine obtains the current resource usage of the above-mentioned multiple preset application servers, and allocates the current network request to the preset application server with the lowest current resource utilization based on the current resource usage to prevent overloading of certain preset application servers; among which, the current resource usage in this embodiment includes CPU usage and memory usage, etc.

通过哈希计算方式对网络请求进行调度的过程中,动态加速路由调度引擎获取特定参数,特定参数可包括客户端IP地址、请求路径或会话信息等,然后基于特定参数的哈希算法将网络请求发送至对应的预设应用服务器。其中,哈希算法的具体过程可从相关技术中选择,本实施例不再赘述。基于哈希计算方式的网络请求调度方案中,可保证同一客户端发出的网络请求总是被发送到相同的预设应用服务器,该方案适用于会话持久性的应用。During the process of scheduling network requests using a hash calculation method, the dynamic acceleration routing scheduling engine obtains specific parameters, which may include the client IP address, request path, or session information, and then sends the network request to the corresponding preset application server based on a hash algorithm based on the specific parameters. The specific process of the hash algorithm can be selected from related technologies and will not be described in detail in this embodiment. The network request scheduling scheme based on the hash calculation method can ensure that network requests issued by the same client are always sent to the same preset application server. This scheme is suitable for applications with session persistence.

通过路径散列方式对网络请求进行调度的过程中,动态加速路由调度引擎具体能够以网络请求的路径进行散列,以决定网络请求的路由,从而将网络请求分配给相应的预设应用服务器,实现将不同的URL(Uniform Resource Locator,统一资源定位器)定向到特定的预设应用服务器。通过域名散列方式对网络请求进行调度的过程中,动态加速路由调度引擎具体能够以网络请求的域名进行散列,以决定网络请求的路由,从而将网络请求分配给相应的预设应用服务器,实现将不同的域名定向到特定的预设应用服务器。当然,在本实施例的基础上也可自定义网络请求调度算法,以满足特定的业务需求。对于上述的多种网络请求调度的方式,本实施例允许用户根据实际需求和后端的预设应用服务器的特点选择最合适的调度方式。In the process of scheduling network requests by using a path hashing method, the dynamic acceleration routing scheduling engine can specifically hash the path of the network request to determine the route of the network request, thereby allocating the network request to the corresponding preset application server, and directing different URLs (Uniform Resource Locators) to specific preset application servers. In the process of scheduling network requests by using a domain name hashing method, the dynamic acceleration routing scheduling engine can specifically hash the domain name of the network request to determine the route of the network request, thereby allocating the network request to the corresponding preset application server, and directing different domain names to specific preset application servers. Of course, based on this embodiment, the network request scheduling algorithm can also be customized to meet specific business needs. For the above-mentioned multiple network request scheduling methods, this embodiment allows users to select the most appropriate scheduling method based on actual needs and the characteristics of the preset application server at the back end.

对于网络请求调度这种关键操作,本公开实施例通过TEE提供了一个安全的计算环境,包括网络请求调度在内的关键操作不会被外部恶意软件或攻击者干扰。For critical operations such as network request scheduling, the embodiments of the present disclosure provide a secure computing environment through TEE, and critical operations including network request scheduling will not be interfered with by external malware or attackers.

在一些可选的实施方式中,通过轮询方式、最小连接数方式、基于应用服务器资源的调度方式、哈希计算方式、路径散列方式、域名散列方式中的至少一种方式对网络请求进行调度,包括但不限于如下的步骤b1和步骤b2。In some optional implementations, network requests are scheduled by at least one of polling, minimum connection number, application server resource-based scheduling, hash calculation, path hash, and domain name hash, including but not limited to the following steps b1 and b2.

步骤b1,获取多个预设应用服务器的响应历史信息和当前网络状况信息。Step b1: Acquire response history information and current network status information of multiple preset application servers.

其中,响应历史信息可表示预设应用服务器在过去一段时间内对网络请求的响应情况,当前网络状况信息可表示边缘云服务器与预设应用服务器之间的网络连接情况。Among them, the response history information can indicate the response of the preset application server to the network request in the past period of time, and the current network status information can indicate the network connection status between the edge cloud server and the preset application server.

步骤b2,根据响应历史信息和当前网络状况信息,选择轮询方式、最小连接数方式、基于应用服务器资源的调度方式、哈希计算方式、路径散列方式、域名散列方式中的一种或多种方式对网络请求进行调度。Step b2, according to the response history information and the current network status information, select one or more of the polling method, minimum connection number method, application server resource-based scheduling method, hash calculation method, path hash method, and domain name hash method to schedule the network request.

例如,在每个预设应用服务器对网络请求的历史响应结果表现一致的情况下,则可根据预设应用服务器网络情况使用最小连接数方式;如果据预设应用服务器网络情况表现一致,则可使用轮询方式;如果不同预设应用服务器性能相差大,则可在最小连接数或轮询方式基础上使用基于应用服务器资源的调度方式;如果网络请求中具有客户端IP地址、请求路径或会话信息等特定参数,则可在最小连接数或轮询方式基础上使用哈希计算方式、路径散列方式、域名散列方式中的一种或多种。For example, if the historical response results of each preset application server to network requests are consistent, the minimum connection number method can be used according to the network conditions of the preset application servers; if the network conditions of the preset application servers are consistent, the polling method can be used; if the performance of different preset application servers varies greatly, the scheduling method based on application server resources can be used on the basis of the minimum connection number or polling method; if the network request contains specific parameters such as the client IP address, request path or session information, one or more of the hash calculation method, path hash method, and domain name hash method can be used on the basis of the minimum connection number or polling method.

本公开实施例可将响应历史信息和当前网络状况信息作为多种调度方式的选择依据,该方式能够实现流量调度策略的动态调整,以优化流量分配。可见本实施例能够根据当前网络条件和服务器负载动态调整,实现智能流量分配。另外,针对高流量情况设计的处理机制,本实施例能够在流量突增时快速调整,确保网络稳定性。The disclosed embodiments can use historical response information and current network status information as the basis for selecting various scheduling methods. This approach enables dynamic adjustment of traffic scheduling strategies to optimize traffic distribution. This demonstrates that the present embodiment can dynamically adjust traffic based on current network conditions and server load, achieving intelligent traffic distribution. Furthermore, the processing mechanism designed for high-traffic situations allows rapid adjustments to sudden traffic increases, ensuring network stability.

在一些可选的实施方式中,按照预设调度策略,将网络请求转发至多个预设应用服务器中的目标应用服务器,包括:对网络请求进行加密,以及按照预设调度策略将加密后的网络请求发送至目标应用服务器。In some optional implementations, forwarding the network request to a target application server among multiple preset application servers according to a preset scheduling policy includes: encrypting the network request, and sending the encrypted network request to the target application server according to the preset scheduling policy.

其中,本实施例能够通过边缘云服务器上配置的专用的硬件加速器对网络请求进行加密。Among them, this embodiment can encrypt network requests through a dedicated hardware accelerator configured on the edge cloud server.

在可信执行环境下,本实施例能对包括网络请求在内的相关敏感数据进行加密和确保代码的完整性,因此,基于本实施例提供的方案,即使在不安全的环境中进行数据传输,也能够保持其数据安全性。In a trusted execution environment, this embodiment can encrypt relevant sensitive data including network requests and ensure the integrity of the code. Therefore, based on the solution provided by this embodiment, data security can be maintained even when data is transmitted in an unsafe environment.

步骤S103,接收目标应用服务器对网络请求的响应结果,以及将响应结果转发至客户端。Step S103: receiving a response result of the target application server to the network request, and forwarding the response result to the client.

其中,目标应用服务器用于对网络请求进行响应,本实施例中的预设应用服务器能够以服务池或实例的方式对收到的网络请求进行响应,得到响应结果,以及将响应结果发送回边缘云服务器。Among them, the target application server is used to respond to the network request. The preset application server in this embodiment can respond to the received network request in the form of a service pool or instance, obtain a response result, and send the response result back to the edge cloud server.

在一些可选的实施方式中,将响应结果转发至客户端,包括:对响应结果进行加密,以及将加密后的响应结果发送至客户端。In some optional implementations, forwarding the response result to the client includes: encrypting the response result, and sending the encrypted response result to the client.

可见本实施例能够对响应结果进行进一步处理,该进一步处理的过程包括上述的加密处理的过程,还可包括例如响应头修改、压缩等处理过程,然后将经过上述进一步处理后的响应结果发送至客户端。It can be seen that this embodiment can further process the response result. The further processing process includes the above-mentioned encryption processing process, and may also include processing processes such as response header modification and compression, and then send the response result after the above-mentioned further processing to the client.

通过加密响应结果的方式,本公开能够进一步提高边缘云服务器与客户端之间数据传输的安全性。By encrypting the response results, the present disclosure can further improve the security of data transmission between the edge cloud server and the client.

本实施例提供的用于CDN的网络请求调度方法,基于TEE技术提供了一个安全的执行环境,用于隔离敏感的计算任务,该执行环境是独立于边缘云服务器主机操作系统的,能够防止外部攻击者访问或修改正在执行的代码和数据。本实施例在边缘云服务器中的可信执行环境中按照预设调度策略对网络请求进行调度,以及将目标应用服务器对网络请求的响应结果转发给客户端;与相关技术相比而言,本公开提供的方案即使在边缘云服务器受到恶意攻击时,由动态加速网关将请求分发到距离客户端更近的边缘云服务器,边缘云服务器对网络请求负载均衡处理,以此通过边缘云服务器和动态加速网关的协同工作,优化边缘云服务器的响应时间以及提高可靠性,保障了数据安全。The network request scheduling method for CDN provided in this embodiment provides a secure execution environment based on TEE technology for isolating sensitive computing tasks. The execution environment is independent of the edge cloud server host operating system and can prevent external attackers from accessing or modifying the code and data being executed. This embodiment schedules network requests according to a preset scheduling strategy in the trusted execution environment in the edge cloud server, and forwards the response results of the target application server to the network request to the client. Compared with related technologies, the solution provided by the present disclosure can distribute the request to the edge cloud server closer to the client by the dynamic acceleration gateway even when the edge cloud server is attacked maliciously. The edge cloud server performs load balancing on the network request, thereby optimizing the response time of the edge cloud server and improving reliability through the collaborative work of the edge cloud server and the dynamic acceleration gateway, thereby ensuring data security.

在本实施例中提供了一种用于CDN的网络请求调度方法,该网络请求调度方法应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎;图2是根据本公开实施例的网络请求调度方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a network request scheduling method for CDN is provided. The network request scheduling method is applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment. FIG2 is a flow chart of the network request scheduling method according to an embodiment of the present disclosure. As shown in FIG2 , the flow includes the following steps:

步骤S201,获取动态加速网关发送的网络请求,网络请求是动态加速网关对来自于客户端的网络请求进行安全检查,并在安全检查通过后发送的。详细请参见图1所示实施例的步骤S101,在此不再赘述。Step S201: Obtain a network request sent by a dynamic acceleration gateway. The network request is a security check performed by the dynamic acceleration gateway on a network request from a client and sent after the security check passes. Please refer to step S101 of the embodiment shown in FIG1 for details, which will not be repeated here.

步骤S202,在可信执行环境中,按照预设调度策略,将网络请求转发至多个预设应用服务器中的目标应用服务器。详细请参见图1所示实施例的步骤S102,在此不再赘述。Step S202: In the trusted execution environment, the network request is forwarded to a target application server among the plurality of preset application servers according to a preset scheduling policy. For details, please refer to step S102 of the embodiment shown in FIG1 , which will not be described in detail here.

步骤S203,接收目标应用服务器对网络请求的响应结果,以及将响应结果转发至客户端。详细请参见图1所示实施例的步骤S103,在此不再赘述。Step S203: Receive the response result of the target application server to the network request and forward the response result to the client. Please refer to step S103 of the embodiment shown in Figure 1 for details, which will not be repeated here.

步骤S204,将在可信执行环境中调度网络请求的过程记录为日志文件,以及对日志文件进行存储。Step S204: Record the process of scheduling the network request in the trusted execution environment as a log file, and store the log file.

例如,本实施例对在可信执行环境中的关键操作进行记录,并记录为日志文件以及对该日志文件进行存储。For example, this embodiment records key operations in a trusted execution environment, records them as log files, and stores the log files.

本实施例提供的用于CDN的网络请求调度方法,还通过将在可信执行环境中调度网络请求的过程记录为日志,这对于后续的分析、审计和监控至关重要。The network request scheduling method for CDN provided in this embodiment also records the process of scheduling network requests in a trusted execution environment as a log, which is crucial for subsequent analysis, auditing, and monitoring.

本实施例还提供了利用日志文件进行追踪和故障排查的方法,如图3所示,具体包括:This embodiment also provides a method for tracking and troubleshooting using log files, as shown in FIG3 , which specifically includes:

步骤c1,获取异常检测请求。Step c1: Obtain an anomaly detection request.

其中,可以通过不同的方式获取异常检测请求。这可能包括用户提交的异常报告、监控系统的警报、自动化的错误检测机制或其他异常检测系统的输出等。Anomaly detection requests can be obtained in different ways, including anomaly reports submitted by users, alerts from monitoring systems, automated error detection mechanisms, or output from other anomaly detection systems.

步骤c2,查询异常检测请求所关联的目标日志文件。Step c2: query the target log file associated with the anomaly detection request.

具体的,根据异常检测请求的标识或相关信息,可以通过系统的日志管理工具或查询接口来搜索和获取与该请求相关的目标日志文件。Specifically, according to the identifier or related information of the anomaly detection request, the target log file related to the request can be searched and obtained through the system's log management tool or query interface.

步骤c3,分析目标日志文件得到相应目标网络请求的调度路径,得到调度路径中各个节点处理目标网络请求的处理情况。Step c3: Analyze the target log file to obtain the scheduling path of the corresponding target network request, and obtain the processing status of each node in the scheduling path in processing the target network request.

具体的,首先需要对目标日志文件进行解析,根据解析得到的日志数据,确定目标网络请求的唯一标识,可以是请求ID、URL、IP地址或其他请求相关的标识。利用请求标识,在日志数据中追踪请求的调度路径。通过查找该请求在日志中的各个记录,以及其中的关联信息来实现。例如,可以根据请求ID找到对应的日志记录,以及记录中的节点ID或名称。Specifically, the target log file must first be parsed. Based on the parsed log data, the unique identifier of the target network request is determined. This can be a request ID, URL, IP address, or other request-related identifier. Using the request identifier, the dispatch path of the request is tracked within the log data. This is achieved by searching for each record of the request in the log and the associated information within it. For example, the corresponding log record can be found based on the request ID, along with the node ID or name within the record.

根据追踪到的调度路径,查找每个节点的处理情况。处理情况包括节点的处理时间、响应状态码、错误信息等。可以通过分析日志记录中的相关字段或标志来提取这些信息。将每个节点的处理情况整理和汇总,将数据存储在一个数据结构中,以便后续处理和分析。Based on the traced dispatch path, the processing status of each node is determined. This includes processing time, response status code, error information, and more. This information can be extracted by analyzing relevant fields or flags in the log records. The processing status of each node is collated and summarized, and the data is stored in a data structure for subsequent processing and analysis.

步骤c4,根据处理情况进行异常检测得到检测结果。Step c4: perform anomaly detection according to the processing situation to obtain a detection result.

具体的,将所得到的处理情况数据与异常检测规则或指标进行比较和判断。可以是基于阈值的比较,例如:响应时间超过某个阈值,或是基于规则的验证,如错误码与预期不符。最终,根据比较和判断的结果,生成异常检测的结果。例如:将异常请求标记为有异常、生成异常报告或制定警报等。Specifically, the obtained processing data is compared with anomaly detection rules or indicators to generate a judgment. This can be based on threshold comparisons, such as response time exceeding a certain threshold, or rule-based verification, such as error codes not matching expectations. Ultimately, based on the comparison and judgment results, anomaly detection results are generated. For example, abnormal requests may be marked as abnormal, anomaly reports may be generated, or alerts may be set.

综上,本申请通过查询异常检测请求关联的目标日志文件,可以定位到异常请求产生时的具体日志文件,方便后续的分析和处理。分析目标日志文件得到调度路径,可以提供对网络请求的全局视角,而后根据路径中各个节点的处理情况的评估和判断,快速生成异常检测结果和报告,帮助系统管理员或开发人员迅速响应和解决问题。In summary, by querying the target log file associated with anomaly detection requests, this application can locate the specific log file at the time the anomaly request was generated, facilitating subsequent analysis and processing. Analyzing the target log file to obtain the dispatch path provides a global perspective on network requests. Then, based on the evaluation and judgment of the processing status of each node in the path, anomaly detection results and reports are quickly generated, helping system administrators or developers to quickly respond to and resolve issues.

例如:目标日志文件记录了视频业务的相关信息。通过分析该日志文件,得到视频网络请求的调度路径,并分析每个节点的处理情况以进行异常检测。For example, the target log file records information related to video services. By analyzing this log file, the scheduling path of video network requests can be obtained, and the processing status of each node can be analyzed to detect anomalies.

根据以日志文件,可以得到视频网络请求的调度路径如下:Node1—Node2。对应每个节点的处理情况如下:Node1:处理时间为2.1秒,响应状态码为200,没有错误信息。Node2:处理时间为3.6秒,响应状态码为200,没有错误信息。According to the log file, the scheduling path for the video network request is as follows: Node1-Node2. The processing status of each node is as follows: Node1: Processing time is 2.1 seconds, response status code is 200, and there is no error message. Node2: Processing time is 3.6 seconds, response status code is 200, and there is no error message.

根据处理情况进行异常检测,我们可以得到以下检测结果:Node1的处理时间在正常范围内,没有异常。Node2的处理时间较长,可能存在异常。因此,检测结果为:Node2和Node3存在异常。Based on the processing situation, we perform anomaly detection and obtain the following results: Node1's processing time is within the normal range and is normal. Node2's processing time is longer, which may indicate an anomaly. Therefore, the detection results indicate that Node2 and Node3 have anomalies.

如图4所示,可将动态加速网关、基于可信执行环境的动态加速路由调度引擎(即前述实施例中的动态加速路由调度引擎)、动态均衡日志服务均布置在边缘云服务器的动态加速网关上。本实施例的动态加速路由调度引擎能够与边缘云平台之间进行功能自动扩展和集成,根据流量的变化动态地调整后端资源。本实施例中的动态加速路由调度引擎还能够进行自我修复,当检测到后端的预设应用服务器提供的服务发生故障时,自动重新路由流量,保证业务的持续运行。另外,该动态加速路由调度引擎还可与网络应用防火墙(WAF,Web Application Firewall)集成,提供安全层面的流量监控和攻击防御。As shown in Figure 4, the dynamic acceleration gateway, the dynamic acceleration routing scheduling engine based on the trusted execution environment (i.e., the dynamic acceleration routing scheduling engine in the aforementioned embodiment), and the dynamic balancing log service can all be deployed on the dynamic acceleration gateway of the edge cloud server. The dynamic acceleration routing scheduling engine of this embodiment can automatically expand and integrate functions with the edge cloud platform, and dynamically adjust back-end resources according to changes in traffic. The dynamic acceleration routing scheduling engine in this embodiment can also perform self-repair. When it detects that a service provided by the preset application server at the back end fails, it automatically reroutes traffic to ensure the continuous operation of the business. In addition, the dynamic acceleration routing scheduling engine can also be integrated with a network application firewall (WAF, Web Application Firewall) to provide traffic monitoring and attack defense at the security level.

具体地,本实施例的用于CDN的网络请求调度方法具体可包括如下的步骤:Specifically, the network request scheduling method for CDN of this embodiment may include the following steps:

步骤S401,客户端(例如包括电子设备上的浏览器、应用程序等)向边缘云服务器发送的网络请求,首先到达动态加速网关(动态加速网关),即用户访问服务到达动态加速网关,动态加速网关负责接收这些网络请求,并根据预定义的规则(如URL路径、请求类型等)解析这些请求。动态加速网关可以对网络请求进行初步处理,例如SSL(Secure Sockets Layer,安全套接层)终端检查、请求检查、日志记录等,此阶段可能还包括对请求进行安全检查,例如防止DDoS(Distributed Denial Of Service attack,分布式拒绝服务攻击)、SQL(Structured Query Language,结构化查询语言)注入等,确保只有合法和安全的请求能够被进一步处理。In step S401, a network request sent by a client (e.g., a browser or application on an electronic device) to an edge cloud server first reaches a dynamic acceleration gateway (dynamic acceleration gateway). This means that the user's access to the service reaches the dynamic acceleration gateway, which is responsible for receiving these network requests and parsing them according to predefined rules (e.g., URL path, request type, etc.). The dynamic acceleration gateway can perform preliminary processing on network requests, such as SSL (Secure Sockets Layer) terminal inspection, request inspection, and logging. This stage may also include security checks on the requests, such as preventing DDoS (Distributed Denial of Service attack) and SQL (Structured Query Language) injection, to ensure that only legitimate and secure requests are further processed.

步骤S402,动态加速网关转发流量至基于可信执行环境的动态加速路由调度引擎,即动态加速网关将网络请求转发至基于可信执行环境的动态加速路由调度引擎。In step S402 , the dynamic acceleration gateway forwards traffic to the dynamic acceleration routing scheduling engine based on the trusted execution environment. That is, the dynamic acceleration gateway forwards the network request to the dynamic acceleration routing scheduling engine based on the trusted execution environment.

步骤S403,动态加速路由调度引擎在可信执行环境中执行调度算法,将网络请求发送至目标应用服务器进行处理,并接收目标应用服务器的响应结果,以及将响应结果反馈给对应的客户端,完成网络请求调度。In step S403, the dynamic acceleration routing scheduling engine executes the scheduling algorithm in the trusted execution environment, sends the network request to the target application server for processing, receives the response result from the target application server, and feeds back the response result to the corresponding client to complete the network request scheduling.

在可信执行环境这个安全的环境中,可执行动态加速网关的核心功能,即实现流量调度逻辑,即使边缘云服务器主机操作系统受到恶意软件的侵害,在可信执行环境内的流量调度逻辑也不会受到影响。In the secure environment of the trusted execution environment, the core function of the dynamic acceleration gateway can be executed, that is, the traffic scheduling logic can be implemented. Even if the edge cloud server host operating system is compromised by malware, the traffic scheduling logic in the trusted execution environment will not be affected.

步骤S404,基于动态均衡日志服务,动态加速路由调度引擎记录可信执行环境调度日志。Step S404: Based on the dynamic balancing log service, the dynamic acceleration routing scheduling engine records the trusted execution environment scheduling log.

综上,本公开基于TEE技术来保护动态加速路由调度引擎,使其在包含边缘云环境的多云环境中运行得更安全,特别是在那些需要部署在中心云之外的其他数据中心或边缘机房的情况下,本公开能够有效地减少恶意软件或者攻击者对动态加速服务的干扰,即使恶意软件感染了操作系统(受到操作系统级别的威胁),本公开提供的调度决策也是安全的和可靠的,可见本公开明显提高了服务可靠性和安全性,特别提高了边缘云服务器对流量调度的安全性和可靠性;本公开适用于安全性要求极高的场景,例如金融服务数据、敏感数据处理等。In summary, the present disclosure uses TEE technology to protect the dynamic acceleration routing scheduling engine, making it run more securely in a multi-cloud environment including an edge cloud environment. Especially in cases where it needs to be deployed in other data centers or edge computer rooms outside the central cloud, the present disclosure can effectively reduce the interference of malware or attackers on the dynamic acceleration service. Even if the malware infects the operating system (subject to operating system-level threats), the scheduling decisions provided by the present disclosure are safe and reliable. It can be seen that the present disclosure significantly improves service reliability and security, especially improves the security and reliability of traffic scheduling by edge cloud servers; the present disclosure is suitable for scenarios with extremely high security requirements, such as financial service data, sensitive data processing, etc.

图5是根据本公开实施例的用于CDN的网络请求调度方法的流程图,如图5所示,方法应用于动态加速网关,方法包括:FIG5 is a flow chart of a method for scheduling network requests for a CDN according to an embodiment of the present disclosure. As shown in FIG5 , the method is applied to a dynamic acceleration gateway, and the method includes:

步骤S501,获取客户端发送的网络请求。Step S501: Obtain a network request sent by a client.

动态加速网关作为中间层,部署在客户端和边缘云服务器之间。客户端向动态加速网关发送网络请求,并通过网络通信协议将请求数据传输给动态加速网关。The dynamic acceleration gateway is deployed as an intermediate layer between the client and the edge cloud server. The client sends a network request to the dynamic acceleration gateway, and the request data is transmitted to the dynamic acceleration gateway through the network communication protocol.

步骤S502,解析网络请求中确定网络请求对应的请求类型,查询请求类型对应的安全检查策略。Step S502: parse the network request to determine the request type corresponding to the network request, and query the security check policy corresponding to the request type.

步骤S502,包括:获取网络请求中的请求头;解析请求头得到请求头所包含的字段内容,得到请求标识;获取请求标识对应的请求类型。对网络请求进行解析和安全检查,可以快速确定请求的类型和安全性。这样可以在最短的时间内进行初步处理,并决定是否将请求发送到边缘云服务器进行调度。快速响应可以提高用户体验和系统的性能。Step S502 includes: obtaining a request header from the network request; parsing the request header to obtain the fields contained therein and obtain a request identifier; and obtaining the request type corresponding to the request identifier. Parsing and security checking the network request quickly determines the request type and security. This allows for the shortest possible initial processing and a decision on whether to send the request to the edge cloud server for dispatch. Rapid response improves user experience and system performance.

具体的,当客户端发送网络请求时,请求头是作为请求的一部分随请求一起发送的。动态加速网关可以通过接收到的请求数据获取请求头,并对请求头进行解析以提取其中的字段内容。请求头中包含了与请求相关的元数据和其他信息,它可以包含多个字段,每个字段都有特定的作用。常见的请求头字段包括User-Agent、Accept、Content-Type等,它们提供了关于客户端和请求内容的详细信息。动态加速网关可以解析请求头,并获取其中各个字段的具体值。例如,可以通过解析User-Agent字段获取客户端的浏览器信息和操作系统信息。还可以通过解析Accept字段获取客户端接受的内容类型。此外,也可以根据业务需求添加自定义的请求标识字段,并通过解析该字段获取请求标识。请求标识通常用于唯一标识一个请求,以便在后续的处理中进行识别和处理。根据具体需求,可以选择从请求头中的某个字段提取请求标识,也可以通过自定义的请求标识字段来获取。通过提取请求标识,动态加速网关可以在后续的处理流程中对请求进行识别、路由或者其他处理操作。通过解析请求头并提取字段内容,动态加速网关可以根据客户端的需求和特定的业务逻辑进行灵活的处理,提供个性化的服务和增强功能。Specifically, when a client sends a network request, a request header is sent along with the request. The dynamic acceleration gateway can obtain the request header from the received request data and parse it to extract the fields within. The request header contains metadata and other information related to the request. It can include multiple fields, each with a specific purpose. Common request header fields include User-Agent, Accept, and Content-Type, which provide detailed information about the client and the request content. The dynamic acceleration gateway can parse the request header and obtain the specific values of each field. For example, the User-Agent field can be parsed to obtain information about the client's browser and operating system. The Accept field can also be parsed to obtain the content type accepted by the client. Furthermore, a custom request identifier field can be added based on business needs and parsed to obtain the request identifier. The request identifier is typically used to uniquely identify a request for subsequent identification and processing. Depending on specific needs, the request identifier can be extracted from a specific field in the request header or from a custom request identifier field. By extracting the request identifier, the dynamic acceleration gateway can identify, route, or perform other processing operations on the request in subsequent processing. By parsing the request header and extracting the field content, the dynamic acceleration gateway can flexibly process according to the client's needs and specific business logic, providing personalized services and enhanced functions.

通过获取请求标识,动态加速网关可以确定请求对应的请求类型。具体通过匹配、映射或查询操作来实现。请求类型可以根据业务需求进行分类,例如GET请求、POST请求、PUT请求等。根据请求标识,可以将请求类型与特定的处理逻辑或路由进行关联。By obtaining the request identifier, the dynamic acceleration gateway can determine the corresponding request type. This is achieved through matching, mapping, or querying operations. Request types can be categorized based on business needs, such as GET, POST, and PUT. Based on the request identifier, the request type can be associated with specific processing logic or routing.

步骤S503,利用安全检查策略对网络请求所携带的请求内容进行安全检查,得到请求初步处理结果。Step S503: Perform a security check on the request content carried by the network request using the security check policy to obtain a preliminary request processing result.

例如:客户端通过应用程序提交用户个人信息查询请求,请求中包含待查询的用户ID或用户名等信息。动态加速网关接收到查询请求后,首先执行安全检查策略。For example, a client submits a request to query user personal information through an application. The request includes the user ID or username to be queried. After receiving the query request, the dynamic acceleration gateway first executes the security check policy.

安全检查策略1:验证客户端权限。动态加速网关根据请求中携带的访问凭证(如访问令牌、用户ID)进行验证,并检查是否具有查询其他用户个人信息的权限。如果验证失败或者权限不足,拒绝该查询请求,并返回错误信息给客户端,提示重新登录或者获取相应的权限。Security Check Strategy 1: Verify client permissions. The Dynamic Acceleration Gateway verifies the access credentials (such as access tokens and user IDs) included in the request and checks whether the client has permission to query other users' personal information. If verification fails or the client lacks permission, the query request is rejected and an error message is returned to the client, prompting the client to log in again or obtain the appropriate permissions.

如果验证通过且具有查询权限,继续执行下一项安全检查策略。If the verification is successful and the query permission is granted, the next security check policy is executed.

安全检查策略2:验证查询参数的合法性。动态加速网关对查询请求中携带的客户端ID或者操作标识等参数进行验证,确保参数符合规定的格式和要求。Security Check Strategy 2: Verify the legitimacy of query parameters. The dynamic acceleration gateway verifies parameters such as the client ID or operation identifier carried in the query request to ensure that the parameters comply with the specified format and requirements.

如果查询参数不合法或者有潜在的安全风险,拒绝该查询请求,并返回错误信息给客户端,提示重新输入有效的查询参数。If the query parameters are illegal or pose a potential security risk, the query request will be rejected and an error message will be returned to the client, prompting the client to re-enter valid query parameters.

如果查询参数合法,继续执行下一项安全检查策略。If the query parameters are valid, the next security check policy is executed.

安全检查策略3:敏感信息过滤。动态加速网关根据安全策略,对查询结果中的敏感信息进行过滤,确保不会返回潜在的隐私泄露或安全风险。如果查询结果中包含敏感信息,动态加速网关会进行脱敏处理或者只返回经过授权的部分信息。Security Check Policy 3: Sensitive Information Filtering. The Dynamic Acceleration Gateway filters sensitive information in query results based on security policies to ensure that no potential privacy leaks or security risks are returned. If query results contain sensitive information, the Dynamic Acceleration Gateway will desensitize it or only return authorized information.

步骤S504,若请求初步处理结果为合法结果,则根据客户端的网络环境信息确定相应的边缘云服务器,并发送网络请求至边缘云服务器中的动态加速路由调度引擎,以通过边缘云服务器对网络请求进行调度。In step S504, if the preliminary processing result of the request is a legal result, the corresponding edge cloud server is determined according to the network environment information of the client, and the network request is sent to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.

具体的,若请求初步处理结果为合法结果,表示该网络请求通过了安全检查策略,是合法且安全的。接下来,动态加速网关会根据客户端的网络环境信息确定相应的边缘云服务器,并将网络请求发送至边缘云服务器中的动态加速路由调度引擎进行调度处理。Specifically, if the initial processing result of the request is legal, it means that the network request has passed the security check policy and is legal and secure. Next, the dynamic acceleration gateway determines the corresponding edge cloud server based on the client's network environment information and sends the network request to the dynamic acceleration routing scheduling engine in the edge cloud server for scheduling and processing.

动态加速网关在确定最合适的边缘云服务器时,会考虑客户端的网络环境信息,包括地理位置和网络状况。根据这些信息,它会选择最近的边缘云服务器来提供服务。首先,动态加速网关利用客户端的地理位置来确定最近的边缘云服务器。边缘节点通常分布在不同的地区,它们离客户端的地理位置越近,网络延迟就越低。通过根据客户端的地理位置和边缘节点的位置进行比对,动态加速网关可以找到最近的边缘云服务器。其次,动态加速网关还会根据客户端的网络状况来选择最佳的网络路径。它会检测客户端与各个边缘云服务器之间的网络延迟、带宽、丢包率等指标。通过对这些指标的评估,它可以选择具有最优性能的网络路径,以确保客户端能够获得较低的延迟和较高的带宽。When determining the most suitable edge cloud server, the dynamic acceleration gateway considers the client's network environment information, including geographic location and network conditions. Based on this information, it selects the nearest edge cloud server to provide services. First, the dynamic acceleration gateway uses the client's geographic location to determine the nearest edge cloud server. Edge nodes are typically located in different regions, and the closer they are to the client's geographic location, the lower the network latency. By comparing the client's geographic location with the location of the edge node, the dynamic acceleration gateway can find the nearest edge cloud server. Second, the dynamic acceleration gateway also selects the optimal network path based on the client's network conditions. It monitors network latency, bandwidth, packet loss rate, and other metrics between the client and each edge cloud server. By evaluating these metrics, it selects the network path with the best performance, ensuring low latency and high bandwidth for the client.

当确定了最近的边缘云服务器和最佳的网络路径,动态加速网关将会将客户端的请求路由至该边缘云服务器。边缘云服务器可以根据具体的业务需求进行调度,例如将请求转发到最近的应用服务器,根据负载情况进行负载均衡,或者根据内容进行缓存等。这样,客户端可以通过边缘云服务器获得更快的响应时间。Once the nearest edge cloud server and optimal network path are determined, the dynamic acceleration gateway routes the client's request to that edge cloud server. The edge cloud server can be scheduled based on specific business needs, such as forwarding requests to the nearest application server, performing load balancing based on load, or caching based on content. This allows clients to receive faster response times from the edge cloud server.

综上,动态加速网关通过综合考虑客户端的地理位置和网络状况,选择最近的边缘云服务器和最佳的网络路径,从而实现了对边缘服务的加速和优化。这种方式可以实现高效访问,并有效利用边缘计算资源。In summary, the dynamic acceleration gateway accelerates and optimizes edge services by comprehensively considering the client's geographic location and network conditions, selecting the nearest edge cloud server and the optimal network path. This approach enables efficient access and effective utilization of edge computing resources.

本公开动态加速网关获取并解析客户端发送的网络请求,可以对请求进行安全检查。可以防止恶意请求或攻击,提高系统的安全性。通过确定请求对应的请求类型,并查询相应的安全检查策略,可以根据安全检查策略对请求内容进行详细的安全检查,从而提供更全面的安全保护。然后根据客户端的网络环境信息确定合适的边缘云服务器,可以最大限度地降低延迟并提高系统的性能。将网络请求发送到最近的边缘云服务器可以减少数据传输的距离和时间,从而提升应用程序的响应速度和性能。此外,边缘云服务器可以根据负载均衡算法和其他策略,将请求分发到后端服务器,进一步优化系统的负载均衡和性能。The disclosed dynamic acceleration gateway obtains and parses the network request sent by the client, and can perform security checks on the request. It can prevent malicious requests or attacks and improve the security of the system. By determining the request type corresponding to the request and querying the corresponding security check policy, a detailed security check can be performed on the request content according to the security check policy, thereby providing more comprehensive security protection. Then, the appropriate edge cloud server is determined based on the client's network environment information, which can minimize latency and improve system performance. Sending network requests to the nearest edge cloud server can reduce the distance and time of data transmission, thereby improving the response speed and performance of the application. In addition, the edge cloud server can distribute requests to the back-end server based on the load balancing algorithm and other strategies to further optimize the load balancing and performance of the system.

综上,获取客户端发送的网络请求并解析进行安全检查的技术方案可以提供更高的安全性、快速响应、边缘云服务器调度的优势,并具备弹性和可扩展性,适应不同的业务需求和系统需求。另外,根据客户端的网络环境信息进行调度,可以提高CDN的安全性、性能和负载均衡能力。In summary, the technical solution of acquiring client network requests and parsing them for security checks offers the advantages of enhanced security, rapid response, and edge cloud server scheduling. It also offers flexibility and scalability to adapt to diverse business and system requirements. Furthermore, scheduling based on client network environment information can improve CDN security, performance, and load balancing capabilities.

在本实施例中还提供了一种用于CDN的网络请求调度装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a network request scheduling device for a CDN. This device is used to implement the above-mentioned embodiments and preferred implementations. Details that have already been described will not be repeated. As used below, the term "module" may refer to a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

本实施例提供一种用于CDN的网络请求调度装置,该网络请求调度装置部署于应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎,如图6所示,该网络请求调度装置包括:This embodiment provides a network request scheduling device for CDN. The network request scheduling device is deployed in a dynamic acceleration routing scheduling engine applied to an edge cloud server configured with a trusted execution environment. As shown in FIG6 , the network request scheduling device includes:

获取模块601,用于获取动态加速网关发送的网络请求,网络请求是动态加速网关对来自于客户端的网络请求进行安全检查,并在安全检查通过后发送的。The acquisition module 601 is used to acquire a network request sent by the dynamic acceleration gateway. The network request is sent by the dynamic acceleration gateway after the dynamic acceleration gateway performs a security check on the network request from the client and passes the security check.

调度模块602,用于在可信执行环境中,按照预设调度策略,将网络请求转发至多个预设应用服务器中的目标应用服务器。The scheduling module 602 is configured to forward the network request to a target application server among a plurality of preset application servers according to a preset scheduling policy in a trusted execution environment.

响应模块603,用于接收目标应用服务器对网络请求的响应结果,以及用于将响应结果转发至客户端。The response module 603 is used to receive the response result of the target application server to the network request, and to forward the response result to the client.

在一些可选的实施方式中,该网络请求调度装置还包括日志记录模块。In some optional implementations, the network request scheduling device further includes a logging module.

日志记录模块,用于将在可信执行环境中调度网络请求的过程记录为日志文件,以及用于对日志文件进行存储。The logging module is used to record the process of scheduling network requests in the trusted execution environment as a log file, and to store the log file.

在一些可选的实施方式中,预设调度策略包括轮询方式、最小连接数方式、基于应用服务器资源的调度方式、哈希计算方式、路径散列方式以及域名散列方式中的至少一种方式。In some optional implementations, the preset scheduling strategy includes at least one of a polling method, a minimum connection number method, a scheduling method based on application server resources, a hash calculation method, a path hash method, and a domain name hash method.

调度模块602,具体用于通过轮询方式、最小连接数方式、基于应用服务器资源的调度方式、哈希计算方式、路径散列方式、域名散列方式中的至少一种方式对网络请求进行调度,以将网络请求调度至目标应用服务器。The scheduling module 602 is specifically used to schedule network requests through at least one of polling, minimum connection number, application server resource-based scheduling, hash calculation, path hash, and domain name hash to schedule network requests to the target application server.

在一些可选的实施方式中,该网络请求调度装置还包括:In some optional implementations, the network request scheduling apparatus further includes:

环境创建模块,用于在边缘云服务器中的动态加速网关上创建可信执行环境。The environment creation module is used to create a trusted execution environment on the dynamic acceleration gateway in the edge cloud server.

签名验证模块,用于对预设调度策略对应的执行代码的签名进行验证。The signature verification module is used to verify the signature of the execution code corresponding to the preset scheduling strategy.

代码运行模块,用于根据执行代码的签名通过验证,在可信执行环境中运行执行代码。The code execution module is used to execute the execution code in a trusted execution environment based on the signature verification of the execution code.

运行拒绝模块,用于根据执行代码的签名未通过验证,拒绝执行代码在可信执行环境中运行。The execution rejection module is used to reject the execution code from running in the trusted execution environment based on the signature of the execution code failing to pass the verification.

在一些可选的实施方式中,调度模块602,还用于对网络请求进行加密,以及按照预设调度策略将加密后的网络请求发送至目标应用服务器。In some optional implementations, the scheduling module 602 is further configured to encrypt the network request and send the encrypted network request to the target application server according to a preset scheduling policy.

响应模块603,还用于对响应结果进行加密,以及将加密后的响应结果发送至客户端。The response module 603 is further configured to encrypt the response result and send the encrypted response result to the client.

在一些可选的实施方式中,该网络请求调度装置还包括:异常检测模块,用于获取异常检测请求;查询异常检测请求所关联的目标日志文件;分析目标日志文件得到相应目标网络请求的调度路径,得到调度路径中各个节点处理目标网络请求的处理情况;根据处理情况进行异常检测得到检测结果。In some optional embodiments, the network request scheduling device also includes: an anomaly detection module, used to obtain an anomaly detection request; query the target log file associated with the anomaly detection request; analyze the target log file to obtain the scheduling path of the corresponding target network request, and obtain the processing status of each node in the scheduling path processing the target network request; perform anomaly detection based on the processing status to obtain a detection result.

在本实施例中还提供了一种用于CDN的网络请求调度装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a network request scheduling device for a CDN. This device is used to implement the above-mentioned embodiments and preferred implementations. Details that have already been described will not be repeated. As used below, the term "module" may refer to a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

本实施例提供一种用于CDN的网络请求调度装置,如图7所示,该网络请求调度装置包括:This embodiment provides a network request scheduling device for CDN, as shown in FIG7 , the network request scheduling device includes:

接收模块701,用于获取客户端发送的网络请求;Receiving module 701, used to obtain the network request sent by the client;

解析模块702,用于解析网络请求中确定网络请求对应的请求类型,查询请求类型对应的安全检查策略;The parsing module 702 is used to parse the network request to determine the request type corresponding to the network request and query the security check policy corresponding to the request type;

检查模块703,用于利用安全检查策略对网络请求所携带的请求内容进行安全检查,得到请求初步处理结果,The inspection module 703 is used to perform a security inspection on the request content carried by the network request using the security inspection strategy to obtain a preliminary processing result of the request.

发送模块704,用于若请求初步处理结果为合法结果,则根据客户端的网络环境信息确定相应的边缘云服务器,并发送网络请求至边缘云服务器中的动态加速路由调度引擎,以通过边缘云服务器对网络请求进行调度。The sending module 704 is used to determine the corresponding edge cloud server according to the network environment information of the client if the preliminary processing result of the request is a legal result, and send the network request to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server.

在一些可选的实施方式中,解析模块702,用于获取网络请求中的请求头;解析请求头得到请求头所包含的字段内容,得到请求标识;获取请求标识对应的请求类型。In some optional implementations, the parsing module 702 is configured to obtain a request header in a network request; parse the request header to obtain field contents contained in the request header, and obtain a request identifier; and obtain a request type corresponding to the request identifier.

请参阅图8,图8是本公开可选实施例提供的一种计算机设备的结构示意图,如图8所示,该计算机设备包括:一个或多个处理器10、存储器20,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相通信连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在计算机设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在一些可选的实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个计算机设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。Please refer to Figure 8, which is a structural diagram of a computer device provided by an optional embodiment of the present disclosure. As shown in Figure 8, 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. The various components are connected to each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the 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 and multiple memories. Similarly, 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).

处理器10可以是中央处理器,网络处理器或其组合。其中,处理器10还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路,可编程逻辑器件或其组合。上述可编程逻辑器件可以是复杂可编程逻辑器件,现场可编程逻辑门阵列,通用阵列逻辑或其任意组合。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.

其中,存储器20存储有可由至少一个处理器10执行的指令,以使至少一个处理器10执行实现上述实施例示出的方法。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.

存储器20可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据计算机设备的使用所创建的数据等。此外,存储器20可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些可选的实施方式中,存储器20可选包括相对于处理器10远程设置的存储器,这些远程存储器可以通过网络连接至该计算机设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。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.

存储器20可以包括易失性存储器,例如,随机存取存储器;存储器也可以包括非易失性存储器,例如,快闪存储器,硬盘或固态硬盘;存储器20还可以包括上述种类的存储器的组合。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.

该计算机设备还包括通信接口30,用于该计算机设备与其他设备或通信网络通信。The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

本公开实施例还提供了一种计算机可读存储介质,上述根据本公开实施例的方法可在硬件、固件中实现,或者被实现为可记录在存储介质,或者被实现通过网络下载的原始存储在远程存储介质或非暂时机器可读存储介质中并将被存储在本地存储介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件的存储介质上的这样的软件处理。其中,存储介质可为磁碟、光盘、只读存储记忆体、随机存储记忆体、快闪存储器、硬盘或固态硬盘等;进一步地,存储介质还可以包括上述种类的存储器的组合。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件,当软件或计算机代码被计算机、处理器或硬件访问且执行时,实现上述实施例示出的方法。The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network 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.

虽然结合附图描述了本公开的实施例,但是本领域技术人员可以在不脱离本公开的精神和范围的情况下做出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present disclosure 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 disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims (11)

一种用于CDN的网络请求调度方法,所述方法应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎,所述方法包括:A network request scheduling method for CDN, the method being applied to a dynamic acceleration routing scheduling engine in an edge cloud server configured with a trusted execution environment, the method comprising: 获取动态加速网关发送的网络请求,所述网络请求是所述动态加速网关对来自于客户端的网络请求进行安全检查,并在安全检查通过后发送的;Obtaining a network request sent by a dynamic acceleration gateway, wherein the network request is a network request from a client that the dynamic acceleration gateway performs a security check on and sends after passing the security check; 在所述可信执行环境中,按照预设调度策略,将所述网络请求转发至多个预设应用服务器中的目标应用服务器;In the trusted execution environment, forwarding the network request to a target application server among a plurality of preset application servers according to a preset scheduling policy; 接收所述目标应用服务器对所述网络请求的响应结果,以及将所述响应结果转发至所述客户端。Receive a response result of the target application server to the network request, and forward the response result to the client. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising: 将在所述可信执行环境中调度所述网络请求的过程记录为日志文件,以及对所述日志文件进行存储。The process of scheduling the network request in the trusted execution environment is recorded as a log file, and the log file is stored. 根据权利要求1所述的方法,其中,所述获取动态加速网关发送的网络请求之前,所述方法还包括:The method according to claim 1, wherein, before obtaining the network request sent by the dynamic acceleration gateway, the method further comprises: 在所述边缘云服务器中创建所述可信执行环境;Creating the trusted execution environment in the edge cloud server; 对所述预设调度策略对应的执行代码的签名进行验证;Verifying the signature of the execution code corresponding to the preset scheduling policy; 若所述执行代码的签名通过验证,则在所述可信执行环境中运行所述执行代码;If the signature of the execution code passes the verification, running the execution code in the trusted execution environment; 若所述执行代码的签名未通过验证,则拒绝所述执行代码在所述可信执行环境中运行。If the signature of the execution code fails to pass the verification, the execution code is refused to run in the trusted execution environment. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein 所述按照预设调度策略,将所述网络请求转发至多个预设应用服务器中的目标应用服务器,包括:对所述网络请求进行加密,以及按照所述预设调度策略将加密后的所述网络请求发送至所述目标应用服务器;Forwarding the network request to a target application server among a plurality of preset application servers according to a preset scheduling policy includes: encrypting the network request, and sending the encrypted network request to the target application server according to the preset scheduling policy; 所述将所述响应结果转发至所述客户端,包括:对所述响应结果进行加密,以及将加密后的所述响应结果发送至所述客户端。The forwarding the response result to the client includes: encrypting the response result, and sending the encrypted response result to the client. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising: 获取异常检测请求;Get anomaly detection request; 查询所述异常检测请求所关联的目标日志文件;Querying the target log file associated with the anomaly detection request; 分析所述目标日志文件得到相应目标网络请求的调度路径,得到调度路径中各个节点处理所述目标网络请求的处理情况;Analyze the target log file to obtain a scheduling path for the corresponding target network request, and obtain a processing status of each node in the scheduling path for processing the target network request; 根据所述处理情况进行异常检测得到检测结果。Anomaly detection is performed according to the processing situation to obtain a detection result. 一种用于CDN的网络请求调度方法,所述方法应用于动态加速网关,所述方法包括:A network request scheduling method for CDN, the method being applied to a dynamic acceleration gateway, the method comprising: 获取客户端发送的网络请求;Get the network request sent by the client; 解析所述网络请求中确定所述网络请求对应的请求类型,查询所述请求类型对应的安全检查策略;Parsing the network request to determine the request type corresponding to the network request, and querying the security check policy corresponding to the request type; 利用所述安全检查策略对所述网络请求所携带的请求内容进行安全检查,得到请求初步处理结果;Performing a security check on the request content carried by the network request using the security check strategy to obtain a preliminary request processing result; 若所述请求初步处理结果为合法结果,则根据所述客户端的网络环境信息确定相应的边缘云服务器,并发送所述网络请求至所述边缘云服务器中的动态加速路由调度引擎,以通过所述边缘云服务器对所述网络请求进行调度。If the preliminary processing result of the request is a legal result, the corresponding edge cloud server is determined according to the network environment information of the client, and the network request is sent to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server. 根据权利要求6所述的方法,其中,所述解析所述网络请求中确定所述网络请求对应的请求类型,包括:The method according to claim 6, wherein the parsing of the network request to determine the request type corresponding to the network request comprises: 获取所述网络请求中的请求头;Obtaining a request header in the network request; 解析所述请求头得到所述请求头所包含的字段内容,得到请求标识;Parsing the request header to obtain the field content contained in the request header and obtain a request identifier; 获取所述请求标识对应的请求类型。Get the request type corresponding to the request identifier. 一种用于CDN的网络请求调度装置,所述装置部署于应用于配置有可信执行环境的边缘云服务器中的动态加速路由调度引擎;所述装置包括:A network request scheduling device for CDN, wherein the device is deployed in a dynamic acceleration routing scheduling engine applied to an edge cloud server configured with a trusted execution environment; the device comprises: 获取模块,用于获取动态加速网关发送的网络请求,所述网络请求是所述动态加速网关对来自于客户端的网络请求进行安全检查,并在安全检查通过后发送的;An acquisition module, configured to acquire a network request sent by a dynamic acceleration gateway, wherein the network request is a network request from a client that is subjected to a security check by the dynamic acceleration gateway and is sent after passing the security check; 调度模块,用于在所述可信执行环境中,按照预设调度策略,将所述网络请求转发至多个预设应用服务器中的目标应用服务器;A scheduling module, configured to forward the network request to a target application server among a plurality of preset application servers in the trusted execution environment according to a preset scheduling policy; 响应模块,用于接收所述目标应用服务器对所述网络请求的响应结果,以及用于将所述响应结果转发至所述客户端。The response module is used to receive the response result of the target application server to the network request, and to forward the response result to the client. 一种用于CDN的网络请求调度装置,所述装置应用于边缘云服务器中的动态加速网关,包括:A network request scheduling device for CDN, the device being applied to a dynamic acceleration gateway in an edge cloud server, comprising: 接收模块,用于获取客户端发送的网络请求;Receiving module, used to obtain the network request sent by the client; 解析模块,用于解析所述网络请求中确定所述网络请求对应的请求类型,查询所述请求类型对应的安全检查策略;A parsing module, configured to parse the network request to determine a request type corresponding to the network request, and query a security check policy corresponding to the request type; 检查模块,用于利用所述安全检查策略对所述网络请求所携带的请求内容进行安全检查,得到请求初步处理结果,The inspection module is used to perform a security inspection on the request content carried by the network request using the security inspection strategy to obtain a preliminary processing result of the request. 发送模块,用于若所述请求初步处理结果为合法结果,则根据所述客户端的网络环境信息确定相应的边缘云服务器,并发送所述网络请求至所述边缘云服务器中的动态加速路由调度引擎,以通过所述边缘云服务器对所述网络请求进行调度。A sending module is used to determine the corresponding edge cloud server based on the network environment information of the client if the preliminary processing result of the request is a legal result, and send the network request to the dynamic acceleration routing scheduling engine in the edge cloud server to schedule the network request through the edge cloud server. 一种计算机设备,包括:A computer device comprising: 存储器和处理器,所述存储器和所述处理器之间互相通信连接,所述存储器中存储有计算机指令,所述处理器通过执行所述计算机指令,从而执行权利要求1至7中任一项所述的用于CDN的网络请求调度方法。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 network request scheduling method for CDN according to any one of claims 1 to 7 by executing the computer instructions. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令用于使计算机执行权利要求1至7中任一项所述的用于CDN的网络请求调度方法。A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are used to enable a computer to execute the network request scheduling method for CDN according to any one of claims 1 to 7.
PCT/CN2025/077667 2024-03-21 2025-02-17 Network request scheduling method and apparatus for cdn, and device and medium Pending WO2025195082A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410330069.4A CN117938962B (en) 2024-03-21 2024-03-21 Network request scheduling method, device, equipment and medium for CDN
CN202410330069.4 2024-03-21

Publications (1)

Publication Number Publication Date
WO2025195082A1 true WO2025195082A1 (en) 2025-09-25

Family

ID=90751106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2025/077667 Pending WO2025195082A1 (en) 2024-03-21 2025-02-17 Network request scheduling method and apparatus for cdn, and device and medium

Country Status (2)

Country Link
CN (1) CN117938962B (en)
WO (1) WO2025195082A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117938962B (en) * 2024-03-21 2024-07-05 北京火山引擎科技有限公司 Network request scheduling method, device, equipment and medium for CDN
CN118432896A (en) * 2024-05-09 2024-08-02 浪潮云信息技术股份公司 CDN declaration type protection control method and system based on edge cloud computing
CN119210905B (en) * 2024-11-26 2025-03-11 北京火山引擎科技有限公司 Security protection method, device, equipment, medium and product of content distribution network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413000A (en) * 2017-08-15 2019-03-01 吴波 A kind of anti-stealing link method and door chain gateway system
CN112104752A (en) * 2020-11-12 2020-12-18 上海七牛信息技术有限公司 Hot spot balancing method and system for cache nodes of content distribution network
CN114338659A (en) * 2020-09-25 2022-04-12 英特尔公司 Intelligent data forwarding in edge networks
US20230362016A1 (en) * 2023-07-19 2023-11-09 Intel Corporation Secure application computing environment in a federated edge cloud
CN117938962A (en) * 2024-03-21 2024-04-26 北京火山引擎科技有限公司 Network request scheduling method, device, equipment and medium for CDN

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413000A (en) * 2017-08-15 2019-03-01 吴波 A kind of anti-stealing link method and door chain gateway system
CN114338659A (en) * 2020-09-25 2022-04-12 英特尔公司 Intelligent data forwarding in edge networks
CN112104752A (en) * 2020-11-12 2020-12-18 上海七牛信息技术有限公司 Hot spot balancing method and system for cache nodes of content distribution network
US20230362016A1 (en) * 2023-07-19 2023-11-09 Intel Corporation Secure application computing environment in a federated edge cloud
CN117938962A (en) * 2024-03-21 2024-04-26 北京火山引擎科技有限公司 Network request scheduling method, device, equipment and medium for CDN

Also Published As

Publication number Publication date
CN117938962A (en) 2024-04-26
CN117938962B (en) 2024-07-05

Similar Documents

Publication Publication Date Title
US12177241B2 (en) Methods, systems, and devices for dynamically modeling and grouping endpoints for edge networking
US10965716B2 (en) Hostname validation and policy evasion prevention
US20220210173A1 (en) Contextual zero trust network access (ztna) based on dynamic security posture insights
US8713665B2 (en) Systems, methods, and media for firewall control via remote system information
JP6553524B2 (en) System and method for utilizing a dedicated computer security service
US11792194B2 (en) Microsegmentation for serverless computing
US9838356B2 (en) Encrypted peer-to-peer detection
CN117938962B (en) Network request scheduling method, device, equipment and medium for CDN
US20220201041A1 (en) Administrative policy override in microsegmentation
EP4035329B1 (en) Network cyber-security platform
US8548998B2 (en) Methods and systems for securing and protecting repositories and directories
JP2010026547A (en) Firewall load balancing method and firewall load balancing system
US11784993B2 (en) Cross site request forgery (CSRF) protection for web browsers
US8272043B2 (en) Firewall control system
CN111295640B (en) Fine-grained firewall policy enforcement using session App ID and endpoint process ID correlation
Oktivasari et al. Analysis of effectiveness of iptables on web server from slowloris attack
CN117938961B (en) Network request scheduling method, device, cluster and medium based on edge server
RU2601162C1 (en) Method of using dedicated computer security service
WO2012163587A1 (en) Distributed access control across the network firewalls
CN119382990B (en) Web application access proxy method and device in heterogeneous network environment
WO2025134208A1 (en) Access management system, access management method and program
CN120034346A (en) Message transmission method and device
CN118916124A (en) Application program interface safety protection method and device and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 25772791

Country of ref document: EP

Kind code of ref document: A1