Request processing method and device, electronic equipment and readable medium

By detecting whether the resource access request records the corresponding backend real server in the direct-connected server, and directly forwarding the request, the problem of low efficiency in the resource access request processing in the content distribution network is solved, and the processing efficiency is improved.

CN119814883APending Publication Date: 2025-04-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411770677.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the content distribution network, a large number of resource access requests need to search for the backend real server through preset scheduling algorithms, resulting in high pressure for direct connection server processing and reducing the processing efficiency of resource access requests.

Method used

In the direct connection server, obtain the resource access request and detect whether the corresponding backend real server is recorded in the request. If recorded, the request is forwarded directly to the backend real server to avoid searching through the preset scheduling algorithm.

Benefits of technology

By directly forwarding resource access requests, the analysis and scheduling burden of directly connected servers is reduced, and the processing efficiency of resource access requests is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814883A_ABST
    Figure CN119814883A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a request processing method and device, electronic equipment and a readable medium. The method comprises the following steps: acquiring a resource access request; detecting whether a rear-end real server corresponding to the resource access request is recorded in the resource access request or not; and if the back-end real server corresponding to the resource access request is recorded in the resource access request, forwarding the resource access request to the back-end real server corresponding to the resource access request. Therefore, for part of the resource access requests, the back-end real servers corresponding to the resource access requests can be directly determined without searching proper back-end real servers through the direct connection server, and the resource access requests are directly forwarded to the back-end real servers, so that the processing efficiency of the resource access requests is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a request processing method, a request processing device, an electronic device and a computer-readable medium. Background Art

[0002] Content Delivery Network (CDN) is a widely used network architecture that distributes content to server nodes around the world, allowing users to obtain content from the server closest to them, thereby reducing latency and increasing access speed.

[0003] Generally speaking, when it is necessary to obtain content through a content distribution network, a resource access request can usually be sent to the virtual server network address (Virtual IP Address, VIP) corresponding to the content distribution network to access the direct server (Director Server, DS). Then, based on the preset scheduling algorithm, a suitable backend real server (RS) is selected from the backend real servers, and the resource access request is forwarded to the backend real server. However, a large number of resource access requests need to find the backend real server through the preset scheduling algorithm, which may cause a large processing pressure on the direct server and reduce the processing efficiency of resource access requests. Summary of the invention

[0004] The embodiment of the present invention provides a request processing method, device, electronic device and computer-readable storage medium to improve the processing efficiency of resource access requests.

[0005] An embodiment of the present invention discloses a request processing method, which is applied to a direct-connection server, wherein the direct-connection server is deployed in a content distribution network, and the content distribution network further includes at least one back-end real server in communication with the direct-connection server; the method includes:

[0006] Get resource access request;

[0007] Detecting whether the resource access request records a backend real server corresponding to the resource access request;

[0008] If the resource access request records the backend real server corresponding to the resource access request, the resource access request is forwarded to the backend real server corresponding to the resource access request.

[0009] Optionally, the step of detecting whether the resource access request records a backend real server corresponding to the resource access request includes:

[0010] Detecting whether the resource access request contains server identification information corresponding to the backend real server;

[0011] If the resource access request records the server identification information corresponding to the backend real server, it is determined that the resource access request records the backend real server corresponding to the resource access request.

[0012] Optionally, if the resource access request records a backend real server corresponding to the resource access request, the step of forwarding the resource access request to the backend real server corresponding to the resource access request includes:

[0013] If the resource access request records a backend real server corresponding to the resource access request, determining the access address of the backend real server according to a preset backend real server mapping table and server identification information corresponding to the backend real server;

[0014] The resource access request is forwarded to the backend real server corresponding to the resource access request using the access address of the backend real server.

[0015] Optionally, the method further comprises:

[0016] The operation information of the back-end real server in the content distribution network is obtained regularly through the preset client.

[0017] Optionally, the operation information of the backend real server includes server identification information corresponding to the backend real server and resource storage logic of the backend real server;

[0018] Before the step of obtaining a resource access request, the method further includes:

[0019] The client determines the backend real server corresponding to the resource access request based on the resource storage logic of the backend real server, and writes the server identification information of the backend real server corresponding to the resource access request into the server access request.

[0020] Optionally, the method further comprises:

[0021] If the backend real server corresponding to the resource access request is inaccessible, deleting information associated with the backend real server in a preset backend real server mapping table;

[0022] The load balancing plug-in in the directly connected server is called to re-determine the back-end real server corresponding to the resource access request.

[0023] Optionally, the method further comprises:

[0024] If the resource access request does not record the backend real server corresponding to the resource access request, call the load balancing plug-in in the directly connected server to determine the backend real server corresponding to the resource access request.

[0025] An embodiment of the present invention further provides a request processing device, which is applied to a direct-connection server, wherein the direct-connection server is deployed in a content distribution network, and the content distribution network further includes at least one back-end real server in communication with the direct-connection server; the device includes:

[0026] A request acquisition module is used to obtain resource access requests;

[0027] A request detection module, used to detect whether the resource access request records a backend real server corresponding to the resource access request;

[0028] The request forwarding module is used to forward the resource access request to the backend real server corresponding to the resource access request if the resource access request records the backend real server corresponding to the resource access request.

[0029] Optionally, the request detection module includes:

[0030] The identification detection submodule is used to detect whether the resource access request contains server identification information corresponding to the backend real server;

[0031] The identification determination submodule is used to determine that the resource access request contains the backend real server corresponding to the resource access request if the resource access request contains the server identification information corresponding to the backend real server.

[0032] Optionally, the request forwarding module includes:

[0033] An access address determination submodule, used to determine the access address of the backend real server according to a preset backend real server mapping table and server identification information corresponding to the backend real server if the backend real server corresponding to the resource access request is recorded in the resource access request;

[0034] The request forwarding submodule is used to adopt the access address of the backend real server to forward the resource access request to the backend real server corresponding to the resource access request.

[0035] Optionally, the device further comprises:

[0036] The operation information collection module is used to periodically obtain the operation information of the back-end real server in the content distribution network through a preset client.

[0037] Optionally, the operation information of the backend real server includes server identification information corresponding to the backend real server and resource storage logic of the backend real server;

[0038] Before the step of obtaining a resource access request, the device further includes:

[0039] The identification writing module is used to determine the backend real server corresponding to the resource access request based on the resource storage logic of the backend real server through the client, and write the server identification information of the backend real server corresponding to the resource access request into the server access request.

[0040] Optionally, the device further comprises:

[0041] An information deletion module, configured to delete information associated with the backend real server in a preset backend real server mapping table if the backend real server corresponding to the resource access request is inaccessible;

[0042] The reallocation module is used to call the load balancing plug-in in the directly connected server to redetermine the back-end real server corresponding to the resource access request.

[0043] Optionally, the device further comprises:

[0044] The server determination module is used to call the load balancing plug-in in the directly connected server to determine the backend real server corresponding to the resource access request if the backend real server corresponding to the resource access request is not recorded in the resource access request.

[0045] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0046] The memory is used to store computer programs;

[0047] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0048] The embodiment of the present invention further discloses one or more computer-readable media on which instructions are stored. When executed by one or more processors, the processors are enabled to execute the method described in the embodiment of the present invention.

[0049] The embodiments of the present invention include the following advantages:

[0050] Through the request processing method provided by the embodiment of the present invention, a resource access request is obtained; it is detected whether the resource access request records the backend real server corresponding to the resource access request; if the resource access request records the backend real server corresponding to the resource access request, the resource access request is forwarded to the backend real server corresponding to the resource access request. Therefore, for some resource access requests, it is not necessary to search for a suitable backend real server through a directly connected server, but the corresponding backend real server can be directly determined, and the resource access request can be directly forwarded to the backend real server, which effectively improves the processing efficiency of resource access requests. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a flowchart of a request processing method provided in an embodiment of the present invention;

[0052] Figure 2 is a flowchart of a request processing method provided in an embodiment of the present invention;

[0053] Figure 3 is a structural block diagram of a request processing device provided in an embodiment of the present invention;

[0054] Figure 4 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0055] Figure 5 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0057] Reference Figure 1 , showing a step flow chart of a request processing method provided in an embodiment of the present invention, which is applied to a direct-connected server, wherein the direct-connected server is deployed in a content distribution network, and the content distribution network also includes at least one back-end real server that is communicatively connected to the direct-connected server.

[0058] In the embodiment of the present invention, the content distribution network may include a direct server (Director Server, DS) and a backend real server (real server, RS).

[0059] The directly connected server may be a server that directly provides services to users, and may be provided with a load balancing plug-in. When receiving a resource access request sent by a user, the load balancing plug-in may be used to allocate a suitable backend real server to the user.

[0060] The backend real server can be a physical server that stores and provides service-related data, which can be located in the data center of the content distribution network. Users cannot access it directly, but need to forward the request to the backend real server through the direct connection server for processing.

[0061] The method may specifically include the following steps:

[0062] Step 101, obtaining a resource access request;

[0063] A user can access a content distribution network through a client to obtain the resources he needs, thereby the user can generate a resource access request through the client and send it to the real server. The resource access request can be used to obtain the resources the user needs from the content distribution network.

[0064] In a specific implementation, the client can send a resource access request to a virtual server network address (Virtual IP Address, VIP) corresponding to the content distribution network to access a direct server (Director Server, DS), thereby completing the sending of the resource access request.

[0065] Step 102, detecting whether the resource access request records a backend real server corresponding to the resource access request;

[0066] In the embodiment of the present invention, in some special scenarios, the user may know the backend real server where the resource he needs is located. In this case, the direct connection server does not need to analyze the resource access request, but can directly determine the backend real server to which the resource access request needs to be forwarded.

[0067] In the case where the user is already aware of the backend real server where the resource he needs is located, he can directly write information related to the backend real server corresponding to the resource access request into the resource access request.

[0068] Therefore, for a directly connected server, before analyzing a resource access request, it can first detect whether the resource access request records the backend real server corresponding to the resource access request to determine whether the resource access request knows the backend real server and whether the resource access request needs to be analyzed.

[0069] Step 103: If the resource access request records the backend real server corresponding to the resource access request, forward the resource access request to the backend real server corresponding to the resource access request.

[0070] In the case where the backend real server corresponding to the resource access request is recorded in the resource access request, it can be considered that the resource access request is from the backend real server where the resource is known. In this case, there is no need to analyze the resource access request, but the resource access request can be directly forwarded to the backend real server corresponding to the resource access request, thereby reducing the time required for the direct-connected server to analyze the resource access request and improving the processing efficiency of the resource access request. At the same time, for the direct-connected server, the burden of analyzing the resource access request can also be reduced to a certain extent.

[0071] Through the request processing method provided by the embodiment of the present invention, a resource access request is obtained; it is detected whether the resource access request records the backend real server corresponding to the resource access request; if the resource access request records the backend real server corresponding to the resource access request, the resource access request is forwarded to the backend real server corresponding to the resource access request. Therefore, for some resource access requests, it is not necessary to search for a suitable backend real server through a directly connected server, but the corresponding backend real server can be directly determined, and the resource access request can be directly forwarded to the backend real server, which effectively improves the processing efficiency of resource access requests.

[0072] In an embodiment of the present invention, the step of detecting whether the resource access request records the backend real server corresponding to the resource access request includes:

[0073] S11, detecting whether the resource access request contains server identification information corresponding to the backend real server;

[0074] In a specific implementation, server identification information can be set for the backend real servers in advance to mark the backend real servers. The client can obtain the server identification information corresponding to the backend real servers in advance, and when the backend real server corresponding to the resource access request is determined, the server identification information can be written into the resource access request. At the same time, it can also avoid the direct retention of the access address of the backend real server, which affects the security of the content distribution network.

[0075] Specifically, the resource access request may be information based on TCP (Transmission Control Protocol). The TCP header may be provided with an optional field, and the server identification information may be written into the optional field of the TCP header.

[0076] Thereafter, the direct connection server may detect whether the resource access request contains server identification information corresponding to the backend real server, so as to determine whether the resource access request needs to be analyzed.

[0077] S12: If the resource access request records server identification information corresponding to the backend real server, determine that the resource access request records the backend real server corresponding to the resource access request.

[0078] If the resource access request records the server identification information corresponding to the backend real server, then it can be considered that the resource access request is the backend real server where the known resource is located. In this case, there is no need to analyze the resource access request, but the backend real server corresponding to the resource access request recorded in the resource access request can be determined directly based on the server identification information corresponding to the backend real server.

[0079] In an embodiment of the present invention, if the resource access request records the backend real server corresponding to the resource access request, the step of forwarding the resource access request to the backend real server corresponding to the resource access request includes:

[0080] S21, if the resource access request records the backend real server corresponding to the resource access request, determine the access address of the backend real server according to a preset backend real server mapping table and the server identification information corresponding to the backend real server;

[0081] Specifically, a backend real server mapping table may be stored in the direct connection server, in which the server identification information corresponding to the backend real server and the association relationship between the access address may be recorded. Therefore, when the backend real server corresponding to the resource access request is recorded in the resource access request, and the backend real server where the resource is located is determined, the access address of the backend real server can be found according to the backend real server mapping table and the server identification information corresponding to the backend real server recorded in the resource access request.

[0082] S22: Use the access address of the backend real server to forward the resource access request to the backend real server corresponding to the resource access request.

[0083] Thereafter, the access address of the backend real server may be used, and the directly connected server may directly forward the resource access request to the access address, thereby forwarding the resource access request to its corresponding backend real server.

[0084] In one embodiment of the present invention, the method further comprises:

[0085] S31, regularly obtaining the operation information of the backend real server in the content distribution network through a preset client.

[0086] In an embodiment of the present invention, in order to directly determine the backend real server corresponding to the resource access request, thereby reducing the time spent by the direct-connected server to analyze the resource access request and improving the processing efficiency of the resource access request, a preset period can be used to obtain the operating information of the backend real server in the content distribution network.

[0087] The operation information may include server identification information corresponding to the backend real server and the resource storage logic of the backend real server. The server identification information may be used to directly write the server identification information into the resource access request when the backend real server is determined, so that the directly connected server can identify the backend real server to which the resource access request needs to be forwarded. The resource storage logic of the backend real server may be a logical way for the content distribution network to allocate resource storage. When the resources to be obtained are known, it may be determined on which backend real servers the content distribution network stores the resources based on the resource storage logic.

[0088] In an embodiment of the present invention, before the step of obtaining a resource access request, the method further includes:

[0089] S41, determining, by the client based on the resource storage logic of the backend real server, the backend real server corresponding to the resource access request, and writing the server identification information of the backend real server corresponding to the resource access request into the server access request.

[0090] In a specific implementation, when a client needs to obtain resources through a content distribution network, the client can first determine, based on the resource storage logic of the acquired backend real server, on which backend real servers in the content distribution network the resources currently required by the client are currently stored. Thus, the client can directly determine the backend real server it needs to access, and directly write the server identification information of the backend real server in the resource access request.

[0091] In one embodiment of the present invention, the method further comprises:

[0092] S51, if the backend real server corresponding to the resource access request is inaccessible, deleting information associated with the backend real server in a preset backend real server mapping table;

[0093] Specifically, if the backend real server corresponding to the resource access request is inaccessible, it can be considered that the backend real server has failed or the response has timed out. In order to avoid the direct connection server repeatedly attempting to forward the resource access request to the abnormal backend real server, resulting in the client being unable to obtain data normally, the information associated with the backend real server can be deleted from the backend real server mapping table.

[0094] In this case, if the directly connected server receives a resource access request, and the resource access request records the server identification information corresponding to the abnormal backend real server, at this time, since the access address of the backend real server corresponding to the server identification information is not found in the backend real server mapping table, the directly connected server can consider that the server identification information corresponding to the backend real server recorded in the resource access request is an error message, and ignore the server identification information.

[0095] In a specific implementation, the directly connected server can periodically send heartbeat detection packets to each backend real server to regularly detect whether the backend real server is operating normally. If a backend real server fails or responds in timeout, the information associated with the backend real server can be deleted from the backend real server mapping table.

[0096] S52, calling the load balancing plug-in in the directly connected server to re-determine the backend real server corresponding to the resource access request.

[0097] After the direct-connection server ignores the server identification information recorded in the resource access request, the direct-connection server can call its preset load balancing plug-in and re-determine the back-end real server that can provide the corresponding resource for the resource access request based on the load balancing scheduling algorithm.

[0098] In one embodiment of the present invention, the method further comprises:

[0099] S61, if the resource access request does not record the backend real server corresponding to the resource access request, call the load balancing plug-in in the directly connected server to determine the backend real server corresponding to the resource access request.

[0100] Specifically, if the resource access request does not record the backend real server corresponding to the resource access request, then it can be considered that the resource access request has not determined the backend real server where the required resources are located. In this case, the direct connection server can call its preset load balancing plug-in to find the backend real server that can provide corresponding resources for the resource access request for the client based on the load balancing scheduling algorithm.

[0101] As a specific example of the present invention, Figure 2 1 is a flowchart of a request processing method provided in an embodiment of the present invention. The method comprises:

[0102] Step 1: Backend real server mapping table configuration, that is, the configuration of the hash table on the load balancing server.

[0103] The administrator of the directly connected server pre-configures the backend real server mapping table through a configuration interface (such as a command line, a Web interface, or an API) to map the identification information (such as an ID, a name) of the backend real server to its real access address (IP address and port number).

[0104] Step 2: Generate client request.

[0105] The client application adds detection logic to regularly obtain the backend real server information of the server cluster, including the backend real server identification information, content distribution network resource storage logic, etc. The client kernel adds a system call to support setting the backend real server identification information on the socket. After setting the backend real server identification information, the backend real server identification information will be added to the tcp header optional field when sending a tcp connection. When the client application sends a request, it first simulates the backend real server storage logic to calculate which backend real server the resource will be stored on. Then the corresponding backend real server identification information is generated, and the backend real server identification information is recorded on the socket through the kernel's new system call. The client application calls the tcp connection system call. Since the backend real server identification information is set for the corresponding socket, the kernel will mark the backend real server identification information RS-C when sending the corresponding resource access request in the form of a tcp data packet.

[0106] Step 3: Request reception and analysis

[0107] The direct connection server adds a backend real server identification information parsing function, and adds a mapping relationship table between the backend real server identification information and the access address of the backend real server. The direct connection server receives a resource access request from a client, and parses the backend real server identification information in the resource access request.

[0108] The backend real server identification information in the resource access request is specified by the client according to business requirements and is used to instruct the direct connection server to which backend real server to forward the request.

[0109] Step 4: Backend real server scheduling

[0110] The directly connected server searches the backend real server mapping table for the corresponding access address, ie, the real IP address and port number, according to the backend real server identification information obtained by parsing.

[0111] If a matching backend real server is found, the direct-connection server forwards the request to the backend real server for processing; if no matching backend real server is found, the direct-connection server can process the request according to a preset default policy or error handling mechanism.

[0112] Step 5: Backend real server health detection and failover

[0113] The directly connected server periodically sends heartbeat detection packets to each backend real server to detect the health status of the backend real server.

[0114] If a backend real server fails or times out, the direct connection server removes it from the backend real server mapping table and forwards subsequent requests to other normal backend real servers.

[0115] The present invention realizes efficient, safe and reliable request scheduling in a content distribution network through a back-end real server mapping mechanism in a direct-connected server. Specifically, the technical solution has the following beneficial effects:

[0116] Efficiency: The fast lookup of the backend real server mapping table is achieved through efficient data structures such as hash tables, which improves the efficiency of request scheduling. By specifying the backend real server access, the traffic interaction between machines is reduced and the service performance is improved.

[0117] Security: The client or internal node only embeds the identifier of the backend real server in the request without directly exposing the real IP address of the backend real server, thus protecting the security of the backend real server.

[0118] Reliability: Directly connected servers support health detection and failover of backend real servers. When a backend real server fails, it can be automatically removed from the backend real server mapping table to ensure service continuity and stability.

[0119] Intelligence: Through dynamic load balancing strategies, directly connected servers can be intelligently scheduled according to the real-time load conditions of the backend real servers and the characteristics of the requests, achieving efficient use of resources and rapid response to requests.

[0120] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0121] Reference Figure 3, shows a structural block diagram of a request processing device provided in an embodiment of the present invention, which is applied to a direct-connection server, wherein the direct-connection server is deployed in a content distribution network, and the content distribution network also includes at least one back-end real server that is communicatively connected to the direct-connection server; the device may specifically include the following modules:

[0122] A request acquisition module 301 is used to acquire a resource access request;

[0123] A request detection module 302, used to detect whether the resource access request records a backend real server corresponding to the resource access request;

[0124] The request forwarding module 303 is used to forward the resource access request to the backend real server corresponding to the resource access request if the resource access request records the backend real server corresponding to the resource access request.

[0125] Optionally, the request detection module includes:

[0126] The identification detection submodule is used to detect whether the resource access request contains server identification information corresponding to the backend real server;

[0127] The identification determination submodule is used to determine that the resource access request contains the backend real server corresponding to the resource access request if the resource access request contains the server identification information corresponding to the backend real server.

[0128] Optionally, the request forwarding module includes:

[0129] An access address determination submodule, used to determine the access address of the backend real server according to a preset backend real server mapping table and server identification information corresponding to the backend real server if the backend real server corresponding to the resource access request is recorded in the resource access request;

[0130] The request forwarding submodule is used to adopt the access address of the backend real server to forward the resource access request to the backend real server corresponding to the resource access request.

[0131] Optionally, the device further comprises:

[0132] The operation information collection module is used to periodically obtain the operation information of the back-end real server in the content distribution network through a preset client.

[0133] Optionally, the operation information of the backend real server includes server identification information corresponding to the backend real server and resource storage logic of the backend real server;

[0134] Before the step of obtaining a resource access request, the device further includes:

[0135] The identification writing module is used to determine the backend real server corresponding to the resource access request based on the resource storage logic of the backend real server through the client, and write the server identification information of the backend real server corresponding to the resource access request into the server access request.

[0136] Optionally, the device further comprises:

[0137] An information deletion module, configured to delete information associated with the backend real server in a preset backend real server mapping table if the backend real server corresponding to the resource access request is inaccessible;

[0138] The reallocation module is used to call the load balancing plug-in in the directly connected server to redetermine the back-end real server corresponding to the resource access request.

[0139] Optionally, the device further comprises:

[0140] The server determination module is used to call the load balancing plug-in in the directly connected server to determine the backend real server corresponding to the resource access request if the backend real server corresponding to the resource access request is not recorded in the resource access request.

[0141] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0142] Memory 403, used for storing computer programs;

[0143] The processor 401 is used to execute the program stored in the memory 403 to implement the following steps:

[0144] Get resource access request;

[0145] Detecting whether the resource access request records a backend real server corresponding to the resource access request;

[0146] If the resource access request records the backend real server corresponding to the resource access request, the resource access request is forwarded to the backend real server corresponding to the resource access request.

[0147] Optionally, the step of detecting whether the resource access request records a backend real server corresponding to the resource access request includes:

[0148] Detecting whether the resource access request contains server identification information corresponding to the backend real server;

[0149] If the resource access request records the server identification information corresponding to the backend real server, it is determined that the resource access request records the backend real server corresponding to the resource access request.

[0150] Optionally, if the resource access request records a backend real server corresponding to the resource access request, the step of forwarding the resource access request to the backend real server corresponding to the resource access request includes:

[0151] If the resource access request records a backend real server corresponding to the resource access request, determining the access address of the backend real server according to a preset backend real server mapping table and server identification information corresponding to the backend real server;

[0152] The resource access request is forwarded to the backend real server corresponding to the resource access request using the access address of the backend real server.

[0153] Optionally, the method further comprises:

[0154] The operation information of the back-end real server in the content distribution network is obtained regularly through the preset client.

[0155] Optionally, the operation information of the backend real server includes server identification information corresponding to the backend real server and resource storage logic of the backend real server;

[0156] Before the step of obtaining a resource access request, the method further includes:

[0157] The client determines the backend real server corresponding to the resource access request based on the resource storage logic of the backend real server, and writes the server identification information of the backend real server corresponding to the resource access request into the server access request.

[0158] Optionally, the method further comprises:

[0159] If the backend real server corresponding to the resource access request is inaccessible, deleting information associated with the backend real server in a preset backend real server mapping table;

[0160] The load balancing plug-in in the directly connected server is called to re-determine the back-end real server corresponding to the resource access request.

[0161] Optionally, the method further comprises:

[0162] If the resource access request does not record the backend real server corresponding to the resource access request, call the load balancing plug-in in the directly connected server to determine the backend real server corresponding to the resource access request.

[0163] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0164] The communication interface is used for communication between the above terminal and other devices.

[0165] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0166] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0167] like Figure 5 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 501 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the request processing method described in the above embodiment.

[0168] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the request processing method described in the above embodiment.

[0169] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0170] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0171] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A request processing method, characterized in that: The method is applied to a direct-connection server, wherein the direct-connection server is deployed in a content distribution network, and the content distribution network further comprises at least one back-end real server in communication connection with the direct-connection server; the method comprises: Get resource access request; Detecting whether the resource access request records a backend real server corresponding to the resource access request; If the resource access request records the backend real server corresponding to the resource access request, the resource access request is forwarded to the backend real server corresponding to the resource access request.

2. The method according to claim 1, characterized in that The step of detecting whether the resource access request records a backend real server corresponding to the resource access request includes: Detecting whether the resource access request contains server identification information corresponding to the backend real server; If the resource access request records the server identification information corresponding to the backend real server, it is determined that the resource access request records the backend real server corresponding to the resource access request.

3. The method according to claim 2, characterized in that The step of forwarding the resource access request to the backend real server corresponding to the resource access request if the resource access request records the backend real server corresponding to the resource access request comprises: If the resource access request records a backend real server corresponding to the resource access request, determining the access address of the backend real server according to a preset backend real server mapping table and server identification information corresponding to the backend real server; The resource access request is forwarded to the backend real server corresponding to the resource access request using the access address of the backend real server.

4. The method according to claim 1, characterized in that The method further comprises: The operation information of the back-end real server in the content distribution network is obtained regularly through the preset client.

5. The method according to claim 4, characterized in that The operation information of the backend real server includes server identification information corresponding to the backend real server and resource storage logic of the backend real server; Before the step of obtaining a resource access request, the method further includes: The client determines the backend real server corresponding to the resource access request based on the resource storage logic of the backend real server, and writes the server identification information of the backend real server corresponding to the resource access request into the server access request.

6. The method according to claim 1, characterized in that The method further comprises: If the backend real server corresponding to the resource access request is inaccessible, deleting information associated with the backend real server in a preset backend real server mapping table; The load balancing plug-in in the directly connected server is called to re-determine the back-end real server corresponding to the resource access request.

7. The method according to claim 1, characterized in that The method further comprises: If the resource access request does not record the backend real server corresponding to the resource access request, call the load balancing plug-in in the directly connected server to determine the backend real server corresponding to the resource access request.

8. A request processing device, characterized in that: The device is applied to a direct-connection server, wherein the direct-connection server is deployed in a content distribution network, and the content distribution network further comprises at least one back-end real server in communication connection with the direct-connection server; the device comprises: A request acquisition module is used to obtain resource access requests; A request detection module, used to detect whether the resource access request records a backend real server corresponding to the resource access request; The request forwarding module is used to forward the resource access request to the backend real server corresponding to the resource access request if the resource access request records the backend real server corresponding to the resource access request.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Live broadcast video processing method and device

    CN105872572A

  • Method and system for non-aware forward proxy based on http proxy server

    CN106961469A

  • Scheduling method, scheduling server and computer readable storage medium

    CN109995859A

  • Resource access method and device, electronic device and storage medium

    CN110740191A

  • Security heterogeneous system based on reverse proxy mechanism, resource request method and device

    CN116886358A