Method, device, equipment and storage medium for redirecting edge node for client
By calculating the bandwidth ratio and hash value of edge nodes to determine the target edge node, the problem of low client redirection efficiency in existing technologies is solved, and efficient bandwidth resource utilization and data transmission are achieved.
Patent Information
- Application Number
- CN202311753252.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-12-19
AI Technical Summary
Existing technologies do not use intelligent methods to redirect edge nodes, resulting in low redirection efficiency, especially when a large number of users request live stream data, requiring extensive comparisons and thus reducing efficiency.
The peak bandwidth of the target region is determined based on the peak bandwidth of the edge nodes in the target region. The bandwidth ratio of each edge node is calculated, and a preset algorithm is used to calculate the hash value of the data request address of the client requesting data. The target edge node is determined from the edge nodes of the target region based on the hash value and the bandwidth ratio.
It improves the efficiency of client-side redirection to edge nodes, reduces the back-to-origin bandwidth of parent nodes, saves bandwidth resources, and enhances data transmission efficiency and user experience.
Smart Images

Figure CN117675827B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, specifically to the fields of data analysis and data processing, and can be applied to scenarios such as node redirection and node selection. In particular, it relates to a method, apparatus, device, and storage medium for redirecting edge nodes for clients. Background Technology
[0002] In live streaming scenarios, clients can request live stream data from the parent node of an edge node. Clients in different locations can request live stream data through different edge nodes. When multiple edge nodes request live stream data from the parent node, the parent node will generate multiple origin pulls, and each origin pull will be returned to the corresponding edge node.
[0003] In existing technologies, the addresses of edge nodes used by clients can be redirected to reduce the backhaul bandwidth of parent nodes. For example, when a client requests live stream data, the address of the edge node used by that client can be saved. When other clients request the same live stream data, but the edge nodes used by the other clients are different from those used by the client, the addresses of the edge nodes used by the other clients can be redirected to the address of the edge node used by the client.
[0004] However, the above method of redirecting the address of the edge node used by the client is not smart enough and the redirection efficiency is not high enough. Summary of the Invention
[0005] This disclosure provides a method, apparatus, device, and storage medium for redirecting edge nodes to clients, which can save bandwidth resources and improve the efficiency of redirecting edge nodes to clients.
[0006] According to a first aspect of this disclosure, a method for redirecting edge nodes for a client is provided. The method includes: determining the peak bandwidth of the target area based on the peak bandwidth of the edge nodes in the target area, wherein the edge nodes include at least two; determining the bandwidth ratio of each edge node based on the peak bandwidth of the target area and the peak bandwidth of each edge node; calculating the data request address of the client requesting data using a preset algorithm to obtain a hash value of the data request address; and determining a target edge node from the edge nodes in the target area as the edge node for the client requesting data based on the hash value and the bandwidth ratio of each edge node.
[0007] According to a second aspect of this disclosure, an apparatus for redirecting edge nodes for a client is provided, the apparatus comprising: an acquisition unit and a processing unit.
[0008] The acquisition unit is used to determine the peak bandwidth of the target area based on the peak bandwidth of the edge nodes in the target area, wherein the edge nodes include at least two; and to determine the bandwidth ratio of each edge node based on the peak bandwidth of the target area and the peak bandwidth of each edge node.
[0009] The processing unit is used to calculate the data request address of the client requesting data using a preset algorithm to obtain the hash value of the data request address; based on the hash value and the bandwidth ratio of each edge node, it determines a target edge node from the edge nodes of the target area as the edge node for the client requesting data.
[0010] According to a third aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.
[0011] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the method according to the first aspect.
[0012] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method according to the first aspect.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0014] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0015] Figure 1 A flowchart illustrating a method for redirecting edge nodes to a client, provided in an embodiment of this disclosure;
[0016] Figure 2 This is another flowchart illustrating a method for redirecting edge nodes for a client, as provided in an embodiment of this disclosure.
[0017] Figure 3 This is yet another flowchart illustrating a method for redirecting edge nodes to a client, provided in an embodiment of this disclosure.
[0018] Figure 4 This is yet another flowchart illustrating a method for redirecting edge nodes to a client, provided in an embodiment of this disclosure.
[0019] Figure 5 A schematic diagram illustrating the composition of an apparatus for redirecting edge nodes to a client, provided in an embodiment of this disclosure;
[0020] Figure 6 A schematic block diagram of an example electronic device 600 provided for implementation of embodiments of the present disclosure. Detailed Implementation
[0021] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0022] It should be understood that in the embodiments of this disclosure, the character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.
[0023] In live streaming scenarios, clients can request live stream data from the parent node of an edge node. Clients in different locations can request live stream data through different edge nodes. When multiple edge nodes request live stream data from the parent node, the parent node will generate multiple origin pulls, and each origin pull will be returned to the corresponding edge node.
[0024] For example, in a live streaming scenario, the broadcaster can upload the generated live stream data to the streaming media center. The streaming media center can then send the live stream data to the parent node of the edge node. The parent node of the edge node can then send the live stream data to the client through the edge node. After receiving the live stream data, the client can parse and display the live stream data.
[0025] Alternatively, the parent node of an edge node can also be called a parent node, central node, parent content delivery network (CDN), parent server, etc. An edge node can also be called an edge CDN, edge server, edge server cluster, etc.
[0026] For example, when a user watches a live stream through a client, the client can send a Hypertext Transfer Protocol (HTTP) request to the Uniform Resource Locator (URL) of a domain name. The client can then use the Domain Name System (DNS) to resolve the DNS and obtain the Internet Protocol (IP) address of the server that the domain name points to, and send an HTTP request to that IP address.
[0027] In existing technologies, the addresses of edge nodes used by clients can be redirected to reduce the backhaul bandwidth of parent nodes. For example, when a client requests live stream data, the address of the edge node used by that client can be saved. When other clients request the same live stream data, but the edge nodes used by the other clients are different from those used by the client, the addresses of the edge nodes used by the other clients can be redirected to the address of the edge node used by the client.
[0028] For example, in a live streaming scenario, the process of redirecting the address of the edge node used by other clients to the address of the edge node used by this client can also be called a live 302.
[0029] However, the above method of redirecting the address of the edge node used by the client is not smart enough and the redirection efficiency is not high enough.
[0030] For example, the process of redirecting the address of the edge node used by other clients to the address of the edge node used by the current client requires comparing the edge nodes used by other clients with the edge nodes used by the current client one by one. When there are a large number of user requests for live stream data, the number of comparisons required will be very large. Therefore, the method of redirecting the address of the edge node used by the client in the above-mentioned prior art is inefficient.
[0031] Against this background, this disclosure provides a method for redirecting edge nodes to clients, which can save bandwidth resources and improve the efficiency of redirecting edge nodes to clients.
[0032] For example, the execution entity of this method for redirecting edge nodes to clients can be a computer or server, or it can be other devices with data processing capabilities. There are no restrictions on the execution entity of this method.
[0033] In some embodiments, the server can be a single server, or it can be a server cluster consisting of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. This disclosure does not limit the specific implementation of the server.
[0034] Figure 1 This is a flowchart illustrating a method for redirecting edge nodes to a client, as provided in an embodiment of this disclosure. Figure 1 As shown, the method may include steps S101-S104.
[0035] S101. Determine the peak bandwidth of the target area based on the peak bandwidth of the edge nodes in the target area. The edge nodes include at least two.
[0036] For example, the target area can be divided according to preset division rules, such as the geographical location of the target area (e.g., Northeast, Northwest, North China, East China, South China, Southwest, etc.); or, it can be divided according to network bandwidth factors. Edge nodes in the target area can be determined based on the existence of edge nodes in the target area, or they can be set in the target area according to actual conditions. There are no specific restrictions on the method of determining edge nodes in the target area. The peak bandwidth of the edge nodes can be determined according to a preset peak bandwidth determination method, or it can be set by the user according to actual conditions. There are no specific restrictions on the specific value of the peak bandwidth of the edge nodes in the target area; it can be set or updated according to actual conditions. The method of determining the peak bandwidth of the target area based on the peak bandwidth of the edge nodes in the target area can be by summing the peak bandwidths of the edge nodes in the target area or by weighted summation based on the peak bandwidths of the edge nodes in the target area. There are no specific restrictions on the method of determining the peak bandwidth of the target area based on the peak bandwidth of the edge nodes in the target area, as long as the peak bandwidth of the target area is determined based on the peak bandwidth of the edge nodes in the target area.
[0037] Optionally, the information of the edge node may also include operator information and protocol information used by the edge node. For example, the operator of edge node A can be a mobile operator and the protocol information used is Internet Protocol version 4 (IPv4); or it can be a China Unicom operator and the protocol information used can be Internet Protocol version 6 (IPv6). There are no restrictions here.
[0038] For example, based on the geographical location of the target area, the target area can be region A. Region A can include two edge nodes: edge node A, whose peak bandwidth can be 50GB; and edge node B, whose peak bandwidth can be 150GB. The peak bandwidth of the target area determined by edge node A and edge node B can be 200GB.
[0039] S102. Determine the bandwidth ratio of each edge node based on the peak bandwidth of the target area and the peak bandwidth of each edge node.
[0040] For example, the bandwidth ratio of each edge node can be determined based on the ratio of the peak bandwidth of each edge node to the peak bandwidth of the target area, or it can be determined based on the ratio of the peak bandwidth of each edge node multiplied by the corresponding weight information to the peak bandwidth of the target area. There are no specific restrictions on the method of determining the bandwidth ratio of each edge node.
[0041] For example, consider determining the bandwidth ratio of each edge node based on the ratio of its peak bandwidth to the peak bandwidth of the target region. Edge node A might have a peak bandwidth of 50GB, edge node B might have a peak bandwidth of 150GB, and the target region's peak bandwidth, determined based on edge nodes A and B, might be 200GB. Therefore, the determined bandwidth ratio for edge node A could be 25%, and for edge node B, 75%.
[0042] S103. Calculate the data request address of the client requesting data using a preset algorithm to obtain the hash value of the data request address.
[0043] For example, the preset algorithm can be a Cyclic Redundancy Check (CRC) algorithm, a hash function (Fowler-Noll-Vo, FNV-1) algorithm, or a derivative algorithm of the hash function (Fowler-Noll-Vo-A, FNV-1A), etc. No specific restrictions are placed on the preset algorithm here. The data request address for the client requesting data can be the address of the live stream room that the user watching the live stream wants to request.
[0044] For example, the data request address for a client requesting data can be address A. Calculating the hash value of address A using the CRC algorithm yields a hash value of 45864168.
[0045] S104. Based on the hash value and the bandwidth ratio of each edge node, determine a target edge node from the edge nodes of the target area as the edge node for the client to request data.
[0046] For example, the method of determining a target edge node as the edge node for client data requests from the edge nodes of the target area based on the hash value and the bandwidth ratio of each edge node can be as follows: First, divide the hash value by a preset threshold to obtain the remainder, and then determine the target edge node based on the remainder and the ratio of each edge node. Alternatively, the hash value can be analyzed directly, and the target edge node can be determined based on the analysis results. For example, the preset threshold can be 100 or 1000, and the specific value of the preset threshold can be set according to the actual situation. Dividing the hash value by the preset threshold to obtain the remainder allows the determination of the target edge node based on the size of the remainder and the bandwidth ratio of each edge node. For example, the edge node with the bandwidth ratio closest to the remainder can be selected as the target edge node. Alternatively, the edge nodes can be sorted according to their bandwidth, and the bandwidth ratios of the top K edge nodes in the sorting result can be added together. When the sum of the bandwidth ratios is greater than or equal to the remainder for the first time, the Kth edge node can be selected as the target node.
[0047] For example, the preset threshold can be 100, the hash value can be 45864168, the remainder obtained by dividing the hash value by the preset threshold can be 68, the bandwidth ratio of edge node A can be 25%, and the bandwidth ratio of edge node B can be 75%. Taking the method of selecting the edge node with the bandwidth ratio closest to the remainder as the target edge node as an example, the determined target edge node can be edge node B.
[0048] For example, the preset threshold can be 100, the hash value can be 45864168, the remainder obtained by dividing the hash value by the preset threshold can be 68, the bandwidth ratio of edge node A can be 25%, and the bandwidth ratio of edge node B can be 75%. Taking the method of sorting edge nodes according to their bandwidth, adding the bandwidth ratios of the top K edge nodes in the sorted result, and selecting the Kth edge node as the target node when the sum of the bandwidth ratios is first greater than or equal to the remainder as an example, sorting the edge nodes in ascending order would result in: edge node A, edge node B. When the sum of the bandwidth ratios is first greater than or equal to the remainder, the value of K can be 2, and the determined target edge node can be edge node B.
[0049] This disclosure determines the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region. Based on the peak bandwidth of the target region and the peak bandwidth of each edge node, the bandwidth ratio of each edge node is determined. A preset algorithm is used to calculate the hash value of the data request address for the client requesting data. A hash value uniquely representing the data request address can be obtained from the data request address. Based on the hash value and the bandwidth ratio of each edge node, a target edge node is determined from the edge nodes in the target region as the edge node for the client requesting data. The target edge node can be quickly and accurately determined based on the hash value corresponding to the data request address, thereby redirecting clients with the same data request address to the target edge node for data transmission. This reduces the back-to-origin bandwidth of the parent node, saves bandwidth resources, and improves the efficiency of redirecting edge nodes for clients.
[0050] In some embodiments, the target area includes at least two sub-regions, the client is located in the first sub-region, and the data request address of the client requesting data is directed to the edge node in the first sub-region.
[0051] For example, the data request address of a client requesting data being directed to an edge node in the first sub-zone can refer to the process by which the DNS server of the first sub-zone can direct the data request address of the client requesting data to an edge node in the first sub-zone when the client is located in the first sub-zone and requests data.
[0052] For example, the target area can include two sub-regions, namely sub-region A and sub-region B. The client can be located in sub-region A. When the client requests data, the data request address will be directed by the DNS server of sub-region A to the edge node of sub-region A.
[0053] In this embodiment, the target area includes at least two sub-areas. The client is located in the first sub-area. The data request address of the client is directed to the edge node of the first sub-area. By directing the data request address to the edge node of the sub-area where the client is located, the data transmission efficiency can be improved, the data transmission latency can be reduced, and the user experience when requesting data can be improved.
[0054] In some embodiments, Figure 1 Before step S101, the method for redirecting edge nodes for the client may further include: determining the edge nodes in the target area based on the edge nodes in the sub-area.
[0055] For example, the target region may include at least two sub-regions. The edge nodes in the target region may be determined based on the edge nodes in the sub-regions.
[0056] For example, the target region can be region 1, which can include sub-region 1, sub-region 2, and sub-region 3. Sub-region 1 can include edge node 1 and edge node 2, sub-region 2 can include edge node 3, and sub-region 3 can include edge node 4 and edge node 5. Based on the edge nodes in the sub-regions, the edge nodes in the target region can be edge node 1, edge node 2, edge node 3, edge node 4, and edge node 5.
[0057] This embodiment determines the edge nodes in the target area based on the edge nodes in the sub-regions, which can improve the accuracy and efficiency of edge nodes in the target area, reduce the bandwidth requirements and costs of the target area, and improve the stability and security of the system.
[0058] In some embodiments, Figure 1 Before step S101, when different sub-regions contain the same edge node, the method for redirecting edge nodes for the client may further include: merging different sub-regions into the same target region.
[0059] For example, the target region can be region 1 and region 2. Region 1 can include sub-region 1 and sub-region 2. Sub-region 1 can include edge node 1 and edge node 2, and sub-region 2 can include edge node 3. Region 2 can include sub-region 3, and sub-region 3 can include edge node 1 and edge node 5. Sub-region 1 in region 1 includes edge node 1, and sub-region 3 in region 2 includes edge node 1. Different sub-regions contain the same edge node, so sub-region 1 and sub-region 3 can be merged into the same target region (which can be region 1 or region 2).
[0060] In this embodiment, when different sub-regions contain the same edge nodes, the different sub-regions are merged into the same target region. This allows for the accurate identification of edge nodes in the target region when different sub-regions contain the same edge nodes, thereby improving the accuracy and efficiency of edge nodes in the target region, reducing the bandwidth requirements and costs of the target region, and enhancing the stability and security of the system.
[0061] In some embodiments, Figure 1 Before step S101, when the geographical locations of different sub-regions are less than a preset distance threshold, the method for redirecting edge nodes for the client may further include: merging different sub-regions into the same target region.
[0062] For example, the size of the preset distance threshold can be set according to the actual situation, and no specific restrictions are imposed here.
[0063] Optionally, when the geographical locations of different sub-regions are equal to a preset distance threshold, the different sub-regions can be merged into the same target region, or they can not be merged into the same target region. There are no specific restrictions here, and the settings can be made according to the actual situation.
[0064] For example, the preset distance threshold can be 500KM, the target area can be area 1 and area 2, area 1 can include sub-area 1, area 2 can include sub-area 2, the geographical distance between sub-area 1 and sub-area 2 is 400KM, and sub-area 1 and sub-area 2 can be merged into the same target area (it can be area 1 or area 2, no specific restriction is made here).
[0065] In this embodiment, when the geographical locations of different sub-regions are less than a preset distance threshold, the different sub-regions are merged into the same target region. This allows for the accurate identification of edge nodes in the target region when the geographical locations of different sub-regions are less than the preset threshold, thereby improving the accuracy and efficiency of edge nodes in the target region, reducing the bandwidth requirements and costs of the target region, and enhancing the stability and security of the system.
[0066] Figure 2 This is another flowchart illustrating a method for redirecting edge nodes to a client, provided as an embodiment of this disclosure. For example... Figure 2 As shown, in Figure 1 Before step S101, the method for redirecting edge nodes for the client may also include steps S201-S202.
[0067] S201. Obtain the available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth for each edge node.
[0068] S202. The bandwidth of each edge node is the one with the smallest difference from the preset bandwidth threshold among the available bandwidth of the edge node, the bandwidth supported by the remaining processor, and the bandwidth supported by the remaining memory.
[0069] For example, the available bandwidth of an edge node can refer to the bandwidth that the edge node can currently use for data transmission when performing data transmission. The remaining processor-supported bandwidth of an edge node can refer to the maximum data processing and transmission bandwidth that the node can currently withstand. The remaining memory-supported bandwidth of an edge node can refer to the maximum bandwidth that the edge node's currently available memory resources can withstand to support data transmission and processing.
[0070] Optionally, the preset bandwidth threshold can be set according to the actual situation, and no specific restrictions are imposed here.
[0071] For example, the preset bandwidth threshold can be 100GB, the available bandwidth of the edge node can be 50GB, the remaining processor-supported bandwidth can be 90GB, and the remaining memory-supported bandwidth can be 60GB. Therefore, the remaining processor-supported bandwidth of the edge node can be used as the peak bandwidth of the edge node.
[0072] In this embodiment, by obtaining the available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth of each edge node, and taking the bandwidth with the smallest difference from the preset bandwidth threshold among the available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth of the edge node as the peak bandwidth of each edge node, the resources and scheduling of the edge nodes can be optimized, and the resources of the edge nodes can be allocated reasonably.
[0073] Figure 3 This is yet another flowchart illustrating a method for redirecting edge nodes to a client, provided as an embodiment of this disclosure. For example... Figure 3 As shown, Figure 1 Step S104 may also include steps S301-S302.
[0074] S301. Sort the edge nodes according to the bandwidth ratio of each edge node.
[0075] S302. Based on the hash value and sorting result, determine a target edge node from the edge nodes of the target area as the edge node for the client to request data.
[0076] For example, edge nodes can be sorted according to their bandwidth ratio. The sorting can be done in ascending or descending order; no specific restriction is placed here. Taking ascending order as an example, the bandwidth ratios of the first K edge nodes in the sorted list can be added together. When the sum of the bandwidth ratios is greater than or equal to the remainder for the first time, the Kth edge node is selected as the target edge node. The method of determining a target edge node from the edge nodes of the target region as the edge node for client data requests based on the hash value and the bandwidth ratio of each edge node can be as follows: first, divide the hash value by a preset threshold to obtain the remainder, and then determine the target edge node based on the remainder and the ratio of each edge node; or, the hash value can be directly analyzed, and the target edge node can be determined based on the analysis results.
[0077] For example, consider the method of determining a target edge node from the edge nodes of a target region as the edge node for client data requests, based on the hash value and the bandwidth ratio of each edge node. This involves first dividing the hash value by a preset threshold to obtain the remainder, and then determining the target edge node based on the remainder and the ratio of each edge node. For instance, the remainder obtained by dividing the hash value by the preset threshold might be 88, the bandwidth ratio of edge node A might be 25%, and the bandwidth ratio of edge node B might be 75%. The resulting sorting result could be: Edge node A, Edge node B. Sorting the edge nodes in ascending order, when the sum of the bandwidth ratios first exceeds or equals the remainder, the value of K can be 2, and the determined target edge node can be edge node B.
[0078] This embodiment sorts edge nodes according to their bandwidth ratio and, based on the hash value and sorting results, identifies a target edge node from the edge nodes in the target area as the edge node for client data requests. This allows for a more accurate assessment of the bandwidth contribution of each edge node, identification of the target edge node that meets the requirements, more precise calculation of the load on each edge node, optimization of data transmission efficiency, and improved utilization of edge nodes.
[0079] Figure 4 This is yet another flowchart illustrating a method for redirecting edge nodes to a client, provided as an embodiment of this disclosure. For example... Figure 4 As shown, the method for redirecting edge nodes for clients also includes steps S401-S403.
[0080] S401. Obtain the running status of the target edge node according to the preset first frequency.
[0081] S402. When the running status is abnormal, update the target area where the target edge node is located.
[0082] For example, the magnitude of the first preset frequency can be set according to actual conditions, and no specific limitation is made here. For example, the first preset frequency can be once per minute, once every 5 minutes, etc. The operating status of the target edge node can include: whether the edge node's bandwidth is fully utilized, whether the edge node's processor bandwidth is fully utilized, whether the edge node's memory bandwidth is fully utilized, whether the edge node has crashed, etc., and no specific limitation is made here on the operating status of the edge node. An abnormal operating status can refer to the edge node's bandwidth being fully utilized, the edge node's processor bandwidth being fully utilized, the edge node's memory bandwidth being fully utilized, or the edge node crashing. Updating the target area where the target edge node is located can refer to removing the abnormal target edge node from the target area, or replacing the abnormal target edge node in the target area with a new edge node.
[0083] For example, the first preset frequency can be once per minute. When the running status of the target edge node is found to be "edge node crashed," the target region where the target edge node is located is updated. Taking the method of updating the target region where the target edge node is located as removing abnormal target edge nodes from the target region as an example, the target region can be region 1, which can contain edge node 1, edge node 2, and edge node 3, where the target edge node can be edge node 3. When the running status of edge node 3 is found to be "edge node crashed," edge node 3 is removed from region 1.
[0084] S403. Recalculate the updated target area and redetermine a target edge node as the edge node for the client's data request.
[0085] For example, since all edge nodes in the updated target area are edge nodes without anomalies, the target edge nodes in the target area can be recalculated according to steps S101-S104 to redetermine a target edge node as the edge node for the client to request data.
[0086] For example, the target region can be region 1, which can contain edge node 1, edge node 2, and edge node 3, where the target edge node can be edge node 3. When the running status of edge node 3 is found to be that the edge node is down, edge node 3 is removed from region 1. The target region after removal can contain edge node 1 and edge node 2. The target edge node in region 1 can be recalculated according to steps S101-S104 to redetermine a target edge node as the edge node for the client to request data.
[0087] This embodiment obtains the running status of the target edge node according to a preset first frequency, and updates the target area where the target edge node is located when the running status is abnormal. The updated target area is recalculated, and a new target edge node is determined as the edge node for client data requests. This allows for timely acquisition of the running status of the target edge node, so that when the running status of the target edge node is abnormal, the target edge node can be updated in a timely manner, ensuring the normal operation of the target edge node.
[0088] In some embodiments, the method for redirecting edge nodes for clients further includes: removing abnormal target edge nodes from the target region, or replacing abnormal target edge nodes in the target region with new edge nodes.
[0089] For example, removing an abnormal target edge node from the target region can refer to turning off or disconnecting the abnormal target edge node. Replacing the abnormal target edge node in the target region with a new edge node can refer to adding a new edge node to the target region to replace the abnormal edge node, or reselecting an edge node in the target region to replace the abnormal edge node.
[0090] For example, the target region can be region 1, which can contain edge node 1, edge node 2, and edge node 3. The abnormal target edge node can be edge node 3. Removing the abnormal target edge node from the target region can mean turning off edge node 3. After turning off edge node 3, the edge nodes in region 1 can be edge node 1 and edge node 2. Replacing the abnormal target edge node in the target region with a new edge node can mean using edge node 4 to replace edge node 3 as the target edge node, or selecting a new edge node from edge node 1 and edge node 2 in region 1 to replace edge node 3.
[0091] This embodiment can update the target edge nodes in a timely manner by removing abnormal target edge nodes from the target area, or by replacing the abnormal target edge nodes in the target area with new edge nodes, thereby ensuring the normal operation of the target edge nodes and improving the stability of data transmission in the target area.
[0092] In some embodiments, Figure 1 Step S104 may include: determining a target edge node from the edge nodes of the target area as the edge node for client data requests based on the remainder obtained by dividing the hash value by a preset threshold and the bandwidth ratio of each edge node.
[0093] For example, the explanation of this embodiment can be referred to the explanation of step S104, and will not be repeated here.
[0094] This embodiment determines a target edge node from the edge nodes of the target area as the edge node for client data requests by using the remainder obtained by dividing the hash value by a preset threshold and the bandwidth ratio of each edge node. The target edge node can be quickly and accurately determined by dividing the hash value corresponding to the data request address by the preset threshold, thereby redirecting clients with the same data request address to the target edge node and using the same target edge node for data transmission. This reduces the back-to-origin bandwidth of the parent node, thereby saving bandwidth resources and further improving the efficiency of redirecting edge nodes for clients.
[0095] In some embodiments, the preset algorithm includes at least one of the following: cyclic redundancy check algorithm, hash function algorithm, and hash function derived algorithm.
[0096] For example, the preset algorithm can be a Cyclic Redundancy Check (CRC) algorithm, a hash function (Fowler-Noll-Vo, FNV-1) algorithm, or a derivative algorithm of the hash function (Fowler-Noll-Vo-A, FNV-1A), etc. No specific restrictions are placed on the preset algorithm here. The preset algorithm can be used to calculate the hash value of the data request address from the client's data request.
[0097] In this embodiment, the preset algorithm includes at least one of the following: cyclic redundancy check algorithm, hash function algorithm, and hash function derivative algorithm, which can protect the integrity and uniqueness of data request address, thereby improving the security of data transmission.
[0098] In an exemplary embodiment, this disclosure also provides an apparatus for redirecting edge nodes for a client, which can be used to implement the method for redirecting edge nodes for a client as described in the foregoing embodiments. Figure 5 This is a schematic diagram illustrating the composition of an apparatus for redirecting edge nodes to a client, provided as an embodiment of this disclosure. For example... Figure 5 As shown, the device may include: an acquisition unit 501 and a processing unit 502.
[0099] The acquisition unit 501 is used to determine the peak bandwidth of the target area based on the peak bandwidth of the edge nodes in the target area, wherein the edge nodes include at least two; and to determine the bandwidth ratio of each edge node based on the peak bandwidth of the target area and the peak bandwidth of each edge node.
[0100] The processing unit 502 is used to calculate the data request address of the client requesting data using a preset algorithm to obtain the hash value of the data request address; and to determine a target edge node as the edge node for the client requesting data from the edge nodes of the target area based on the hash value and the bandwidth ratio of each edge node.
[0101] Optionally, the target area includes at least two sub-areas, the client is located in the first sub-area, and the data request address of the client requesting data is directed to the edge node in the first sub-area.
[0102] Optionally, before determining the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region, the acquisition unit 501 is further configured to: determine the edge nodes in the target region based on the edge nodes in the sub-regions.
[0103] Optionally, when different sub-regions contain the same edge nodes, the acquisition unit 501 is also used to: merge the different sub-regions into the same target region.
[0104] Optionally, when the geographical locations of different sub-regions are less than a preset distance threshold, the acquisition unit 501 is further used to: merge different sub-regions into the same target region.
[0105] Optionally, before determining the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region, the acquisition unit 501 is further configured to: acquire the available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth of each edge node; and take the edge node with the smallest difference from the preset bandwidth threshold among the available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth as the peak bandwidth of each edge node.
[0106] Optionally, the processing unit 502 is specifically used to: sort the edge nodes according to the bandwidth ratio of each edge node; and determine a target edge node from the edge nodes of the target area as the edge node for the client to request data, based on the hash value and the sorting result.
[0107] Optionally, the processing unit 502 is further configured to: obtain the running status of the target edge node according to a preset first frequency; when the running status is abnormal, update the target area where the target edge node is located; recalculate the updated target area, and re-determine a target edge node as the edge node for the client requesting data.
[0108] Optionally, the processing unit 502 is specifically used to: remove abnormal target edge nodes from the target region, or replace abnormal target edge nodes in the target region with new edge nodes.
[0109] Optionally, the processing unit 502 is specifically used to: determine a target edge node from the edge nodes of the target area as the edge node for client data requests based on the remainder obtained by dividing the hash value by a preset threshold and the bandwidth ratio of each edge node.
[0110] Optionally, the preset algorithm includes at least one of the following: cyclic redundancy check algorithm, hash function algorithm, and hash function derived algorithm.
[0111] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0112] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0113] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described in the above embodiments.
[0114] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the above embodiments.
[0115] In an exemplary embodiment, the computer program product includes a computer program that, when executed by a processor, implements the method described in the above embodiments.
[0116] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0117] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0118] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0119] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the method of redirecting edge nodes for clients. For example, in some embodiments, the method of redirecting edge nodes for clients may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method of redirecting edge nodes for clients described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the method of redirecting edge nodes for clients by any other suitable means (e.g., by means of firmware).
[0120] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0121] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0124] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0125] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0126] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0127] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for redirecting edge nodes for a client, the method comprising: The peak bandwidth of the target region is determined based on the peak bandwidth of the edge nodes in the target region, wherein the edge nodes include at least two. The bandwidth ratio of each edge node is determined based on the peak bandwidth of the target region and the peak bandwidth of each edge node; A preset algorithm is used to calculate the data request address of the client requesting data, and the hash value of the data request address is obtained; Based on the hash value and the bandwidth ratio of each edge node, a target edge node is determined from the edge nodes of the target area as the edge node for the client's requested data.
2. The method according to claim 1, wherein the target area includes at least two sub-areas, the client is located in the first sub-area of the sub-areas, and the data request address of the client requesting data is directed to the edge node in the first sub-area.
3. The method according to claim 2, wherein before determining the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region, the method further comprises: The edge nodes in the target region are determined based on the edge nodes in the sub-region.
4. The method according to claim 3, wherein when different sub-regions contain the same edge nodes, the method further comprises: The different sub-regions are merged into the same target region.
5. The method according to claim 3, wherein when the geographical locations of different sub-regions are less than a preset distance threshold, the method further includes: The different sub-regions are merged into the same target region.
6. The method according to any one of claims 1-5, wherein before determining the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region, the method further comprises: Obtain the available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth for each edge node; The peak bandwidth of each edge node is determined by the smallest difference between its available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth and a preset bandwidth threshold.
7. The method according to claim 1, wherein determining a target edge node from the edge nodes of the target region as the edge node for the client requesting data based on the hash value and the bandwidth ratio of each edge node comprises: The edge nodes are sorted according to the bandwidth ratio of each edge node; Based on the hash value and sorting result, a target edge node is determined from the edge nodes of the target region as the edge node for the client's requested data.
8. The method according to claim 1, further comprising: The operating status of the target edge node is obtained according to a preset first frequency; When the operating status is abnormal, the target region where the target edge node is located is updated; The updated target area is recalculated, and a new target edge node is determined as the edge node for the client's requested data.
9. The method of claim 8, wherein the update comprises: Remove abnormal target edge nodes from the target region, or, Replace the abnormal target edge nodes in the target region with new edge nodes.
10. The method according to claim 1 or 7, wherein determining a target edge node from the edge nodes of the target region as the edge node for the client requesting data, based on the hash value and the bandwidth ratio of each edge node, comprises: Based on the remainder obtained by dividing the hash value by a preset threshold and the bandwidth ratio of each edge node, a target edge node is determined from the edge nodes of the target region as the edge node for the client's requested data.
11. The method according to claim 1, wherein the preset algorithm includes at least one of the following: a cyclic redundancy check algorithm, a hash function algorithm, and a hash function derivative algorithm.
12. An apparatus for redirecting edge nodes for a client, the apparatus comprising: The acquisition unit is configured to determine the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region, wherein the edge nodes include at least two. The bandwidth ratio of each edge node is determined based on the peak bandwidth of the target region and the peak bandwidth of each edge node; The processing unit is used to calculate the data request address of the client requesting data using a preset algorithm to obtain the hash value of the data request address; Based on the hash value and the bandwidth ratio of each edge node, a target edge node is determined from the edge nodes of the target area as the edge node for the client's requested data.
13. The apparatus of claim 12, wherein the target region comprises at least two sub-regions, the client is located in a first sub-region of the sub-regions, and the data request address of the client requesting data is directed to an edge node in the first sub-region.
14. The apparatus of claim 13, wherein before determining the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region, the acquisition unit is further configured to: The edge nodes in the target region are determined based on the edge nodes in the sub-region.
15. The apparatus of claim 14, wherein when different sub-regions contain the same edge nodes, the acquiring unit is further configured to: The different sub-regions are merged into the same target region.
16. The apparatus according to claim 14, wherein when the geographical locations of different sub-regions are less than a preset distance threshold, the acquisition unit is further configured to: The different sub-regions are merged into the same target region.
17. The apparatus according to any one of claims 12-16, wherein before determining the peak bandwidth of the target region based on the peak bandwidth of the edge nodes in the target region, the acquisition unit is further configured to: Obtain the available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth for each edge node; The peak bandwidth of each edge node is determined by the smallest difference between its available bandwidth, remaining processor-supported bandwidth, and remaining memory-supported bandwidth and a preset bandwidth threshold.
18. The apparatus according to claim 12, wherein the processing unit is specifically configured to: The edge nodes are sorted according to the bandwidth ratio of each edge node; Based on the hash value and sorting result, a target edge node is determined from the edge nodes of the target region as the edge node for the client's requested data.
19. The apparatus according to claim 12, wherein the processing unit is further configured to: The operating status of the target edge node is obtained according to a preset first frequency; When the operating status is abnormal, the target region where the target edge node is located is updated; The updated target area is recalculated, and a new target edge node is determined as the edge node for the client's requested data.
20. The apparatus according to claim 19, wherein the processing unit is specifically configured to: Remove abnormal target edge nodes from the target region, or, Replace the abnormal target edge nodes in the target region with new edge nodes.
21. The apparatus according to claim 12 or 18, wherein the processing unit is specifically configured to: Based on the remainder obtained by dividing the hash value by a preset threshold and the bandwidth ratio of each edge node, a target edge node is determined from the edge nodes of the target area as the edge node for the client's requested data.
22. The apparatus according to claim 12, wherein the preset algorithm includes at least one of the following: a cyclic redundancy check algorithm, a hash function algorithm, and a hash function derivative algorithm.
23. An electronic device, comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method according to any one of claims 1-11.
24. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method according to any one of claims 1-11.
25. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-11.
Citation Information
Patent Citations
Network request resource scheduling method and device, electronic equipment and storage medium
CN111225059A
Live broadcast scheduling method and device, and readable medium
CN114598897A
