CN114025023B - Source returning method, device, equipment and computer readable storage medium - Google Patents

Source returning method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114025023B
CN114025023B CN202210000549.5A CN202210000549A CN114025023B CN 114025023 B CN114025023 B CN 114025023B CN 202210000549 A CN202210000549 A CN 202210000549A CN 114025023 B CN114025023 B CN 114025023B
Authority
CN
China
Prior art keywords
node
target
resource request
target node
resource
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.)
Active
Application number
CN202210000549.5A
Other languages
Chinese (zh)
Other versions
CN114025023A (en
Inventor
蒲文宾
年彦东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210000549.5A priority Critical patent/CN114025023B/en
Publication of CN114025023A publication Critical patent/CN114025023A/en
Application granted granted Critical
Publication of CN114025023B publication Critical patent/CN114025023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a method, an apparatus, a device and a computer readable storage medium for returning a source. The source returning method comprises the following steps: receiving a resource request sent by a client through a first target node in a content distribution network; if the target resource corresponding to the resource request is not cached in the first target node, determining a second target node in the content distribution network based on a first preset rule, wherein the second target node comprises a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and edge service logic and middle layer service logic are deployed in the virtual middle layer node; forwarding the resource request to the second target node; and acquiring the target resource corresponding to the resource request through the second target node. The utilization rate of the physical edge nodes is improved.

Description

Source returning method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for returning a source.
Background
A Content Delivery Network (CDN) is an intelligent virtual Network built on top of an existing Network, which includes edge servers deployed in various locations. In addition, the network enables a user to acquire needed resources nearby through functional modules such as load balancing, content distribution and scheduling, network congestion is reduced, and response speed and hit rate of resource requests are improved.
In order to increase the cache hit rate of the resource request and reduce the back-sourcing rate, a three-layer CDN architecture as shown in fig. 1 is usually adopted for back-sourcing. Wherein, only the edge node 110 can directly access the resource request sent from the client, and the middle node 120 cannot directly access the resource request sent from the client, resulting in a lower utilization rate of the middle node 120.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a back source method, apparatus, device, and computer-readable storage medium to improve utilization of a physical edge node.
In a first aspect, an embodiment of the present disclosure provides a source returning method, including:
receiving a resource request sent by a client through a first target node in a content distribution network;
if the target resource corresponding to the resource request is not cached in the first target node, determining a second target node in the content distribution network based on a first preset rule, wherein the second target node comprises a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and edge service logic and middle layer service logic are deployed in the virtual middle layer node;
forwarding the resource request to the second target node;
and acquiring the target resource corresponding to the resource request through the second target node.
Optionally, the first target node and the second target node are the same node.
Optionally, the first target node is a physical edge node in a content distribution network;
edge service logic is deployed in the physical edge nodes.
Optionally, a middle layer service logic is further deployed in the physical edge node.
Optionally, the first target node is a virtual edge node obtained by sinking a physical middle-layer node to an edge in a content distribution network;
a middle layer service logic and an edge service logic are deployed in the first target node.
Optionally, the obtaining, by the second target node, a target resource corresponding to the resource request includes:
if the target resource corresponding to the resource request is not cached in the second target node, determining an upper node in a content distribution network based on a second preset rule;
forwarding the resource request to the upper node;
and acquiring the target resource corresponding to the resource request through the upper node.
Optionally, the obtaining, by the upper node, a target resource corresponding to the resource request includes:
if the target resource corresponding to the resource request is cached in the upper node, the target resource is sent to the client;
and if the target resource corresponding to the resource request is not cached in the upper node, acquiring the target resource from a source station corresponding to the resource request through the upper node.
Optionally, the method further includes:
when an instruction for refreshing the cache record is received, refreshing the cache record of the upper node;
refreshing the cache record of the first identifier stored in the first target node and the cache record of the second identifier stored in the second target node;
refreshing the cache record of the second identifier stored in the first target node and the cache record of the first identifier stored in the second target node;
the method comprises the steps that a first target node and a second target node respectively cache two records aiming at the same target resource, and the identifications of the two records are the first identification and the second identification.
Optionally, before receiving, by the first target node in the content distribution network, the resource request sent by the client, the method further includes:
analyzing the resource request through a preset node associated with a client to determine whether a domain name corresponding to the resource request meets a preset condition;
and if the domain name meets the preset condition, executing the operation of receiving the resource request sent by the client through the first target node in the content distribution network.
Optionally, the determining a second target node based on the first preset rule includes:
determining a target scheduling policy corresponding to the resource request from one or more pre-stored scheduling policies through the first target node, where the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to the second target node.
In a second aspect, an embodiment of the present disclosure provides a source returning device, including:
the receiving module is used for receiving a resource request sent by a client through a first target node in a content distribution network;
a determining module, configured to determine, based on a first preset rule, a second target node in the content distribution network if a target resource corresponding to the resource request is not cached in the first target node, where the second target node includes a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and an edge service logic and a middle layer service logic are deployed in the virtual middle layer node;
a forwarding module, configured to forward the resource request to the second target node;
and the acquisition module is used for acquiring the target resource corresponding to the resource request through the second target node.
In a third aspect, an embodiment of the present disclosure provides a back source device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the method of the first aspect.
The source returning method, the device, the equipment and the computer readable storage medium provided by the embodiments of the present disclosure multiplex the physical edge node in the CDN as the virtual middle layer node, that is, additionally deploy middle layer service logic in the physical edge node, so that the physical edge node has the ability to serve the middle layer, improve the utilization rate of the physical edge node, and thereby reduce the cost of the CDN. Specifically, a resource request sent by a client is received through a first target node in a content distribution network; if the target resource corresponding to the resource request is not cached in the first target node, determining a second target node in the content distribution network based on a first preset rule, wherein the second target node comprises a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and edge service logic and middle layer service logic are deployed in the virtual middle layer node; forwarding the resource request to the second target node; and acquiring the target resource corresponding to the resource request through the second target node.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic diagram of a three-tier CDN architecture before improvement provided by an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for returning a source according to an embodiment of the disclosure;
fig. 3 is a schematic diagram of an application scenario provided by the embodiment of the present disclosure;
FIG. 4 is a flow chart of a method for returning a source according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of an improved three-tier CDN architecture according to an embodiment of the present disclosure;
FIG. 6 is a flow chart of a method for returning a source according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a back source device according to an embodiment of the disclosure;
fig. 8 is a schematic structural diagram of a back source device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Typically, in a CDN network, a three-tier CDN architecture is employed as shown in fig. 1. In this case, the edge node 110 can directly access the resource request sent from the client, but the edge node 110 cannot return to the source, resulting in a low utilization rate of the edge node 110. The specific processing flow is as follows: a resource request sent by a client reaches the edge node 111, and if a target resource corresponding to the resource request is cached in the edge node 111, the edge node 111 directly feeds the target resource back to the client; if the target resource corresponding to the resource request is not cached in the edge node 111, the edge node 111 forwards the resource request to the middle node 120, and if the target resource corresponding to the resource request is cached in the middle node 120, the middle node 120 sends the target resource to the edge node 111, and the edge node 111 feeds the target resource back to the client. If the target resource corresponding to the resource request is not cached in the middle layer node 120, the middle layer node 120 forwards the resource request to the upper layer node 130, if the target resource corresponding to the resource request is not cached in the upper layer node 130, the upper layer node 130 acquires the target resource corresponding to the resource request from the source station 140 and sends the target resource to the middle layer node 120, the middle layer node 120 sends the target resource to the edge node 111, and the edge node 111 finally feeds the target resource back to the client.
As can be seen from the above processing flow, the edge node 110 does not have the capability of returning to the source, so that the utilization rate of the edge node 110 is low.
It should be noted that the middle layer node in the existing CDN (e.g., the middle layer node 120 in fig. 1) is labeled as the physical middle layer node in the embodiment of the present disclosure, and the edge node in the existing CDN (e.g., the edge node 110 or the edge node 111 in fig. 1) is labeled as the physical edge node in the embodiment of the present disclosure. Only middle-layer service logic is deployed in a physical middle-layer node in the existing CDN to provide middle-layer service; in an existing CDN, only an edge service logic is deployed in a physical edge node, and is used for serving a netizen, specifically, for obtaining a resource request from a client. Obviously, the physical edge node does not have the capability to provide mid-tier services, e.g., cannot go back to source, etc. Correspondingly, the physical middle-layer node does not have the capability of directly serving the netizen, namely the physical middle-layer node cannot directly obtain the resource request from the client.
In view of the foregoing problems, embodiments of the present disclosure provide a method for returning a source, which is described below with reference to specific embodiments.
Fig. 2 is a flowchart of a source returning method provided in the embodiment of the present disclosure. The method comprises the following specific steps:
s201, receiving a resource request sent by a client through a first target node in a content distribution network.
As shown in fig. 3, the client may be an application or a module in the terminal device 21, or the client may be the terminal device 21 itself. In particular, the client may send a resource request to the first target node 22, the resource request requesting a target resource.
S202, if the target resource corresponding to the resource request is not cached in the first target node, determining a second target node in the content distribution network based on a first preset rule, where the second target node includes a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and an edge service logic and a middle layer service logic are deployed in the virtual middle layer node.
In some embodiments, the first target node is a physical edge node in the CDN; edge service logic is deployed in the physical edge nodes. Furthermore, a middle-layer service logic can be deployed in the physical edge node, so that the physical edge node has the middle-layer service capability, and the utilization rate of the physical edge node is improved. Specifically, the physical edge node is multiplexed into a virtual middle-layer node, and the virtual middle-layer node has two service capabilities, one is the capability of the service middle layer and the other is the capability of the service edge, so that the purpose of improving the utilization rate of the physical edge node can be achieved.
In other embodiments, the first target node is a virtual edge node obtained by sinking a physical middle layer node in the CDN to an edge; a middle layer service logic and an edge service logic are deployed in the first target node. By sinking the physical middle level node into the virtual edge node, the utilization rate of the physical middle level node can be improved. In other words, the virtual edge node is additionally deployed with the edge service logic in addition to the middle layer service logic, so that the virtual edge node has the capability of directly serving the netizen, that is, has the capability of accessing the resource request sent by the client. The virtual edge node has two service capabilities, one is the capability of the service middle layer, and the other is the capability of the service edge, namely the capability of accessing a resource request sent by a client, so that the purpose of improving the utilization rate of the physical middle layer node can be achieved.
Similarly, the second target node includes a virtual middle layer node obtained by multiplexing a physical edge node in the CDN, and an edge service logic and a middle layer service logic are deployed in the virtual middle layer node. The virtual middle layer node has two roles, one is the role of the edge node, and the other is the role of the middle layer node, thereby achieving the purpose of improving the utilization rate of the physical edge node.
In summary, in the scheme of the embodiment of the present disclosure, a physical edge node in a CDN is multiplexed into a virtual middle layer node, and on the basis of maintaining an edge service logic, a middle layer service logic is additionally deployed, so that the physical edge node has two roles, one is to serve as an edge node, and the other is to serve as a middle layer node, thereby improving the utilization rate of the physical edge node.
The first preset rule may be a physical topological relationship between the first target node and other nodes, that is, according to the physical topological relationship, the resource request is forwarded from the first target node to a node communicatively connected to the first target node, that is, a second target node.
The first preset rule may also be one or more scheduling policies pre-stored in the first target node. Specifically, the determining the second target node based on the first preset rule includes:
determining a target scheduling policy corresponding to the resource request from one or more pre-stored scheduling policies through the first target node, where the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to the second target node. The scheduling policy is pre-stored in the first target node, which is beneficial to improving the response speed of the resource request, and if the scheduling policy is not pre-stored in the first target node, the first target node needs to request the scheduling policy from the scheduling server in which the scheduling policy is stored, and then can schedule the resource request, obviously, a certain delay exists, which is not beneficial to improving the response speed of the resource request.
It is to be understood that the second target node may be a physical middle level node in the CDN; a middle tier service logic is deployed in the second target node. Further, an edge service logic may be deployed in the second target node, so that the physical middle layer node corresponding to the second target node also has two roles, one is serving as an edge node, and the other is serving as a middle layer node, thereby improving the utilization rate of the physical middle layer node.
It can be understood that, if a target resource corresponding to the resource request has been cached in the first target node, the target resource is directly fed back to the client through the first target node.
S203, forwarding the resource request to the second target node.
And S204, acquiring the target resource corresponding to the resource request through the second target node.
In the source returning method provided by this embodiment, the physical edge node in the CDN is multiplexed into the virtual middle layer node, that is, the middle layer service logic is additionally deployed in the physical edge node, so that the physical edge node has the ability to serve the middle layer, and the utilization rate of the physical edge node is improved.
Illustratively, the second target node is a virtual middle layer node obtained by multiplexing a physical edge node in the CDN, and the virtual middle layer node is deployed with an edge service logic and a middle layer service logic. On this basis, the first target node and the second target node may be the same node. Specifically, the resource request may be accessed through a first port of a first target node, and when the target resource is not cached in the first target node, the resource request is forwarded to a second target node through a second port of the first target node. In summary, the port used by the transmission resource request can distinguish that the resource request comes from the edge node (including the physical edge node and the virtual edge node) and needs to be transferred to the middle layer node (including the physical middle layer node and the virtual middle layer node)
If the first target node and the second target node are the same node, which is equivalent to that the same resource request accesses the same node twice through different ports, when the first target node does not cache the target resource, the resource request accessed through the first port is a resource request which needs to be forwarded to other middle-layer nodes, and the resource request accessed through the second port is a resource request which needs to be forwarded to an upper-layer node (corresponding to a three-layer CDN, as shown in fig. 1, the middle-layer node forwards the resource request to the upper-layer node, and the upper-layer node obtains the target resource from the source station).
On the basis of the foregoing embodiment, taking a three-tier CDN as an example, an optional implementation is given to the step "S204, obtaining, by the second target node, a target resource corresponding to the resource request". A flow chart of a method of returning a source is shown in fig. 4. The method comprises the following specific steps:
s401, receiving a resource request sent by a client through a first target node in a content distribution network.
S402, if the target resource corresponding to the resource request is not cached in the first target node, determining a second target node in the content distribution network based on a first preset rule, wherein the second target node comprises a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and edge service logic and middle layer service logic are deployed in the virtual middle layer node.
S403, forwarding the resource request to the second target node.
S404, if the target resource corresponding to the resource request is not cached in the second target node, determining an upper node in the content distribution network based on a second preset rule.
The second preset rule is similar to the first preset rule, and the second preset rule may be a physical topological relation between the second target node and an upper node, that is, the resource request is sent from the second target node to the upper node in communication connection with the second target node according to the physical topological relation.
The second preset rule may also be one or more scheduling policies pre-stored in a second target node, and specifically, the determining an upper node in the content distribution network based on the second preset rule includes: and the second target node determines a target scheduling policy corresponding to the resource request from one or more pre-stored scheduling policies, wherein the target scheduling policy comprises a uniform resource locator, and the uniform resource locator points to the upper node. The scheduling policy is pre-stored in the second target node, which is beneficial to improving the response speed of the resource request, and if the scheduling policy is not pre-stored in the second target node, the second target node needs to request the scheduling policy from the scheduling server in which the scheduling policy is stored, and then can schedule the resource request, obviously, a certain delay exists, which is not beneficial to improving the response speed of the resource request.
S405, forwarding the resource request to the upper node, and acquiring a target resource corresponding to the resource request through the upper node.
Specifically, for the three-tier CDN shown in fig. 1, the physical edge node 110 does not have the capability of serving the middle tier or the capability of returning to the source, which results in a low utilization rate of the physical edge node 110. To solve this problem, in the scheme of this embodiment, the physical edge node 110 is multiplexed as a virtual middle layer node, and the middle layer service logic is additionally deployed in the physical edge node 110 in addition to the original edge service logic of the physical edge node 110, so that the physical edge node 110 can have both the service function of the edge node and the service function of the middle layer node, thereby improving the utilization rate of the physical edge node.
A CDN schematic diagram after improvement of the three-tier CDN shown in fig. 1 according to the technical solution of this embodiment may be shown in fig. 5, where the CDN schematic diagram includes a physical edge node 510, a physical middle-tier node 520, an upper-tier node 530, and a source station 540, where the physical edge node 510 may serve as a virtual middle-tier node to communicate with the upper-tier node 530, that is, a resource request is directly forwarded to the upper-tier node 530, so as to improve a utilization rate of the physical edge node.
In some embodiments, the obtaining, by the upper node, a target resource corresponding to the resource request includes: if the target resource corresponding to the resource request is cached in the upper node, the target resource is sent to the client; and if the target resource corresponding to the resource request is not cached in the upper node, acquiring the target resource from a source station corresponding to the resource request through the upper node.
In this embodiment, taking a three-layer CDN as an example, an optional implementation is given to the step "S204, obtaining, by the second target node, a target resource corresponding to the resource request", specifically, if the target resource corresponding to the resource request is not cached in the second target node, determining an upper node in a content delivery network based on a second preset rule; forwarding the resource request to the upper node; and acquiring the target resource corresponding to the resource request through the upper node.
On the basis of the technical solutions of the above embodiments, in order to improve a refresh effect (a cache of a CDN node in the CDN is refreshed according to a preset period to ensure that resources fed back to a user are correct and newer), and avoid a problem that the refresh cannot be performed, two records are respectively cached in the first target node and the second target node for the same target resource, where the identifiers of the two records are the first identifier and the second identifier, respectively. This is because each node has two roles, there being one matching cache record for each role. For example, when the physical middle layer node acts as a middle layer node for requesting a target resource from an upper layer node, the physical middle layer node CACHEs the target resource returned by the upper layer node, and marks an identifier of a CACHE record corresponding to the target resource as CACHE-KEY (i.e., a first identifier). When the physical middle layer node acts as an edge node for accessing a resource request sent by the client, the physical middle layer node also CACHEs a target resource, and marks an identifier of a CACHE record corresponding to the target resource as CACHE-KEY & virtual (i.e. a second identifier, which may be understood as an identifier of a CACHE record corresponding to the virtual edge node).
Similarly, the physical edge node also has two roles, one is the role of the edge node, and the other is the role of the middle layer node, so that two same target resources are cached in the physical edge node, one corresponds to the role of the edge node, the other corresponds to the role of the middle layer node, the identifier of the cache record corresponding to the role of the edge node is marked as a first identifier, and the identifier of the cache record corresponding to the role of the middle layer node is marked as a second identifier (which can be understood as the identifier of the cache record corresponding to the virtual middle layer node). When an instruction for refreshing cache records is received, the cache records of the upper node are refreshed; and refreshing the cache record of the first identifier stored in the first target node and the cache record of the second identifier stored in the second target node, namely refreshing the cache records serving as middle-layer nodes. And finally, refreshing the cache record which serves as the role of the edge node, specifically, refreshing the cache record of the second identifier stored in the first target node and the cache record of the first identifier stored in the second target node.
Optionally, for the second-tier CDN, the obtaining, by the second target node, the target resource corresponding to the resource request includes: if the target resource corresponding to the resource request is cached in the second target node, sending the target resource to the client; if the target resource corresponding to the resource request is not cached in the second target node, the target resource is acquired from the source station corresponding to the resource request through the second target node, that is, the second target node may directly acquire the target resource from the source station.
On the basis of the above embodiment, the present embodiment continuously optimizes the scheme, specifically, it is supported whether the scheme in the above embodiment is used by the resource request according to the domain name granularity configuration, that is, whether the middle layer node sinking to the edge serving as the edge node is used as the virtual edge node, and whether the edge node serving as the middle layer node is used as the virtual middle layer node. The above functions are collectively referred to as virtual functions (i.e., virtual middle level nodes and virtual edge nodes), and a flow chart of the back-source method is shown in fig. 6. The method comprises the following specific steps:
s601, analyzing the resource request sent by the client through a preset node associated with the client to determine whether the domain name corresponding to the resource request meets the preset condition.
It is understood that the CDN network serves users, which are not internet users (i.e., netizens), who refer to developers of websites, i.e., users who provide network resources to netizens. Therefore, different users have different service requirements, the service that the middle layer node sinks as the edge node can be individually started or closed for the users according to the specific requirements of the users, and the edge node serves as the service of the virtual middle layer node.
Specifically, a resource request sent by a client is analyzed through a preset node associated with the client to determine whether a domain name corresponding to the resource request is a domain name for starting a virtual function, and if so, the CDN is used to serve the resource request as shown in fig. 5. If the domain name for which the resource request is directed does not belong to the domain name for opening the virtual function, the CDN shown in fig. 1 is used to service the resource request.
S602, if the domain name meets the preset condition, receiving the operation of the resource request sent by the client through a first target node in the content distribution network.
S603, if the target resource corresponding to the resource request is not cached in the first target node, determining a second target node in the content distribution network based on a first preset rule, wherein the second target node comprises a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and edge service logic and middle layer service logic are deployed in the virtual middle layer node.
S604, forwarding the resource request to the second target node.
S605, obtaining the target resource corresponding to the resource request through the second target node.
The technical solution of this embodiment supports a user to configure whether to start a virtual function according to domain name granularity, and if the domain name of the resource request belongs to the domain name for starting the virtual function, the CDN shown in fig. 5 is used to serve the resource request. If the domain name targeted by the resource request does not belong to the domain name for opening the virtual function, the CDN shown in fig. 1 is used to serve the resource request.
Fig. 7 is a schematic structural diagram of a back source device according to an embodiment of the disclosure. The source returning device provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the source returning method, as shown in fig. 7, the source returning device 700 includes: a receiving module 710, a determining module 720, a forwarding module 730, and an obtaining module 740.
The receiving module 710 is configured to receive, by a first target node in a content distribution network, a resource request sent by a client; a determining module 720, configured to determine, based on a first preset rule, a second target node in the content distribution network if a target resource corresponding to the resource request is not cached in the first target node, where the second target node includes a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and an edge service logic and a middle layer service logic are deployed in the virtual middle layer node; a forwarding module 730, configured to forward the resource request to the second target node; an obtaining module 740, configured to obtain, by the second target node, a target resource corresponding to the resource request.
Optionally, the first target node and the second target node are the same node.
Optionally, the first target node is a physical edge node in a content distribution network; edge service logic is deployed in the physical edge nodes. Optionally, a middle layer service logic is further deployed in the physical edge node.
Optionally, the first target node is a virtual edge node obtained by sinking a physical middle-layer node to an edge in a content distribution network; a middle layer service logic and an edge service logic are deployed in the first target node.
Optionally, the obtaining module 740 includes: a determining unit, configured to determine, based on a second preset rule, an upper node in a content delivery network if a target resource corresponding to the resource request is not cached in the second target node; a forwarding unit, configured to forward the resource request to the upper node; a first obtaining unit, configured to obtain, by the upper node, a target resource corresponding to the resource request.
Optionally, the first obtaining unit includes: a sending subunit, configured to send a target resource corresponding to the resource request to the client if the target resource is cached in the upper node; an obtaining subunit, configured to obtain, by the upper node, the target resource from the source station corresponding to the resource request if the target resource corresponding to the resource request is not cached in the upper node.
Optionally, two records are cached in the first target node and the second target node for the same target resource, and the identifiers of the two records are the first identifier and the second identifier, respectively. The device further comprises: the refreshing module is used for refreshing the cache record of the upper node when receiving a command of refreshing the cache record; refreshing the cache record of the first identifier stored in the first target node and the cache record of the second identifier stored in the second target node; and refreshing the cache records of the second identifier stored in the first target node and the first identifier stored in the second target node.
Optionally, the source returning device 700 further includes: the judging module is used for analyzing the resource request through a preset node associated with the client before the resource request sent by the client is received through a first target node in the content distribution network so as to determine whether a domain name corresponding to the resource request meets a preset condition or not; and if the domain name meets the preset condition, executing the operation of receiving the resource request sent by the client through the first target node in the content distribution network.
Optionally, the determining module 720 is specifically configured to: determining a target scheduling policy corresponding to the resource request from one or more pre-stored scheduling policies through the first target node, where the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to the second target node.
In the source returning device provided in this embodiment, the physical edge node in the CDN is multiplexed into the virtual middle layer node, that is, the middle layer service logic is additionally deployed in the physical edge node, so that the physical edge node has a service middle layer or source returning capability, and the utilization rate of the physical edge node is improved.
The source returning device in the embodiment shown in fig. 7 can be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of a back source device according to an embodiment of the present disclosure. As shown in fig. 8, the back-source device 150 includes: memory 151, processor 152, computer programs, and communications interface 153; wherein the computer program is stored in the memory 151 and is configured to be executed by the processor 152 for the back-to-source method as described above.
In addition, the embodiment of the present disclosure also provides a computer readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the source returning method described in the above embodiment.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A method of feed back, the method comprising:
receiving a resource request sent by a client through a first target node in a content distribution network;
if the target resource corresponding to the resource request is not cached in the first target node, determining a second target node in the content distribution network based on a first preset rule, wherein the second target node comprises a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and edge service logic and middle layer service logic are deployed in the virtual middle layer node;
forwarding the resource request to the second target node;
and acquiring the target resource corresponding to the resource request through the second target node.
2. The method of claim 1, wherein the first target node and the second target node are the same node.
3. The method of claim 1, wherein the first target node is a physical edge node in a content distribution network;
edge service logic is deployed in the physical edge nodes.
4. The method of claim 3, wherein a middle tier service logic is also deployed in the physical edge node.
5. The method of claim 1, wherein the first target node is a virtual edge node obtained by sinking a physical middle layer node to an edge in a content distribution network;
a middle layer service logic and an edge service logic are deployed in the first target node.
6. The method of claim 5, wherein the obtaining, by the second target node, the target resource corresponding to the resource request comprises:
if the target resource corresponding to the resource request is not cached in the second target node, determining an upper node in a content distribution network based on a second preset rule;
forwarding the resource request to the upper node;
and acquiring target resources corresponding to the resource request through the upper node.
7. The method according to claim 6, wherein the obtaining, by the upper node, the target resource corresponding to the resource request comprises:
if the target resource corresponding to the resource request is cached in the upper node, the target resource is sent to the client;
and if the target resource corresponding to the resource request is not cached in the upper node, acquiring the target resource from a source station corresponding to the resource request through the upper node.
8. The method of claim 6, further comprising:
when an instruction for refreshing the cache record is received, refreshing the cache record of the upper node;
refreshing the cache record of the first identifier stored in the first target node and the cache record of the second identifier stored in the second target node;
refreshing the cache record of the second identifier stored in the first target node and the cache record of the first identifier stored in the second target node;
the method comprises the steps that a first target node and a second target node respectively cache two records aiming at the same target resource, and the identifications of the two records are the first identification and the second identification.
9. The method of claim 1, wherein before receiving, by the first target node in the content distribution network, the resource request sent by the client, the method further comprises:
analyzing the resource request through a preset node associated with a client to determine whether a domain name corresponding to the resource request meets a preset condition;
and if the domain name meets the preset condition, executing the operation of receiving the resource request sent by the client through the first target node in the content distribution network.
10. The method according to any one of claims 1 to 9, wherein the determining the second target node based on the first preset rule comprises:
determining a target scheduling policy corresponding to the resource request from one or more pre-stored scheduling policies through the first target node, where the target scheduling policy includes a uniform resource locator, and the uniform resource locator points to the second target node.
11. A feed back device, comprising:
the receiving module is used for receiving a resource request sent by a client through a first target node in a content distribution network;
a determining module, configured to determine, based on a first preset rule, a second target node in the content distribution network if a target resource corresponding to the resource request is not cached in the first target node, where the second target node includes a virtual middle layer node obtained by multiplexing a physical edge node in the content distribution network, and an edge service logic and a middle layer service logic are deployed in the virtual middle layer node;
a forwarding module, configured to forward the resource request to the second target node;
and the acquisition module is used for acquiring the target resource corresponding to the resource request through the second target node.
12. A feed-back device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-10.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202210000549.5A 2022-01-04 2022-01-04 Source returning method, device, equipment and computer readable storage medium Active CN114025023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210000549.5A CN114025023B (en) 2022-01-04 2022-01-04 Source returning method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210000549.5A CN114025023B (en) 2022-01-04 2022-01-04 Source returning method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114025023A CN114025023A (en) 2022-02-08
CN114025023B true CN114025023B (en) 2022-05-10

Family

ID=80069540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210000549.5A Active CN114025023B (en) 2022-01-04 2022-01-04 Source returning method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114025023B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785794A (en) * 2022-03-29 2022-07-22 北京字节跳动网络技术有限公司 Resource allocation method, device, equipment, medium, program product and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110875947A (en) * 2018-09-03 2020-03-10 阿里巴巴集团控股有限公司 Data processing method and edge node equipment
CN112153160A (en) * 2020-09-30 2020-12-29 北京金山云网络技术有限公司 Access request processing method and device and electronic equipment
WO2021135835A1 (en) * 2019-12-31 2021-07-08 北京金山云网络技术有限公司 Resource acquisition method and apparatus, and node device in cdn network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110875947A (en) * 2018-09-03 2020-03-10 阿里巴巴集团控股有限公司 Data processing method and edge node equipment
WO2021135835A1 (en) * 2019-12-31 2021-07-08 北京金山云网络技术有限公司 Resource acquisition method and apparatus, and node device in cdn network
CN112153160A (en) * 2020-09-30 2020-12-29 北京金山云网络技术有限公司 Access request processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN114025023A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
US10374955B2 (en) Managing network computing components utilizing request routing
US9160703B2 (en) Request routing management based on network components
US9794242B2 (en) Method, apparatus and application platform for realizing logon to an application service website
CN115442423A (en) Method for discovering services provided by a network repository function
US8577992B1 (en) Request routing management based on network components
CN101540759B (en) Method for acquiring address of service server and communication system
CN109151009B (en) CDN node distribution method and system based on MEC
WO2009124011A2 (en) Content management
CN110830565B (en) Resource downloading method, device, system, electronic equipment and storage medium
US11350267B2 (en) Method of obtaining user subscription data pertaining to a subscriber in a telecommunication network
US8028089B2 (en) On-deck detection for a web site
CN111327668B (en) Network management method, device, equipment and storage medium
CN109672698B (en) Content distribution method, device and system
WO2017012475A1 (en) Data acquisition method and device
US20140344901A1 (en) Method And System For Sharing A File
US20150249636A1 (en) Resource download method, service server and cellular phone client
CN114025023B (en) Source returning method, device, equipment and computer readable storage medium
CN114006915B (en) Resource request method, device, equipment and computer readable storage medium
CN108494870B (en) CDN-based dynamic data loading method and device
WO2012000455A1 (en) Client terminal and load balancing method
CN107770203B (en) Service request forwarding method, device and system
US20170195426A1 (en) Maintaining session across plural providing devices
RU2447613C2 (en) Method for service processing, communication system and associated device
CN102497402B (en) Content injection method and system thereof, and content delivery method and system thereof
CN103118115B (en) Facing cloud calculates virtual machine management method and the device of user

Legal Events

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