CN110708374B - Distribution method and distribution device of edge nodes and readable storage medium - Google Patents

Distribution method and distribution device of edge nodes and readable storage medium Download PDF

Info

Publication number
CN110708374B
CN110708374B CN201910940675.7A CN201910940675A CN110708374B CN 110708374 B CN110708374 B CN 110708374B CN 201910940675 A CN201910940675 A CN 201910940675A CN 110708374 B CN110708374 B CN 110708374B
Authority
CN
China
Prior art keywords
edge node
determining
node
data resource
unique identity
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
CN201910940675.7A
Other languages
Chinese (zh)
Other versions
CN110708374A (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 Gaotu Yunji Education Technology Co Ltd
Original Assignee
Beijing Gaotu Yunji Education 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 Gaotu Yunji Education Technology Co Ltd filed Critical Beijing Gaotu Yunji Education Technology Co Ltd
Priority to CN201910940675.7A priority Critical patent/CN110708374B/en
Publication of CN110708374A publication Critical patent/CN110708374A/en
Application granted granted Critical
Publication of CN110708374B publication Critical patent/CN110708374B/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
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides an edge node distribution method, a distribution device and a readable storage medium, wherein the method comprises the following steps: determining a digital identification code of a data resource requested by a data resource request from a received data resource request; acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource; determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number; combining the digital identification code with any positive integer item in the array to obtain a new digital identification code; and determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node. Therefore, the excessive access amount of the same edge node at the same time can be avoided, the probability of network congestion is reduced, and the transmission efficiency of resources is improved.

Description

Distribution method and distribution device of edge nodes and readable storage medium
Technical Field
The present application relates to the field of application server technologies, and in particular, to an edge node allocation method, an edge node allocation device, and a readable storage medium.
Background
In an application server of the internet, in order to meet the continuously increasing user access requirement, a server cluster with elastic capacity expansion capability is generally constructed. Typical server clusters include a Content Delivery Network (CDN) server cluster that provides a user with pictures, video-on-demand, HTML files, and the like, and a real-time live streaming server cluster that pushes real-time live streaming data to the user for viewing.
In the prior art, when a user requests to access a resource, a server cluster allocates an edge node with a short network distance to the user in a domain name resolution manner, and transmits the resource requested to be accessed from a source station to a central node, and then the resource is distributed to the edge node allocated to the user by the central node, and the user browses the requested resource through an address IP connected to the edge node. However, when a large number of users in the same area access the same resource, the edge node in the area may be overloaded, which causes network congestion and results in low resource transmission efficiency.
Disclosure of Invention
In view of the above, an object of the present application is to provide an edge node allocation method, an edge node allocation device, and a readable storage medium, which determine an allocated edge node according to a requested data resource and a load index of each edge node in a cluster, so as to avoid excessive access of the same edge node at the same time, thereby reducing a probability of occurrence of network congestion and improving a transmission efficiency of the resource.
The embodiment of the application provides an edge node distribution method, which comprises the following steps:
determining a digital identification code of a data resource requested by a data resource request from a received data resource request;
acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource;
determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number;
combining the digital identification code with any positive integer item in the array to obtain a new digital identification code;
and determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node.
Further, after determining the assigned edge node from the new digital identification code and the unique identity of each edge node, the assignment method further comprises:
and sending the determined and distributed unique identity of the edge node to a request terminal, and accessing the requested data resource by the request terminal through the unique identity of the edge node.
Further, the determining the allocated edge node by the new digital identification code and the unique identity of each edge node includes:
determining a node hash value of each edge node according to the unique identity of each edge node;
determining a hash value of the data resource from the new digital identification code;
calculating the difference between the hash value of the data resource and the node hash value of each edge node respectively to obtain a plurality of difference values;
and determining the edge node corresponding to the minimum difference value in the plurality of difference values as the distributed edge node.
Further, the determining the allocated edge node by the new digital identification code and the unique identity of each edge node includes:
combining the unique identity of each edge node with the new digital identification code to obtain a new unique identity of each edge node;
respectively calculating the hash value of the new unique identity of each edge node to obtain the node hash value of each edge node;
and determining the edge node corresponding to the maximum node hash value in the node hash values of each edge node as the distributed edge node.
Further, the determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number comprises:
calculating the length of the sequence according to the first number and the total number;
and sequentially increasing the number sequence items between two adjacent number sequence items according to a preset integer value from a preset first positive integer item to obtain the number sequence comprising the number sequence items corresponding to the length.
Further, the length is calculated by the following formula:
w=M*(H(M)-H(M-N));
wherein w is the length, M is the total number, N is the first number,
Figure BDA0002222786690000031
γ is the Euler constant.
An embodiment of the present application further provides an edge node allocation apparatus, where the allocation apparatus includes:
the first determining module is used for determining the digital identification code of the data resource requested by the data resource request from the received data resource request;
the acquisition module is used for acquiring the total number of edge nodes in the server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resources by the server cluster according to the request amount of the data resources;
a second determining module for determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number;
the merging module is used for merging the digital identification code and any positive integer item in the sequence to obtain a new digital identification code;
and the third determining module is used for determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node.
Further, the distribution device further comprises:
and the sending module is used for sending the determined and distributed unique identity of the edge node to the request terminal, and the request terminal accesses the requested data resource through the unique identity of the edge node.
Further, when the third determining module is configured to determine the assigned edge node from the new digital identification code and the unique identity of each edge node, the third determining module is configured to:
determining a node hash value of each edge node according to the unique identity of each edge node;
determining a hash value of the data resource from the new digital identification code;
calculating the difference between the hash value of the data resource and the node hash value of each edge node respectively to obtain a plurality of difference values;
and determining the edge node corresponding to the minimum difference value in the plurality of difference values as the distributed edge node.
Further, when the third determining module is configured to determine the assigned edge node from the new digital identification code and the unique identity of each edge node, the third determining module is configured to:
combining the unique identity of each edge node with the new digital identification code to obtain a new unique identity of each edge node;
respectively calculating the hash value of the new unique identity of each edge node to obtain the node hash value of each edge node;
and determining the edge node corresponding to the maximum node hash value in the node hash values of each edge node as the distributed edge node.
Further, the second determining module, when configured to determine a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number, is configured to:
calculating the length of the sequence according to the first number and the total number;
and sequentially increasing the number sequence items between two adjacent number sequence items according to a preset integer value from a preset first positive integer item to obtain the number sequence comprising the number sequence items corresponding to the length.
Further, the second determining module, when configured to calculate the length of the sequence of numbers according to the first number and the total number, is configured to:
calculating the length by the following formula:
w=M*(H(M)-H(M-N));
wherein w is the length, M is the total number, N is the first number,
Figure BDA0002222786690000051
γ is the Euler constant.
An embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the edge node allocation method as described above.
Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the method for allocating an edge node as described above.
According to the distribution method, the distribution device, the equipment and the storage medium of the edge node, the digital identification code of the data resource requested by the data resource request is determined from the received data resource request; acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource; determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number; combining the digital identification code with any positive integer item in the array to obtain a new digital identification code; and determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node.
Compared with the prior art, the method for distributing the edge nodes with the short network distance for the user by the server cluster through domain name resolution is characterized in that when the server cluster receives a user request, the number of the edge nodes distributed for the data resource is determined according to the request quantity of the requested data resource, and the edge nodes distributed for the user are determined by analyzing the number of the edge nodes in the cluster and the relation between the data resource and the unique identity of the edge nodes.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a diagram of a system architecture in one possible application scenario;
fig. 2 is a flowchart of an edge node allocation method according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another method for allocating edge nodes according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an edge node distribution apparatus according to an embodiment of the present disclosure;
fig. 5 is a second schematic structural diagram of an edge node distribution apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
First, an application scenario to which the present application is applicable will be described. The method and the device can be applied to an application scene that the distributed server cluster distributes the edge nodes for the users, and the probability of network congestion can be reduced and the transmission efficiency of resources can be improved by receiving the user requests and distributing the edge nodes according to the content of the user requests. Referring to fig. 1, fig. 1 is a system architecture diagram in a possible application scenario. As shown in fig. 1, the system includes a source station, a distributed server cluster and a user, where the source station provides data resources for the user, and in order to avoid the problem of network congestion caused by a large access demand of the source station, the server cluster is generally used to transmit the data resources of the source station, and the server cluster is composed of a plurality of servers providing the same service, and may be divided into a central node and an edge node, where a node connected to a user side is the edge node. When a user wants to access the data resource of the source station, the server cluster selects a server node for the user to transmit the data resource through a certain rule, and the certain rule is mostly used for distributing an edge node with a short network distance for the user in a domain name resolution mode.
Research shows that when a large number of users access the same resource in the same region, the edge node in the region may be overloaded to cause network congestion, and when each edge node has only a small number of users to access, the number of resources distributed to the edge node by the central node is approximately equal to the number of resources distributed to the users by the edge node, and the transmission efficiency is low.
Based on this, the embodiments of the present application provide an edge node allocation method to reduce the probability of network congestion and improve the transmission efficiency of data resources.
Referring to fig. 2, fig. 2 is a flowchart illustrating an edge node distribution according to an embodiment of the present disclosure. As shown in fig. 2, a method for allocating edge nodes provided in an embodiment of the present application includes:
s201, determining the digital identification code of the data resource requested by the data resource request from the received data resource request.
In this step, when the server cluster records the data resource, it provides a digital identification code for the data resource, where the digital identification code corresponds to each data resource one to one, and when a user request is received, the digital identification code of the data resource can be acquired through the data resource requested by the user.
The digital identification code may be a serial number of the data resource, or may be an inherent parameter of the data resource.
S202, acquiring the total number of edge nodes in the server cluster, the unique identity of each edge node, and the first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource.
In this step, when the server node accesses the server cluster, the server cluster stores the unique identification information of the edge node, updates the total number of the edge nodes, and determines the number of the edge nodes allocated to the data resource according to the requested amount of the data resource.
The unique identity of the edge node may be a public network IP or a monotonically increasing sequence number.
S203, determining a number sequence comprising a plurality of positive integer terms based on the first number and the total number.
In this step, according to the number of edge nodes allocated by the cluster to the requested data resource and the total number of edge nodes in the cluster obtained in S202, a number sequence including a plurality of positive integer items is determined for subsequent combination with the digital identification code of the data resource.
S204, combining the digital identification code with any positive integer item in the sequence to obtain a new digital identification code.
In this step, a positive integer item is randomly selected from the sequence obtained in S203, and the integer item is combined with the digital identification code of the data resource, and the combined value is the new digital identification code of the data resource.
S205, determining the distributed edge nodes according to the new digital identification codes and the unique identity of each edge node.
In this step, the new digital identification code is formed by combining the original digital identification code and any numerical value in the numerical sequence, and the edge node matched with the new digital identification code is the edge node allocated by the cluster for a single access request.
And combining the digital identification code of the data resource with each numerical value in the numerical sequence, and using a plurality of edge nodes matched with the combined numerical values to allocate all the edge nodes to the data resource by the server cluster.
According to the method for distributing the edge nodes, the digital identification code of the data resource requested by the data resource request is determined from the received data resource request; acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource; determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number; combining the digital identification code with any positive integer item in the array to obtain a new digital identification code; and determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node.
Compared with the prior art, the method for distributing the edge nodes with the short network distance for the user by the server cluster through domain name resolution is characterized in that when the server cluster receives a user request, the number of the edge nodes distributed for the data resource is determined according to the request quantity of the requested data resource, and the edge nodes distributed for the user are determined by analyzing the number of the edge nodes in the cluster and the relation between the data resource and the unique identity of the edge nodes.
Referring to fig. 3, fig. 3 is a flowchart of another edge node allocation method according to an embodiment of the present disclosure. As shown in fig. 3, the method for allocating edge nodes provided in the embodiment of the present application includes:
s301, determining a digital identification code of a data resource requested by a data resource request from the received data resource request;
s302, acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node, and a first number of edge nodes allocated to the data resource by the server cluster according to the requested amount of the data resource;
s303, determining a number sequence comprising a plurality of positive integer terms based on the first number and the total number;
s304, combining the digital identification code with any positive integer item in the sequence to obtain a new digital identification code;
s305, determining the distributed edge nodes according to the new digital identification codes and the unique identity of each edge node.
The descriptions of S301 to S305 may refer to the descriptions of S201 to S205, and the same technical effects can be achieved, which are not described in detail.
S306, the determined and distributed unique identity of the edge node is sent to the request terminal, and the request terminal accesses the requested data resource through the unique identity of the edge node.
In the step, the server cluster sends the unique identity of the distributed edge node to the user, and transmits the data resource acquired from the source station to the edge node, and the user acquires the data resource requested to be accessed from the edge node through the unique identity fed back by the cluster.
Further, in S305, determining the assigned edge node according to the new digital identification code and the unique identity of each edge node, including:
determining a node hash value of each edge node according to the unique identity of each edge node;
determining a hash value of the data resource from the new digital identification code;
calculating the difference between the hash value of the data resource and the node hash value of each edge node respectively to obtain a plurality of difference values;
and determining the edge node corresponding to the minimum difference value in the plurality of difference values as the distributed edge node.
In the step, the unique identity of each edge node is mapped into a binary hash value with a fixed length by using a hash function, and the digital identification code of the data resource is mapped into the binary hash value. And selecting the edge node corresponding to the node hash value with the minimum difference value as the distributed edge node by calculating the difference value between the hash value of the data resource and the node hash value of each edge node.
By comparing the hash value of the data resource with all node hash values in the server cluster, selecting the edge node corresponding to the node hash value closest to the hash value of the data resource to serve as the distributed edge node, so that when the edge node goes offline, the request of the edge node is replaced by the edge node adjacent to the hash value, and the server cluster does not need to redistribute the edge node for the user requesting to access the data resource, thereby shortening the time for distributing the edge node by the server cluster.
Further, in S305, determining the assigned edge node according to the new digital identification code and the unique identity of each edge node, including:
combining the unique identity of each edge node with the new digital identification code to obtain a new unique identity of each edge node;
respectively calculating the hash value of the new unique identity of each edge node to obtain the node hash value of each edge node;
and determining the edge node corresponding to the maximum node hash value in the node hash values of each edge node as the distributed edge node.
In the step, the new digital identification code and the unique identity of each edge node are combined to obtain a new unique identity of each edge node, the new unique identity of each edge node is mapped to a binary hash value with a fixed length to obtain a node hash value of each node, and the edge node with the maximum node hash value is selected as the distributed edge node.
Further, in S303, determining a sequence of numbers including a plurality of positive integer terms based on the first number and the total number, including:
calculating the length of the sequence according to the first number and the total number;
and sequentially increasing the number sequence items between two adjacent number sequence items according to a preset integer value from a preset first positive integer item to obtain the number sequence comprising the number sequence items corresponding to the length.
In this step, considering that the digital identification code of the data resource is combined with w positive integer items in the number sequence to form w new digital identification codes, wherein each new digital identification code is matched to one edge node, and the number of the edge nodes allocated to the data resource by the server cluster is N, in order to select N non-repeating edge nodes from the total number M of the edge nodes, the length w of the number sequence needs to be calculated, and the length is used for selecting the edge nodes to transmit the data resource.
Further, the length is calculated by the following formula:
w=M*(H(M)-H(M-N));
wherein w is the length, M is the total number, N is the first number,
Figure BDA0002222786690000121
γ is the Euler constant.
In the given M edge nodes, N (N is less than or equal to M) edge nodes are selected with equal probability without repetition, and the mathematical expectation of the required selection times is as follows:
Figure BDA0002222786690000122
further, the above formula can be written as follows:
E(N)=M*(H(M)-H(M-N))
where H (x) is the summation form of the harmonic series,
Figure BDA0002222786690000131
in order to avoid traversing summation with higher computation time complexity, the scheme adopts a progressive formula to compute the sum of harmonic orders:
Figure BDA0002222786690000132
wherein gamma is Euler constant, and gamma is approximately equal to 0.577215.
In summary, in order to obtain N non-duplicate nodes more accurately from a cluster of M nodes, the calculation formula of the length w of the array is:
w=M*(H(M)-H(M-N))
Figure BDA0002222786690000133
the value of the sequence L is determined from the calculated length.
Wherein the sequence L ═ {0,1,2, … w-1 }.
For example, if the total number M of edge nodes in the server cluster is 10, and the number N of edge nodes allocated to the resource data requested by the user by the server cluster is 5, the length w of the number sequence is 10 (H (10) -H (10-5)) -6.45, the number sequence is rounded up to 7, and the obtained number sequence is {0,1,2, …, 6 }.
According to the method for distributing the edge nodes, the digital identification codes of the data resources requested by the data resource requests are determined from the received data resource requests; acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource; determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number; combining the digital identification code with any positive integer item in the array to obtain a new digital identification code; and determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node.
Compared with the prior art, the method for distributing the edge nodes with the short network distance for the user by the server cluster through domain name resolution is characterized in that when the server cluster receives a user request, the number of the edge nodes distributed for the data resource is determined according to the request quantity of the requested data resource, and the edge nodes distributed for the user are determined by analyzing the number of the edge nodes in the cluster and the relation between the data resource and the unique identity of the edge nodes.
Referring to fig. 4 and 5, fig. 4 is a first schematic structural diagram of an edge node distribution device according to an embodiment of the present disclosure, and fig. 5 is a second schematic structural diagram of an edge node distribution device according to an embodiment of the present disclosure. As shown in fig. 4, the edge node allocating apparatus 400 includes:
a first determining module 410, configured to determine, from the received data resource request, a digital identification code of a data resource requested by the data resource request;
an obtaining module 420, configured to obtain the total number of edge nodes in a server cluster, a unique identity of each edge node, and a first number of edge nodes allocated by the server cluster to the data resource according to the requested amount of the data resource;
a second determining module 430, configured to determine a sequence of numbers including a plurality of positive integer terms based on the first number and the total number;
a merging module 440, configured to merge the digital identifier with any positive integer in the sequence to obtain a new digital identifier;
a third determining module 450, configured to determine the assigned edge node from the new digital identification code and the unique identity of each edge node.
As shown in fig. 5, the distribution device 400 further includes:
a sending module 460, configured to send the determined unique identity of the edge node to the requesting terminal, where the requesting terminal accesses the requested data resource through the unique identity of the edge node.
Further, when the third determining module 450 is configured to determine the assigned edge node from the new digital identification code and the unique identity of each edge node, the third determining module 450 is configured to:
determining a node hash value of each edge node according to the unique identity of each edge node;
determining a hash value of the data resource from the new digital identification code;
calculating the difference between the hash value of the data resource and the node hash value of each edge node respectively to obtain a plurality of difference values;
and determining the edge node corresponding to the minimum difference value in the plurality of difference values as the distributed edge node.
Further, when the third determining module 450 is configured to determine the assigned edge node from the new digital identification code and the unique identity of each edge node, the third determining module 450 is configured to:
combining the unique identity of each edge node with the new digital identification code to obtain a new unique identity of each edge node;
respectively calculating the hash value of the new unique identity of each edge node to obtain the node hash value of each edge node;
and determining the edge node corresponding to the maximum node hash value in the node hash values of each edge node as the distributed edge node.
Further, when the second determining module 430 is configured to determine the sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number, the second determining module 430 is configured to:
calculating the length of the sequence according to the first number and the total number;
and sequentially increasing the number sequence items between two adjacent number sequence items according to a preset integer value from a preset first positive integer item to obtain the number sequence comprising the number sequence items corresponding to the length.
Further, when the second determining module 430 is configured to calculate the length of the sequence of numbers according to the first number and the total number, the second determining module 430 is configured to:
calculating the length by the following formula:
w=M*(H(M)-H(M-N));
wherein w is the length, M is the total number, N is the first number,
Figure BDA0002222786690000161
γ is the Euler constant.
The distribution device of the edge node provided by the embodiment of the application determines the digital identification code of the data resource requested by the data resource request from the received data resource request; acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource; determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number; combining the digital identification code with any positive integer item in the array to obtain a new digital identification code; and determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node.
Compared with the prior art, the method for distributing the edge nodes with the short network distance for the user by the server cluster through domain name resolution is characterized in that when the server cluster receives a user request, the number of the edge nodes distributed for the data resource is determined according to the request quantity of the requested data resource, and the edge nodes distributed for the user are determined by analyzing the number of the edge nodes in the cluster and the relation between the data resource and the unique identity of the edge nodes.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 600 includes a processor 610, a memory 620, and a bus 630.
The memory 620 stores machine-readable instructions executable by the processor 610, when the electronic device 600 runs, the processor 610 communicates with the memory 620 through the bus 630, and when the machine-readable instructions are executed by the processor 610, the steps of the edge node allocation method in the method embodiments shown in fig. 2 and fig. 3 may be performed.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the step of the edge node allocation method in the method embodiments shown in fig. 2 and fig. 3 may be executed.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (6)

1. An edge node allocation method, the method comprising:
determining a digital identification code of a data resource requested by a data resource request from a received data resource request;
acquiring the total number of edge nodes in a server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resource by the server cluster according to the request amount of the data resource;
determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number;
combining the digital identification code with any positive integer item in the array to obtain a new digital identification code;
determining the distributed edge nodes according to the new digital identification codes and the unique identity of each edge node;
the determining, based on the first number and the total number, a sequence of numbers comprising a plurality of positive integer terms, comprising: calculating the length of the sequence according to the first number and the total number; sequentially increasing the number sequence items between two adjacent number sequence items according to a preset integer value from a preset first positive integer item to obtain a number sequence comprising the number sequence items corresponding to the length; by the following formulaCalculating the length: w ═ M (H (M) -H (M-N)); wherein w is the length, M is the total number, N is the first number,
Figure FDA0003426061260000011
Figure FDA0003426061260000012
gamma is the Euler constant;
determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node, comprising: determining a node hash value of each edge node according to the unique identity of each edge node; determining a hash value of the data resource from the new digital identification code; calculating the difference between the hash value of the data resource and the node hash value of each edge node respectively to obtain a plurality of difference values; determining an edge node corresponding to the minimum difference value in the plurality of difference values as a distributed edge node;
or, the determining the allocated edge node by the new digital identification code and the unique identity of each edge node includes: combining the unique identity of each edge node with the new digital identification code to obtain a new unique identity of each edge node; respectively calculating the hash value of the new unique identity of each edge node to obtain the node hash value of each edge node; and determining the edge node corresponding to the maximum node hash value in the node hash values of each edge node as the distributed edge node.
2. The assignment method of claim 1, wherein after said determining the assigned edge nodes from the new digital identification code and the unique identity of each edge node, the assignment method further comprises:
and sending the determined and distributed unique identity of the edge node to a request terminal, and accessing the requested data resource by the request terminal through the unique identity of the edge node.
3. An apparatus for distributing edge nodes, the apparatus comprising:
the first determining module is used for determining the digital identification code of the data resource requested by the data resource request from the received data resource request;
the acquisition module is used for acquiring the total number of edge nodes in the server cluster, the unique identity of each edge node and a first number of edge nodes distributed to the data resources by the server cluster according to the request amount of the data resources;
a second determining module for determining a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number;
the merging module is used for merging the digital identification code and any positive integer item in the sequence to obtain a new digital identification code;
the third determining module is used for determining the distributed edge nodes by the new digital identification codes and the unique identity of each edge node;
the second determining module, when configured to determine a sequence of numbers comprising a plurality of positive integer terms based on the first number and the total number, is configured to: calculating the length of the sequence according to the first number and the total number; sequentially increasing the number sequence items between two adjacent number sequence items according to a preset integer value from a preset first positive integer item to obtain a number sequence comprising the number sequence items corresponding to the length; the second determining module, when configured to calculate the length of the sequence of numbers from the first number and the total number, is configured to: calculating the length by the following formula: w ═ M (H (M) -H (M-N)); wherein w is the length, M is the total number, N is the first number,
Figure FDA0003426061260000031
Figure FDA0003426061260000032
gamma is the Euler constant;
the third determining module, when configured to determine the assigned edge node from the new digital identification code and the unique identity of each edge node, is configured to: determining a node hash value of each edge node according to the unique identity of each edge node; determining a hash value of the data resource from the new digital identification code; calculating the difference between the hash value of the data resource and the node hash value of each edge node respectively to obtain a plurality of difference values; determining an edge node corresponding to the minimum difference value in the plurality of difference values as a distributed edge node;
or, when the third determining module is configured to determine the assigned edge node from the new digital identification code and the unique identity of each edge node, the third determining module is configured to: combining the unique identity of each edge node with the new digital identification code to obtain a new unique identity of each edge node; respectively calculating the hash value of the new unique identity of each edge node to obtain the node hash value of each edge node; and determining the edge node corresponding to the maximum node hash value in the node hash values of each edge node as the distributed edge node.
4. The dispensing apparatus of claim 3, wherein the dispensing apparatus further comprises:
and the sending module is used for sending the determined and distributed unique identity of the edge node to the request terminal, and the request terminal accesses the requested data resource through the unique identity of the edge node.
5. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the method of allocating an edge node according to any one of claims 1 to 2.
6. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the allocation method of an edge node according to any one of claims 1 to 2.
CN201910940675.7A 2019-09-30 2019-09-30 Distribution method and distribution device of edge nodes and readable storage medium Active CN110708374B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910940675.7A CN110708374B (en) 2019-09-30 2019-09-30 Distribution method and distribution device of edge nodes and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910940675.7A CN110708374B (en) 2019-09-30 2019-09-30 Distribution method and distribution device of edge nodes and readable storage medium

Publications (2)

Publication Number Publication Date
CN110708374A CN110708374A (en) 2020-01-17
CN110708374B true CN110708374B (en) 2022-02-22

Family

ID=69197962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910940675.7A Active CN110708374B (en) 2019-09-30 2019-09-30 Distribution method and distribution device of edge nodes and readable storage medium

Country Status (1)

Country Link
CN (1) CN110708374B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019604B (en) * 2020-08-13 2023-09-01 上海哔哩哔哩科技有限公司 Edge data transmission method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753610A (en) * 2008-12-19 2010-06-23 华为技术有限公司 Distributed network structure method, device, system and task processing method
CN103561049A (en) * 2013-09-05 2014-02-05 乐视网信息技术(北京)股份有限公司 Method for processing terminal scheduling request, system thereof and device thereof
WO2015090136A1 (en) * 2013-12-16 2015-06-25 Tencent Technology (Shenzhen) Company Limited Method and apparatus for transmitting data in network system, and data transmission system
CN108173937A (en) * 2017-12-28 2018-06-15 北京中电普华信息技术有限公司 Access control method and device
CN109040259A (en) * 2018-08-09 2018-12-18 中国联合网络通信集团有限公司 A kind of CDN node distribution method and system based on MEC

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8775502B2 (en) * 2009-12-15 2014-07-08 At&T Intellectual Property I, L.P. Data routing in a content distribution network for mobility delivery
KR20140011658A (en) * 2012-07-18 2014-01-29 한국전자통신연구원 Content delivery system and method based on the information-centric networking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753610A (en) * 2008-12-19 2010-06-23 华为技术有限公司 Distributed network structure method, device, system and task processing method
CN103561049A (en) * 2013-09-05 2014-02-05 乐视网信息技术(北京)股份有限公司 Method for processing terminal scheduling request, system thereof and device thereof
WO2015090136A1 (en) * 2013-12-16 2015-06-25 Tencent Technology (Shenzhen) Company Limited Method and apparatus for transmitting data in network system, and data transmission system
CN108173937A (en) * 2017-12-28 2018-06-15 北京中电普华信息技术有限公司 Access control method and device
CN109040259A (en) * 2018-08-09 2018-12-18 中国联合网络通信集团有限公司 A kind of CDN node distribution method and system based on MEC

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Scalable and Reliable Live Streaming Service through Coordinating CDN and P2P;ZhiHui Lu,等;《2011 IEEE 17th International Conference on Parallel and Distributed Systems》;20120103;全文 *
基于用户兴趣模型的CDN分发策略研究;蔺绍祝;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20130115;全文 *

Also Published As

Publication number Publication date
CN110708374A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN107295110B (en) Processing method of computing task, edge node, service server and system
CN109327550B (en) Access request distribution method and device, storage medium and computer equipment
US9348840B2 (en) Adaptive data striping and replication across multiple storage clouds for high availability and performance
CN107872489B (en) File slice uploading method and device and cloud storage system
CN109005056B (en) CDN application-based storage capacity evaluation method and device
CN106453146B (en) Method, system, device and readable storage medium for allocating private cloud computing resources
CN110519183B (en) Node speed limiting method and device, electronic equipment and storage medium
CN110244901B (en) Task allocation method and device and distributed storage system
CN107404541B (en) Method and system for selecting neighbor node in peer-to-peer network transmission
CN108965884B (en) Distribution method of transcoding tasks, scheduling device and transcoding device
CN110740164B (en) Server determination method, regulation and control method, device, equipment and storage medium
CN110545450B (en) Node distribution method, system, electronic equipment and storage medium
CN110933136A (en) Service node selection method, device, equipment and readable storage medium
CN110839069A (en) Node data deployment method, node data deployment system and medium
CN110597879B (en) Method and device for processing time series data
CN110708374B (en) Distribution method and distribution device of edge nodes and readable storage medium
CN110035128B (en) Live broadcast scheduling method and device, live broadcast system and storage medium
CN110909978A (en) Resource processing method, device, server and computer readable storage medium
CN110178119B (en) Method, device and storage system for processing service request
CN114003337A (en) Access request distribution method and device
CN110083313B (en) Data caching method and device
CN111988388A (en) Flow distribution method and device, electronic equipment and storage medium
CN112860432A (en) Process management method, device and server
CN112019630B (en) Load balancing method and device
CN112256420A (en) Task allocation method and device and electronic equipment

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