[go: up one dir, main page]

CN109495568B - Data acquisition method, data acquisition device, server and storage medium - Google Patents

Data acquisition method, data acquisition device, server and storage medium Download PDF

Info

Publication number
CN109495568B
CN109495568B CN201811377278.5A CN201811377278A CN109495568B CN 109495568 B CN109495568 B CN 109495568B CN 201811377278 A CN201811377278 A CN 201811377278A CN 109495568 B CN109495568 B CN 109495568B
Authority
CN
China
Prior art keywords
data transmission
layer node
node
upper node
transmission index
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
CN201811377278.5A
Other languages
Chinese (zh)
Other versions
CN109495568A (en
Inventor
王志国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201811377278.5A priority Critical patent/CN109495568B/en
Publication of CN109495568A publication Critical patent/CN109495568A/en
Application granted granted Critical
Publication of CN109495568B publication Critical patent/CN109495568B/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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • 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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

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

Abstract

本发明实施例提供了一种数据获取方法、数据获取装置、服务器及存储介质,其中方法包括:确定当前探测周期的各个上层节点的第一数据传输指标;针对各个上层节点中的每个上层节点,对上层节点的第一数据传输指标进行预处理和稳定性处理,得到上层节点的第二数据传输指标;基于各个上层节点的第二数据传输指标的大小,对各个上层节点进行排序;向排序后的各个上层节点中位序第一的上层节点发送数据获取请求,以使位序第一的上层节点返回与数据获取请求对应的请求数据。本发明实施例能够提高各上层节点的排序稳定性。

Figure 201811377278

Embodiments of the present invention provide a data acquisition method, a data acquisition device, a server, and a storage medium, wherein the method includes: determining a first data transmission index of each upper-layer node in a current detection period; for each upper-layer node in each upper-layer node , perform preprocessing and stability processing on the first data transmission index of the upper-layer node, and obtain the second data transmission index of the upper-layer node; based on the size of the second data transmission index of each upper-layer node, sort each upper-layer node; The upper-layer node with the first rank among the subsequent upper-layer nodes sends a data acquisition request, so that the upper-layer node with the first rank returns the request data corresponding to the data acquisition request. The embodiment of the present invention can improve the sorting stability of each upper-layer node.

Figure 201811377278

Description

Data acquisition method, data acquisition device, server and storage medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data acquisition method, a data acquisition apparatus, a server, and a storage medium.
Background
The rapid development of internet technology brings great convenience to users, but at the same time, the requirements of users on the service quality and the transmission speed of the internet are higher and higher, which results in that although the network bandwidth is continuously increased, the data transmission speed is still slow as the number of users is continuously increased and influenced by factors such as the load of a Web server, the transmission distance and the like. The Content Delivery Network (CDN) technology can optimize Network data transmission quality, thereby increasing data transmission speed.
As shown in fig. 1, a CDN is typically deployed with a plurality of edge nodes and a plurality of upper nodes, where an edge node may refer to a cache server located near a user, and is typically deployed at a network edge of the entire CDN, and is used to obtain data from the upper nodes and cache the data; the upper node may refer to an origin server, and is typically deployed in a data center of the entire CDN in a layered manner, and is responsible for caching data pulled back from the origin.
When the edge node of the CDN does not have cached data, it needs to acquire data from an upper node, and the data acquisition process is: the edge nodes periodically detect and compare the data transmission time of each upper node as a data transmission index, and sequence each upper node based on the data transmission index, so as to acquire data from the upper node with the first bit sequence.
In the related art, the edge nodes are directly sorted based on the original data transmission indexes of the upper nodes, so that once the periodically detected original data transmission indexes of the upper nodes change, the bit sequences of the upper nodes will fluctuate, which may cause that the upper nodes selected by the edge node each time are different. However, in fact, the required data of the edge node is not stored in each upper node, and once the required data is not stored in the upper node selected by the edge node, the upper node needs to further request the required data from the upper node, and then the required data is transmitted back to the edge node layer by layer, which results in an increase in data acquisition flow and an increase in data acquisition time. That is, due to the poor stability of the ordering of the upper nodes in the related art, the speed of the edge node when acquiring data from the upper nodes is susceptible to influence.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a data acquisition method, a data acquisition apparatus, a server, and a storage medium, so as to improve the ordering stability of each upper node. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a data acquisition method, including:
determining a first data transmission index of each upper node of a current detection period;
for each upper node in each upper node, preprocessing and stabilizing the first data transmission index of the upper node to obtain a second data transmission index of the upper node;
sorting each upper node based on the size of the second data transmission index of each upper node;
and sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes so as to enable the upper node with the first bit sequence to return request data corresponding to the data acquisition request.
Optionally, the preprocessing and the stability processing on the first data transmission indicator of the upper node to obtain a second data transmission indicator of the upper node include:
normalizing the first data transmission index of the upper node to obtain a third data transmission index of the upper node in the current detection period;
accumulating all the third data transmission indexes of the upper node within a preset time length to obtain a fourth data transmission index of the upper node; the preset time length comprises a current detection period and a plurality of historical detection periods;
and performing stability processing on the fourth data transmission index of the upper node to obtain a second data transmission index of the upper node.
Optionally, the step of performing normalization processing on the first data transmission indicator of the upper node to obtain a third data transmission indicator of the upper node in the current probing period includes:
based on a first preset expression, carrying out normalization processing on the first data transmission index of the upper node;
wherein the first preset expression is as follows:
Figure BDA0001871054430000031
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000036
a third data transmission index indicating an ith upper node among the respective upper nodes; t is tiA first data transmission indicator representing the ith upper node; t is tminA first data transmission index indicating that the first data transmission index is minimum in all upper nodes; i is an integer greater than 0.
Optionally, the step of performing accumulation processing on all the third data transmission indexes of the upper node within a preset time length to obtain a fourth data transmission index of the upper node includes:
accumulating all the third data transmission indexes of the upper node within a preset time length through a second preset expression;
wherein the second preset expression is:
Figure BDA0001871054430000032
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000033
a fourth data transmission index indicating an ith upper node among the respective upper nodes; period represents a preset time length; j represents the number of detection periods contained in the preset time length; alpha represents a first preset parameter;
Figure BDA0001871054430000034
a third data transmission index representing the ith upper node; i is an integer greater than 0.
Optionally, the step of performing stability processing on the fourth data transmission indicator of the upper node to obtain a second data transmission indicator of the upper node includes:
performing stability processing on the fourth data transmission index of the upper node through a third preset expression;
wherein the third preset expression is:
Figure BDA0001871054430000035
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000037
a second data transmission index representing an ith upper node among the respective upper nodes; x represents a preset base number;
Figure BDA0001871054430000038
a fourth data transmission index representing the ith upper node; i is an integer greater than 0.
Optionally, after performing the stability processing on the fourth data transmission indicator of the upper node to obtain the second data transmission indicator of the upper node, the method includes:
judging whether the upper node is in a first order in the sequence of each upper node in the previous detection period of the current detection period;
under the condition that the upper node is not located in the first order, performing weighting processing on the second data transmission index obtained by the upper node in the current detection period to obtain a weighted second data transmission index;
and under the condition that the upper node is positioned in the first order, keeping the second data transmission index obtained by the upper node in the current detection period.
Optionally, the step of sorting each upper node based on the size of the second data transmission indicator of each upper node includes:
determining the size relationship of the designated data transmission indexes in each upper node; the designated data transmission indexes in the upper node are as follows: the weighted processed second data transmission indicator or the retained second data transmission indicator;
and sequencing the nodes of the upper layer according to the determined size relationship.
Optionally, the step of performing weighting processing on the second data transmission indicator obtained by the upper node in the current probing period to obtain a weighted second data transmission indicator includes:
weighting the second data transmission indexes of the upper nodes which are not positioned in the first bit sequence in the sequence of each upper node in the previous detection period of the current detection period through a fourth preset expression;
the fourth preset expression is as follows:
Figure BDA0001871054430000041
wherein m represents a weighting coefficient; countiRepresenting the number of times that the ith upper node in each upper node is located in the first bit sequence within the preset time length; count*Representing the total times of the upper nodes positioned in the first bit sequence in the previous detection period of the current detection period, wherein the upper nodes are sequenced into the first bit sequence within the preset time length; beta represents a second preset parameter; gamma represents a third preset parameter; i is an integer greater than 0.
In a second aspect, an embodiment of the present invention provides a data acquisition apparatus, including:
the determining module is used for determining a first data transmission index of each upper node of the current detection period;
the processing module is used for preprocessing and stabilizing the first data transmission index of each upper node aiming at each upper node in each upper node to obtain a second data transmission index of each upper node;
a sorting module, configured to sort each upper node based on a size of the second data transmission indicator of each upper node;
and the sending module is used for sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes so as to enable the upper node with the first bit sequence to return request data corresponding to the data acquisition request.
Optionally, the processing module includes:
the normalization processing submodule is used for performing normalization processing on the first data transmission index of the upper node to obtain a third data transmission index of the upper node in the current detection period;
the accumulation processing submodule is used for carrying out accumulation processing on all the third data transmission indexes of the upper node within a preset time length to obtain a fourth data transmission index of the upper node; the preset time length comprises a current detection period and a plurality of historical detection periods;
and the stability processing submodule is used for performing stability processing on the fourth data transmission index of the upper node to obtain a second data transmission index of the upper node.
Optionally, the normalization processing sub-module is configured to:
based on a first preset expression, carrying out normalization processing on the first data transmission index of the upper node;
wherein the first preset expression is as follows:
Figure BDA0001871054430000051
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000052
a third data transmission index indicating an ith upper node among the respective upper nodes; t is tiA first data transmission indicator representing the ith upper node; t is tminA first data transmission index indicating that the first data transmission index is minimum in all upper nodes; i is an integer greater than 0.
Optionally, the accumulation processing sub-module is configured to:
accumulating all the third data transmission indexes of the upper node within a preset time length through a second preset expression;
wherein the second preset expression is:
Figure BDA0001871054430000061
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000062
a fourth data transmission index indicating an ith upper node among the respective upper nodes; period represents a preset time length; j represents the number of detection periods contained in the preset time length; alpha represents a first preset parameter;
Figure BDA0001871054430000063
a third data transmission index representing the ith upper node; i is an integer greater than 0.
Optionally, the stability processing sub-module is specifically configured to:
performing stability processing on the fourth data transmission index of the upper node through a third preset expression;
the third preset expression is as follows:
Figure BDA0001871054430000064
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000065
a second data transmission index representing an ith upper node among the respective upper nodes; x represents a preset base number;
Figure BDA0001871054430000066
a fourth data transmission index representing the ith upper node; i is an integer greater than 0.
Optionally, the apparatus further comprises:
the judging module is used for judging whether the upper node is positioned in a first order in the sequence of each upper node in the previous detection period of the current detection period;
the weighting processing module is used for weighting the second data transmission index obtained by the upper node in the current detection period under the condition that the upper node is not located in the first order to obtain a weighted second data transmission index;
and a reserving module, configured to reserve the second data transmission indicator obtained by the upper node in the current probing period when the upper node is located in the first order.
Optionally, the sorting module includes:
the determining submodule is used for determining the size relationship of the specified data transmission indexes in each upper-layer node; the designated data transmission indexes in the upper node are as follows: the weighted processed second data transmission indicator or the retained second data transmission indicator;
and the sequencing submodule is used for sequencing each upper-layer node according to the determined size relationship.
Optionally, the weighting processing module is configured to:
weighting the second data transmission indexes of the upper nodes which are not positioned in the first bit sequence in the sequence of each upper node in the previous detection period of the current detection period through a fourth preset expression;
wherein the fourth preset expression is:
Figure BDA0001871054430000071
wherein m represents a weighting coefficient; countiRepresenting the number of times that the ith upper node in each upper node is located in the first bit sequence within the preset time length; count*Representing the total times of the upper nodes positioned in the first bit sequence in the previous detection period of the current detection period, wherein the upper nodes are sequenced into the first bit sequence within the preset time length; beta represents a second preset parameter; gamma represents a third preset parameter; i is an integer greater than 0.
In a third aspect, an embodiment of the present invention provides a server, which includes a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor executes the machine-executable instructions to implement the method steps of the data acquisition method provided in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of the data acquisition method provided in the first aspect are implemented.
In a fifth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to perform the method steps of the data acquisition method provided in the first aspect.
In a sixth aspect, an embodiment of the present invention further provides a computer program, which when run on a computer, causes the computer to perform the method steps of the data acquisition method provided in the first aspect.
In the data acquisition method, the data acquisition device, the server and the storage medium provided by the embodiment of the invention, after the first data transmission index of each upper node in the current detection period is determined, the second data transmission index is obtained by preprocessing and stabilizing the first data transmission index, and because the second data transmission index is less prone to fluctuation compared with the first data transmission index, the bit sequence of each upper node is more stable after each upper node is sequenced, so that the possibility that the edge node acquires required data from the same upper node is increased, the situation that the upper node further requests the required data from the upper node and then transmits the required data back to the edge node layer by layer due to the fact that the required data is not stored in the switched upper node after the upper node is switched is avoided, so that the data acquisition process is reduced, the data acquisition time is reduced, and the data acquisition cost is reduced. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a CDN network architecture in the related art;
fig. 2 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating step S102 according to an embodiment of the present invention;
fig. 4 is another schematic flow chart of a data acquisition method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of step S206 in the data acquisition method according to the embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a processing module according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a sorting module according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the CDN in the related art, a plurality of available upper layer node IPs are usually configured for an edge node, that is, the edge node may select one of the plurality of upper layer nodes that has the best data transmission index, and obtain data from the selected upper layer node. When determining the transmission quality of each upper node, the edge node may periodically send a probe request to each upper node through its own probe program, and each upper node returns a preset file after receiving the probe request, where the size of the preset file is usually tens of KB (kilobytes) to MB (megabytes). And the upper nodes determine the data transmission indexes of the upper nodes based on the information such as the downloading speed, the downloading time and the like of the preset file returned by the upper nodes, sort the upper nodes and acquire data from the upper node with the first bit sequence. In the next probing period, the transmission quality of each upper node changes, so the bit sequence of each upper node after reordering changes.
That is to say, in the related art, when the upper nodes are sequenced in each probing cycle, the bit sequences of the upper nodes fluctuate frequently, and there may be a situation that the upper nodes with the first bit sequence after each sequencing are different, so that the upper nodes selected by the edge node each time are different, which will cause that once the upper nodes selected by the edge node do not store the required data, the upper nodes need to further request the required data from the upper nodes, and then return to the edge node one by one, which increases the data acquisition flow, and prolongs the data acquisition time.
For example, in a previous detection period of the current detection period, the upper node a is located in the first order, the upper node B is located in the second order, data required by the edge node is stored in the upper node a, and data required by the edge node is not stored in the upper node B, so that the edge node can directly obtain the required data from the upper node a located in the first order; in the current detection period, due to the fluctuation of the bit sequence, the upper node B is arranged to the first bit sequence, and the upper node a is arranged to the second bit sequence, when the edge node acquires data from the upper node B located in the first bit sequence, since the upper node B does not store the data required by the edge node, the upper node B needs to further request the required data from the upper node B (i.e., download the cold file), and then return the required data layer by layer.
In addition, in the CDN in the related art, upper nodes with large differences in data transmission indexes can be distinguished, but upper nodes with small differences in data transmission indexes are difficult to distinguish, and upper nodes with similar data transmission indexes need to be manually separated by a manual method, which increases the operation cost of the CND provider.
Method example 1
Referring to this, as shown in fig. 2, an embodiment of the present invention provides a data obtaining method, which may be applied to an edge node in a CDN network, and of course, may also be applied to other types of devices having a server function, where the method may include the following steps:
s101, determining first data transmission indexes of all upper nodes in the current detection period.
In the embodiment of the present invention, an edge node is taken as an example for description. The edge node can be configured with a plurality of available upper layer node IPs, and when a user needs to acquire data, if the edge node does not have the cached required data, the edge node can acquire the required data to the upper layer node. The edge node may refer to a cache server located near a user, and is usually deployed at a network edge of the entire CDN, and is used to obtain data from an upper node and cache the data; the upper node may refer to an origin server, that is, a server storing origin data, and is typically deployed in a data center of the entire CDN hierarchically to store data.
The edge node may detect the original data transmission indicator of each upper node, for example, periodically send a detection request to each upper node through a self-installed detection program, and each upper node returns a preset file after receiving the detection request, where the size of the preset file is usually several KB to several tens of KB, and the preset file is used for analyzing the transmission speed of the link. The upper node determines an original data transmission index of each upper node, namely the first data transmission index in the embodiment of the invention, based on the information such as the download speed and the download time of the preset file returned by each upper node.
The above-described detection period may be, for example, 10 seconds, 1 minute, 3 minutes, or the like. Taking 1 minute as an example, the edge node may send a probe request to each upper node every 1 minute, thereby determining the first data transmission index of each upper node every one minute. Of course, a server administrator may flexibly set the detection period according to actual service needs, and the embodiment of the present invention is not described herein again. The current probing period may be one of the probing periods currently referred to in the plurality of probing periods.
Wherein the first data transmission index may include: the transmission time of the data. It is easy to understand that if the transmission time of data is small, the edge node can take less time to acquire the required data, and therefore the data transmission index is high, which plays a positive role in improving the user experience. Of course, other indicators than the transmission time of the data, which change with the change of the transmission time of the data, may be used to evaluate the first data transmission indicator, for example, the transmission speed of the data. This is because, as the transmission time of data is shortened, the transmission speed of data is increased. Of course, other than the implementations shown in the examples given, ways of implementing this feature are within the scope of the embodiments of the invention.
S102, aiming at each upper layer node in each upper layer node, preprocessing and stabilizing the first data transmission index of the upper layer node to obtain a second data transmission index of the upper layer node.
In the embodiment of the invention, after the original data transmission indexes of each upper node, namely the first data transmission indexes of each upper node, are obtained, the first data transmission indexes can be preprocessed and subjected to stability processing, so that the new data transmission indexes obtained after processing, namely the second data transmission indexes, have smaller volatility, namely have higher stability. Illustratively, the preprocessing may include two parts of normalization processing and accumulation processing of the data.
S103, sorting the upper nodes based on the size of the second data transmission index of each upper node.
In the steps of the embodiment of the present invention, after the second data transmission indexes of the upper nodes are obtained, the sizes of the second data transmission indexes of the upper nodes are different, so that the upper nodes can be sorted according to the order of the sizes of the second data transmission indexes.
For example, if the obtained second data transmission index of the upper node a is a, the obtained second data transmission index of the upper node B is B, the obtained second data transmission index of the upper node C is C, and a > B > C, the above three upper nodes may be sorted as follows: upper node a-upper node B-upper node C, where upper node a is in a first order, upper node B is in a second order, and upper node C is in a third order.
And S104, sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes so as to enable the upper node with the first bit sequence to return request data corresponding to the data acquisition request.
After the upper nodes are sequenced, the edge node can determine the upper node with the first bit sequence, and further can send a data acquisition request to the upper node. After receiving the data acquisition request, the upper node with the first bit order may return request data corresponding to the data acquisition request to the edge node. The overall analysis shows that the stability of the second data transmission index is higher than that of the first data transmission index, so that after the upper nodes are sequenced at each time, the bit sequences of the upper nodes are more stable, the upper nodes of the first bit sequences are more difficult to change, the probability that the edge nodes acquire required data from the same upper node is increased, and the occurrence of cold file downloading is reduced.
As an optional implementation manner of the embodiment of the present invention, as shown in fig. 3, the step S102 specifically includes:
and S1021, performing normalization processing on the first data transmission index of the upper node to obtain a third data transmission index of the upper node in the current detection period.
After the edge node determines the first data transmission index of each upper node, normalization processing may be performed on the determined first data transmission index, that is, a dimensional expression is converted into a dimensionless expression after being transformed, so as to simplify processing, and the normalization processing may be a part of the preprocessing.
Illustratively, when the first data transmission index is a transmission time of data, it is a dimensional value, and the dimensional first data transmission index can be converted into a dimensionless third data transmission index by a normalization process.
Specifically, the first data transmission index of each upper node may be divided by a value having the same dimension, so as to eliminate the dimension and obtain a dimensionless value. Of course, for other examples of the first data transmission index in the embodiments, the above method for eliminating the dimension may be adopted to obtain the third data transmission index of each upper node.
As an optional implementation manner of the embodiment of the present invention, normalization processing may be performed on a first data transmission index of an upper node based on a first preset expression;
wherein the first preset expression is as follows:
Figure BDA0001871054430000121
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000122
a third data transmission index indicating an ith upper node among the respective upper nodes; t is tiA first data transmission index representing an ith upper node; t is tminIndicating a first data transmission index at which the first data transmission index is smallest among all upper nodes.
S1022, performing accumulation processing on all third data transmission indexes of the upper node within the preset time duration to obtain a fourth data transmission index of the upper node; the preset time length comprises a current detection period and a plurality of historical detection periods.
As can be seen from the foregoing, the edge node may periodically probe each upper node, that is, after each probing, the first data transmission indicator corresponding to each upper node may be determined, so as to obtain a third data transmission indicator. Then, within a preset time length, a plurality of third data transmission indexes of each upper node can be obtained.
Therefore, all the third data transmission indexes of the upper nodes within the preset time length can be accumulated to obtain the fourth data transmission indexes of the upper nodes, and the accumulation process can be a part of the preprocessing.
For example, the detection period is 1 minute, the preset time length is 90 minutes, and for the upper node a, 90 third data transmission indexes can be obtained, and through accumulation processing on the 90 third data transmission indexes, in the accumulation processing process, each third data transmission index can be used as an index of a preset parameter, so as to obtain a fourth data transmission index.
As can be seen from the above example, the preset time length may include one current detection period and a plurality of historical detection periods, for example, within 90 minutes of the preset time length, there are 1 current detection period and 89 historical detection periods. Of course, the server administrator may flexibly set the preset time length according to the actual service requirement, for example, the preset time length may also be set to 60 minutes or 120 minutes, which is not described herein again in the embodiments of the present invention.
Through accumulation processing of the third data transmission indexes, the calculated fourth data transmission indexes are linked with all the third data transmission indexes in the preset time length, and therefore the fourth data transmission indexes have smaller fluctuation trend compared with the first data transmission indexes.
As an optional implementation manner of the embodiment of the present invention, all third data transmission indexes of each upper node within a preset time length may be accumulated through a second preset expression;
wherein the second preset expression is:
Figure BDA0001871054430000131
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000141
a fourth data transmission index indicating an ith upper node among the respective upper nodes; period represents a preset time length, for example, 90 min; j represents the number of detection cycles included in the preset time length, for example, 90; α represents a first preset parameter, e.g. 1.7, the parameter being adjustable;
Figure BDA0001871054430000142
a third data transmission index representing an ith upper node; i is an integer greater than 0.
And S1023, performing stability processing on the fourth data transmission index of the upper node to obtain a second data transmission index of the upper node.
In the embodiment of the present invention, after the fourth data transmission indexes of each upper node are obtained, the stability processing may be continuously performed on the fourth data transmission indexes of each upper node, so as to further reduce the fluctuation range of the numerical value. In the stability processing process, the fourth data transmission index may be used as a true number of the preset logarithm function, so as to obtain a second data transmission index.
After the stability processing, the size range of the second data transmission index is smaller than that of the fourth data transmission index, so that compared with the fourth data transmission index, the second data transmission index has smaller volatility, that is, the second data transmission index has higher stability.
As an optional implementation manner of the embodiment of the present invention, stability processing may be performed on the fourth data transmission index of each upper node through a third preset expression;
wherein the third preset expression is:
Figure BDA0001871054430000143
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000144
a second data transmission index representing an ith upper node among the respective upper nodes; x represents a preset base number which can be 2, a natural constant e or 10;
Figure BDA0001871054430000145
a fourth data transmission index representing an ith upper node; i is an integer greater than 0.
In the data acquisition method provided by the embodiment of the invention, after the first data transmission indexes of all upper nodes in the current detection period are determined, the second data transmission index is obtained by preprocessing and stabilizing the first data transmission index, since the second data transmission indicator is less prone to fluctuations than the first data transmission indicator, and, therefore, after each upper node is sequenced, the bit sequence of each upper node is more stable, thereby increasing the possibility that the edge node acquires the required data from the same upper node and avoiding the phenomenon that after the upper node is switched, because the switched upper node does not store the required data, the upper node needs to further request the required data from the upper node, and then the data are transmitted back to the edge nodes layer by layer, so that the data acquisition process is reduced, the data acquisition time is shortened, and the data acquisition cost is reduced.
Method example 2
As shown in fig. 4, an embodiment of the present invention further provides a data obtaining method, which may be applied to an edge node in a CDN network, and certainly may also be applied to other types of devices having a server function, where the method may include the following steps:
s201, determining first data transmission indexes of each upper-layer node of the current detection period.
In the embodiment of the present invention, an edge node is taken as an example for description. The edge node can be configured with a plurality of available upper layer node IPs, and when a user needs to acquire data, if the edge node does not have the cached required data, the edge node can acquire the required data to the upper layer node. The edge node may refer to a cache server located near a user, and is usually deployed at a network edge of the entire CDN, and is used to obtain data from an upper node and cache the data; the upper node may refer to an origin server, that is, a server storing origin data, and is typically deployed in a data center of the entire CDN hierarchically to store data.
The edge node may detect the data transmission indicator of each upper node, for example, periodically send a probe request to each upper node through a probe program installed in the edge node, and each upper node returns a preset file after receiving the probe request, where the preset file has a size of usually tens of KB to several MB, for example, 2MB, and is used for analyzing the transmission speed of the link. The upper node determines a data transmission index of each upper node, namely the first data transmission index in the embodiment of the invention, based on the information such as the download speed and the download time of the preset file returned by each upper node.
The above-described detection period may be, for example, 10 seconds, 1 minute, 3 minutes, or the like. Taking 1 minute as an example, the edge node may send a probe request to each upper node every 1 minute, thereby determining the first data transmission index of each upper node every one minute. Of course, a server administrator may flexibly set the detection period according to actual service needs, and the embodiment of the present invention is not described herein again. The current probing period may be one of the probing periods currently referred to in the plurality of probing periods.
Wherein the first data transmission index may include: the transmission time of the data. It is easy to understand that if the transmission time of data is small, the edge node can take less time to acquire the required data, and therefore the data transmission index is high, which plays a positive role in improving the user experience. Of course, other indicators than the transmission time of the data, which change with the change of the transmission time of the data, may be used to evaluate the first data transmission indicator, for example, the transmission speed of the data. This is because, as the transmission time of data is shortened, the transmission speed of data is increased. Of course, other than the implementations shown in the examples given, ways of implementing this feature are within the scope of the embodiments of the invention.
S202, aiming at each upper layer node in each upper layer node, preprocessing and stabilizing the first data transmission index of the upper layer node to obtain a second data transmission index of the upper layer node.
In the embodiment of the invention, after the original data transmission indexes of each upper node, namely the first data transmission indexes of each upper node, are obtained, the first data transmission indexes can be preprocessed and subjected to stability processing, so that the new data transmission indexes obtained after processing, namely the second data transmission indexes, have smaller volatility, namely have higher stability. Illustratively, the preprocessing may include two parts of normalization processing and accumulation processing of the data.
S203, judging whether the upper node is in the first bit sequence in the sequence of each upper node in the previous detection period of the current detection period.
Before sequencing each upper node, the embodiment of the invention can firstly judge whether the upper node is in the first order in the sequencing of each upper node in the previous detection period of the current detection period, and can carry out different processing according to the judgment result.
And S204, under the condition that the upper node is not located in the first order, performing weighting processing on the second data transmission index obtained by the upper node in the current detection period to obtain the weighted second data transmission index.
For nodes not located in the first order in the previous probing cycle of the current probing cycle, the difference of the second data transmission indicator between the nodes not located in the first order and the nodes located in the first order in the previous probing cycle may be increased by weighting in the calculation of the current cycle. For example, the second data transmission indicator may be multiplied by a weighting factor greater than 1, which may be considered a penalty factor.
As an optional implementation manner of the embodiment of the present invention, a fourth preset expression may be used to perform weighting processing on second data transmission indexes of upper nodes that are not located in the first bit sequence in the sequence of each upper node in the previous detection period of the current detection period;
the fourth preset expression is:
Figure BDA0001871054430000161
wherein m represents a weighting coefficient; countiRepresenting the times of the ith upper node in each upper node in the first bit sequence within a preset time length; count*Representing the total times of sequencing upper nodes positioned in the first bit sequence into the first bit sequence in the previous detection period of the current detection period within a preset time length; beta represents a second preset parameter, for example, 1.4, the parameter is adjustable; gamma represents a third preset parameter, for example, 1.4, the parameter is adjustable, wherein as beta and gamma become larger, the sequencing stability is increased and the sensitivity is reduced; i is an integer greater than 0.
And S205, under the condition that the upper node is located in the first order, keeping a second data transmission index obtained by the upper node in the current detection period.
For an upper node located in the first bit sequence in a previous probing period of the current probing period, the second data transmission indicator obtained by the upper node in the current probing period may be retained. Through the above operation, if an upper node is located in the first order in the previous probing period of the current probing period, the probability that the upper node is located in the first order in the current probing period is higher than the probability of other upper nodes, that is, the stability of the upper node originally located in the first order in the subsequent probing period is further improved.
S206, based on the size of the second data transmission index of each upper node, sequencing each upper node.
In the steps of the embodiment of the present invention, after the second data transmission indexes of the upper nodes are obtained, the sizes of the second data transmission indexes of the upper nodes are different, so that the upper nodes can be sorted according to the order of the sizes of the second data transmission indexes.
Illustratively, if the obtained second data transmission index of the upper node a is a, the obtained second data transmission index of the upper node B is B, the obtained second data transmission index of the upper node C is C, and C > B > a, when the smaller the value is, the better the detection quality is, the above three upper nodes may be sorted: upper node a-upper node B-upper node C, where upper node a is in a first order, upper node B is in a second order, and upper node C is in a third order. Of course, when the values of a, b and c are larger, the detection quality is better, the sequencing principle is the same, and the description is omitted here.
As an optional implementation manner of the embodiment of the present invention, as shown in fig. 5, the step S206 may specifically include:
s2061, determining the size relation of the specified data transmission indexes in each upper node.
In the embodiment of the present invention, the designated data transmission index in the upper node may be: the weighted second data transmission indicator or the retained second data transmission indicator is obtained as a plurality of weighted second data transmission indicators and one retained second data transmission indicator, so that the magnitude relationship between them can be determined.
S2062, sequencing the upper nodes according to the determined size relationship.
Each second data transmission index can correspond to one upper node, so that the upper nodes can be sequenced according to the determined magnitude relation among the second data transmission indexes.
And S207, sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes, so that the upper node with the first bit sequence returns request data corresponding to the data acquisition request.
After the upper nodes are sequenced, the edge node can determine the upper node with the first bit sequence, and further can send a data acquisition request to the upper node. After receiving the data acquisition request, the upper node with the first bit order may return request data corresponding to the data acquisition request to the edge node. The overall analysis shows that the stability of the second data transmission index is higher than that of the first data transmission index, so that after the upper nodes are sequenced at each time, the bit sequence of each upper node is more stable, the upper nodes of the first bit sequence are more difficult to change, the probability that the edge nodes acquire required data from the same upper node is increased, and the occurrence of cold file downloading is reduced.
In the data acquisition method provided in the embodiment of the present invention, after determining whether an upper node is located in the sequence of each upper node in a previous detection period of a current detection period after a first order, if the upper node is not located in the first order, a second data transmission index obtained by the upper node in the current detection period is weighted, so as to increase a difference between the second data transmission index in the previous detection period between the upper node not located in the first order and the upper node located in the first order; and under the condition that the upper node is positioned in the first bit sequence, a second data transmission index obtained by the upper node in the current detection period is reserved, so that the stability of the upper node which is originally positioned in the first bit sequence in the subsequent detection period is further improved, and the possibility that the edge node acquires the required data from the same upper node is further increased.
Apparatus example 1
Corresponding to the above method embodiment, the embodiment of the present invention also provides a corresponding device embodiment.
As shown in fig. 6, an embodiment of the present invention provides a data acquisition apparatus, including:
a determining module 301, configured to determine a first data transmission indicator of each upper node of the current probing period.
The processing module 302 is configured to, for each upper node in each upper node, perform preprocessing and stability processing on the first data transmission indicator of the upper node to obtain a second data transmission indicator of the upper node.
The sorting module 303 is configured to sort each upper node based on the size of the second data transmission indicator of each upper node.
A sending module 304, configured to send a data obtaining request to an upper node with a first bit order in the sorted upper nodes, so that the upper node with the first bit order returns request data corresponding to the data obtaining request.
As shown in fig. 7, the processing module 302 includes:
the normalization processing submodule 3021 is configured to perform normalization processing on the first data transmission indicator of the upper node, so as to obtain a third data transmission indicator of the upper node in the current detection period.
The accumulation processing submodule 3022 is configured to perform accumulation processing on all third data transmission indexes of the upper node within a preset time length to obtain a fourth data transmission index of the upper node; the preset time length comprises a current detection period and a plurality of historical detection periods.
The stability processing submodule 3023 is configured to perform stability processing on the fourth data transmission indicator of the upper node to obtain a second data transmission indicator of the upper node.
The normalization processing submodule 3021 is configured to:
based on a first preset expression, carrying out normalization processing on a first data transmission index of an upper node;
wherein the first preset expression is as follows:
Figure BDA0001871054430000191
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000192
a third data transmission index indicating an ith upper node among the respective upper nodes; t is tiA first data transmission index representing an ith upper node; t is tminA first data transmission index indicating that the first data transmission index is minimum in all upper nodes; i is an integer greater than 0.
The accumulation processing sub-module 3022 is specifically configured to:
accumulating all third data transmission indexes of the upper node within a preset time length through a second preset expression;
wherein the second preset expression is:
Figure BDA0001871054430000201
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000202
a fourth data transmission index indicating an ith upper node among the respective upper nodes; period represents a preset time length; j represents the number of detection periods contained in the preset time length; alpha represents a first preset parameter;
Figure BDA0001871054430000203
a third data transmission index representing an ith upper node; i is an integer greater than 0.
The stability processing submodule 3023 is specifically configured to:
performing stability processing on a fourth data transmission index of the upper node through a third preset expression;
the third preset expression is:
Figure BDA0001871054430000204
in the formula (I), the compound is shown in the specification,
Figure BDA0001871054430000205
a second data transmission index representing an ith upper node among the respective upper nodes; x represents a preset base number;
Figure BDA0001871054430000206
a fourth data transmission index representing an ith upper node; i is an integer greater than 0.
In the data acquisition apparatus provided in the embodiment of the present invention, after determining the first data transmission indicator of each upper node in the current probing period, the second data transmission index is obtained by preprocessing and stabilizing the first data transmission index, since the second data transmission indicator is less prone to fluctuations than the first data transmission indicator, and, therefore, after each upper node is sequenced, the bit sequence of each upper node is more stable, thereby increasing the possibility that the edge node acquires the required data from the same upper node and avoiding the phenomenon that after the upper node is switched, because the switched upper node does not store the required data, the upper node needs to further request the required data from the upper node, and then the data are transmitted back to the edge nodes layer by layer, so that the data acquisition process is reduced, the data acquisition time is shortened, and the data acquisition cost is reduced.
Apparatus example 2
An embodiment of the present invention further provides a data obtaining apparatus, and on the basis of the structure of the embodiment shown in fig. 6, as shown in fig. 8, the data obtaining apparatus may further include:
a determining module 401, configured to determine whether an upper node is located in a first order in an order of each upper node in a previous detection period of a current detection period;
a weighting processing module 402, configured to perform weighting processing on a second data transmission indicator obtained by an upper node in a current probing period under the condition that the upper node is not located in the first order, to obtain a weighted second data transmission indicator;
a retaining module 403, configured to retain the second data transmission indicator obtained by the upper node in the current probing period when the upper node is located in the first order.
As shown in fig. 9, the sorting module 303 includes:
a determining submodule 3031, configured to determine a size relationship of specified data transmission indexes in each upper node; the designated data transmission indexes in the upper nodes are as follows: a weighted second data transmission indicator or a retained second data transmission indicator.
And the sorting submodule 3052 is configured to sort, according to the determined size relationship, each upper node.
The weighting processing module 402 is configured to:
weighting second data transmission indexes of upper nodes which are not positioned in the first bit sequence in the sequence of each upper node in the previous detection period of the current detection period through a fourth preset expression;
wherein the fourth preset expression is:
Figure BDA0001871054430000211
wherein m represents a weighting coefficient; countiRepresenting the times of the ith upper node in each upper node in the first bit sequence within a preset time length; count*Representing the total times of sequencing upper nodes positioned in the first bit sequence into the first bit sequence in the previous detection period of the current detection period within a preset time length; beta represents a second preset parameter; gamma represents a third preset parameter; i is an integer greater than 0.
In the data acquisition apparatus provided in the embodiment of the present invention, after determining whether an upper node is located in the sequence of each upper node in a previous detection period of a current detection period after a first order, if the upper node is not located in the first order, a second data transmission index obtained by the upper node in the current detection period is weighted, so that a difference between the second data transmission index and the second data transmission index between the upper node not located in the first order and the upper node located in the first order in the previous detection period can be increased; and under the condition that the upper node is positioned in the first bit sequence, a second data transmission index obtained by the upper node in the current detection period is reserved, so that the stability of the upper node which is originally positioned in the first bit sequence in the subsequent detection period is further improved, and the possibility that the edge node acquires the required data from the same upper node is further increased.
An embodiment of the present invention further provides a server, which may specifically be a server, as shown in fig. 10, where the device 500 includes a processor 501 and a machine-readable storage medium 502, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor executes the machine-executable instructions to implement the steps of any one of the foregoing data acquisition methods, and optionally, may implement the following steps:
determining a first data transmission index of each upper node of a current detection period;
for each upper node in each upper node, preprocessing and stabilizing the first data transmission index of the upper node to obtain a second data transmission index of the upper node;
sequencing the upper nodes based on the size of the second data transmission index of each upper node;
and sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes so as to enable the upper node with the first bit sequence to return request data corresponding to the data acquisition request.
The machine-readable storage medium may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
After the server provided by the embodiment of the invention determines the first data transmission indexes of each upper node of the current detection period, the second data transmission index is obtained by preprocessing and stabilizing the first data transmission index, since the second data transmission indicator is less prone to fluctuations than the first data transmission indicator, and, therefore, after each upper node is sequenced, the bit sequence of each upper node is more stable, thereby increasing the possibility that the edge node acquires the required data from the same upper node and avoiding the phenomenon that after the upper node is switched, because the switched upper node does not store the required data, the upper node needs to further request the required data from the upper node, and then the data are transmitted back to the edge nodes layer by layer, so that the data acquisition process is reduced, the data acquisition time is shortened, and the data acquisition cost is reduced.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program is configured to execute the steps of any one of the data acquisition methods, and optionally, the following steps may be executed:
determining a first data transmission index of each upper node of a current detection period;
for each upper node in each upper node, preprocessing and stabilizing the first data transmission index of the upper node to obtain a second data transmission index of the upper node;
sequencing the upper nodes based on the size of the second data transmission index of each upper node;
and sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes so as to enable the upper node with the first bit sequence to return request data corresponding to the data acquisition request.
In the computer-readable storage medium provided in an embodiment of the present invention, after determining the first data transmission indicator of each upper node in the current probe period, the second data transmission index is obtained by preprocessing and stabilizing the first data transmission index, since the second data transmission indicator is less prone to fluctuations than the first data transmission indicator, and, therefore, after each upper node is sequenced, the bit sequence of each upper node is more stable, thereby increasing the possibility that the edge node acquires the required data from the same upper node and avoiding the phenomenon that after the upper node is switched, because the switched upper node does not store the required data, the upper node needs to further request the required data from the upper node, and then the data are transmitted back to the edge nodes layer by layer, so that the data acquisition process is reduced, the data acquisition time is shortened, and the data acquisition cost is reduced.
Embodiments of the present invention further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of any of the above data acquisition methods, and optionally, may perform the following steps:
determining a first data transmission index of each upper node of a current detection period;
for each upper node in each upper node, preprocessing and stabilizing the first data transmission index of the upper node to obtain a second data transmission index of the upper node;
sequencing the upper nodes based on the size of the second data transmission index of each upper node;
and sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes so as to enable the upper node with the first bit sequence to return request data corresponding to the data acquisition request.
The computer program product including instructions according to the embodiments of the present invention obtains a second data transmission index by preprocessing and stabilizing the first data transmission index after determining the first data transmission index of each upper node in the current probing period, and since the second data transmission index is less likely to fluctuate than the first data transmission index, the bit sequence of each upper node is more stable after each upper node is sequenced, thereby increasing the possibility that the edge node acquires the required data from the same upper node, and avoiding the occurrence of a situation that the upper node needs to further request the required data from the upper node and then transmits the data back to the edge node layer by layer due to the fact that the upper node is switched and the required data is not stored in the switched upper node, thereby reducing the data acquisition flow and the data acquisition time, and the data acquisition cost is reduced.
An embodiment of the present invention further provides a computer program, which when running on a computer, causes the computer to execute the steps of any one of the data acquisition methods described above, and optionally, may execute the following steps:
determining a first data transmission index of each upper node of a current detection period;
for each upper node in each upper node, preprocessing and stabilizing the first data transmission index of the upper node to obtain a second data transmission index of the upper node;
sequencing the upper nodes based on the size of the second data transmission index of each upper node;
and sending a data acquisition request to the upper node with the first bit sequence in the sequenced upper nodes so as to enable the upper node with the first bit sequence to return request data corresponding to the data acquisition request.
In the computer program including instructions according to the embodiment of the present invention, after determining the first data transmission indicator of each upper node in the current probe period, the second data transmission index is obtained by preprocessing and stabilizing the first data transmission index, since the second data transmission indicator is less prone to fluctuations than the first data transmission indicator, and, therefore, after each upper node is sequenced, the bit sequence of each upper node is more stable, thereby increasing the possibility that the edge node acquires the required data from the same upper node and avoiding the phenomenon that after the upper node is switched, because the switched upper node does not store the required data, the upper node needs to further request the required data from the upper node, and then the data are transmitted back to the edge nodes layer by layer, so that the data acquisition process is reduced, the data acquisition time is shortened, and the data acquisition cost is reduced.
For the device/server/storage medium embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1.一种数据获取方法,其特征在于,所述方法包括:1. a data acquisition method, is characterized in that, described method comprises: 确定当前探测周期的各个上层节点的第一数据传输指标;determining the first data transmission index of each upper-layer node in the current detection period; 针对各个上层节点中的每个上层节点,对所述上层节点的所述第一数据传输指标进行预处理和稳定性处理,得到所述上层节点的第二数据传输指标;For each upper-layer node in each upper-layer node, preprocessing and stability processing are performed on the first data transmission index of the upper-layer node to obtain a second data transmission index of the upper-layer node; 基于各个所述上层节点的所述第二数据传输指标的大小,对各个所述上层节点进行排序;sorting each of the upper-layer nodes based on the size of the second data transmission indicator of each of the upper-layer nodes; 向排序后的各个上层节点中位序第一的所述上层节点发送数据获取请求,以使位序第一的所述上层节点返回与所述数据获取请求对应的请求数据;Sending a data acquisition request to the upper-layer node with the first rank among the sorted upper-layer nodes, so that the upper-layer node with the first rank returns the request data corresponding to the data acquisition request; 所述对所述上层节点的所述第一数据传输指标进行预处理和稳定性处理,得到所述上层节点的第二数据传输指标包括:The performing preprocessing and stability processing on the first data transmission index of the upper-layer node, and obtaining the second data transmission index of the upper-layer node includes: 对所述上层节点的所述第一数据传输指标进行归一化处理,得到所述上层节点在当前探测周期的第三数据传输指标;normalizing the first data transmission index of the upper-layer node to obtain the third data transmission index of the upper-layer node in the current detection period; 对所述上层节点在预设时间长度内的所有所述第三数据传输指标进行累加处理,得到所述上层节点的第四数据传输指标;其中,所述预设时间长度包括当前探测周期和多个历史探测周期;Accumulate all the third data transmission indicators of the upper-layer node within a preset time length to obtain a fourth data transmission indicator of the upper-layer node; wherein the preset time length includes the current detection period and multiple a historical detection period; 对所述上层节点的所述第四数据传输指标进行稳定性处理,得到所述上层节点的第二数据传输指标;Perform stability processing on the fourth data transmission index of the upper-layer node to obtain the second data transmission index of the upper-layer node; 其中,所述对所述上层节点的所述第四数据传输指标进行稳定性处理,得到所述上层节点的第二数据传输指标的步骤,包括:Wherein, the step of performing stability processing on the fourth data transmission indicator of the upper-layer node to obtain the second data transmission indicator of the upper-layer node includes: 通过第三预设表达式,对上层节点的所述第四数据传输指标进行稳定性处理;Perform stability processing on the fourth data transmission indicator of the upper-layer node by using the third preset expression; 其中,所述第三预设表达式为:Wherein, the third preset expression is:
Figure FDA0002953465440000011
Figure FDA0002953465440000011
式中,
Figure FDA0002953465440000012
表示各个上层节点中第i个上层节点的第二数据传输指标;x表示预设底数;
Figure FDA0002953465440000013
表示所述第i个上层节点的第四数据传输指标;i为大于0的整数。
In the formula,
Figure FDA0002953465440000012
represents the second data transmission index of the i-th upper-layer node in each upper-layer node; x represents the preset base;
Figure FDA0002953465440000013
Indicates the fourth data transmission indicator of the i-th upper-layer node; i is an integer greater than 0.
2.根据权利要求1所述的方法,其特征在于,所述对所述上层节点的所述第一数据传输指标进行归一化处理,得到所述上层节点在当前探测周期的第三数据传输指标的步骤,包括:2 . The method according to claim 1 , wherein the first data transmission indicator of the upper-layer node is normalized to obtain the third data transmission of the upper-layer node in the current detection period. 3 . The steps of the indicator include: 基于第一预设表达式,对上层节点的所述第一数据传输指标进行归一化处理;Based on the first preset expression, normalize the first data transmission index of the upper-layer node; 其中,所述第一预设表达式为:Wherein, the first preset expression is:
Figure FDA0002953465440000021
Figure FDA0002953465440000021
式中,
Figure FDA0002953465440000022
表示各个上层节点中第i个上层节点的第三数据传输指标;ti表示所述第i个上层节点的第一数据传输指标;tmin表示所有上层节点中的第一数据传输指标最小的第一数据传输指标;i为大于0的整数。
In the formula,
Figure FDA0002953465440000022
represents the third data transmission index of the i-th upper-layer node in each upper-layer node; t i represents the first data transmission index of the i-th upper-layer node; t min represents the smallest first data transmission index among all the upper-layer nodes. A data transmission index; i is an integer greater than 0.
3.根据权利要求1所述的方法,其特征在于,所述对所述上层节点在预设时间长度内的所有所述第三数据传输指标进行累加处理,得到所述上层节点的第四数据传输指标的步骤,包括:3 . The method according to claim 1 , wherein the accumulative processing is performed on all the third data transmission indicators of the upper-layer node within a preset time length to obtain the fourth data of the upper-layer node. 4 . Steps to transmit metrics, including: 通过第二预设表达式,对上层节点在预设时间长度内的所有所述第三数据传输指标进行累加处理;Accumulate all the third data transmission indicators of the upper-layer node within the preset time length by using the second preset expression; 其中,所述第二预设表达式为:Wherein, the second preset expression is:
Figure FDA0002953465440000023
Figure FDA0002953465440000023
式中,
Figure FDA0002953465440000024
表示各个上层节点中第i个上层节点的第四数据传输指标;Period表示预设时间长度;j表示所述预设时间长度包含的探测周期个数;α表示第一预设参数;
Figure FDA0002953465440000025
表示所述第i个上层节点的第三数据传输指标;i为大于0的整数。
In the formula,
Figure FDA0002953465440000024
represents the fourth data transmission index of the i-th upper-layer node in each upper-layer node; Period represents the preset time length; j represents the number of detection cycles included in the preset time length; α represents the first preset parameter;
Figure FDA0002953465440000025
Indicates the third data transmission indicator of the i-th upper-layer node; i is an integer greater than 0.
4.根据权利要求1所述的方法,其特征在于,在所述对所述上层节点的所述第四数据传输指标进行稳定性处理,得到所述上层节点的第二数据传输指标之后,包括:4 . The method according to claim 1 , wherein after performing stability processing on the fourth data transmission indicator of the upper-layer node to obtain the second data transmission indicator of the upper-layer node, comprising: 5 . : 判断所述上层节点在所述当前探测周期的前一次探测周期中各个上层节点的排序中,是否位于第一位序;Judging whether the upper-layer node is in the first order in the sorting of each upper-layer node in the previous detection period of the current detection period; 在所述上层节点未位于所述第一位序的情况下,将所述上层节点在当前探测周期中得到的所述第二数据传输指标进行加权处理,得到加权处理后的第二数据传输指标;In the case that the upper-layer node is not located in the first order, weighting processing is performed on the second data transmission index obtained by the upper-layer node in the current detection cycle to obtain a weighted second data transmission index ; 在所述上层节点位于所述第一位序的情况下,保留所述上层节点在当前探测周期中得到的所述第二数据传输指标。In the case that the upper-layer node is located in the first order, the second data transmission indicator obtained by the upper-layer node in the current probe cycle is retained. 5.根据权利要求4所述的方法,其特征在于,所述基于各个所述上层节点的所述第二数据传输指标的大小,对各个所述上层节点进行排序的步骤,包括:5. The method according to claim 4, wherein the step of sorting each of the upper-layer nodes based on the size of the second data transmission index of each of the upper-layer nodes comprises: 确定各个所述上层节点中的指定数据传输指标的大小关系;所述上层节点中的指定数据传输指标为:所述加权处理后的第二数据传输指标或所保留的所述第二数据传输指标;Determine the size relationship of the designated data transmission indicators in each of the upper-layer nodes; the designated data transmission indicators in the upper-layer nodes are: the weighted second data transmission indicator or the reserved second data transmission indicator ; 根据所确定的大小关系,对各个上层节点进行排序。According to the determined size relationship, each upper-level node is sorted. 6.根据权利要求4所述的方法,其特征在于,所述将所述上层节点在当前探测周期中得到的所述第二数据传输指标进行加权处理,得到加权处理后的第二数据传输指标的步骤,包括:6 . The method according to claim 4 , wherein the second data transmission index obtained by the upper-layer node in the current detection cycle is subjected to weighting processing to obtain the weighted second data transmission index. 7 . steps, including: 通过第四预设表达式,对所述当前探测周期的前一次探测周期中各个上层节点的排序中,未位于第一位序的所述上层节点的所述第二数据传输指标进行加权处理;According to the fourth preset expression, weighting processing is performed on the second data transmission indicators of the upper-layer nodes that are not in the first order in the sorting of each upper-layer node in the previous detection period of the current detection period; 所述第四预设表达式为:The fourth preset expression is:
Figure FDA0002953465440000031
Figure FDA0002953465440000031
式中,m表示加权系数;Counti表示各个上层节点中第i个上层节点在所述预设时间长度内位于第一位序的次数;Count*表示所述当前探测周期的前一次探测周期中,位于第一位序的上层节点在所述预设时间长度内排序为第一位序的总次数;β表示第二预设参数;γ表示第三预设参数;i为大于0的整数。In the formula, m represents the weighting coefficient; Count i represents the number of times that the i-th upper-layer node in each upper-layer node is located in the first order within the preset time length; Count * represents the previous detection period of the current detection period. , the total number of times the upper-layer nodes in the first order are sorted into the first order within the preset time length; β represents the second preset parameter; γ represents the third preset parameter; i is an integer greater than 0.
7.一种数据获取装置,其特征在于,所述装置包括:7. A data acquisition device, wherein the device comprises: 确定模块,用于确定当前探测周期的各个上层节点的第一数据传输指标;a determining module, used for determining the first data transmission index of each upper node of the current detection period; 处理模块,用于针对各个上层节点中的每个上层节点,对所述上层节点的所述第一数据传输指标进行预处理和稳定性处理,得到所述上层节点的第二数据传输指标;a processing module, configured to perform preprocessing and stability processing on the first data transmission index of the upper-layer node for each of the upper-layer nodes, and obtain the second data transmission index of the upper-layer node; 排序模块,用于基于各个所述上层节点的所述第二数据传输指标的大小,对各个所述上层节点进行排序;a sorting module, configured to sort each of the upper-layer nodes based on the size of the second data transmission index of each of the upper-layer nodes; 发送模块,用于向排序后的各个上层节点中位序第一的所述上层节点发送数据获取请求,以使位序第一的所述上层节点返回与所述数据获取请求对应的请求数据;a sending module, configured to send a data acquisition request to the upper-layer node with the first rank among the sorted upper-layer nodes, so that the upper-layer node with the first rank returns the request data corresponding to the data acquisition request; 所述处理模块,包括:The processing module includes: 归一化处理子模块,用于对所述上层节点的所述第一数据传输指标进行归一化处理,得到所述上层节点在当前探测周期的第三数据传输指标;a normalization processing submodule, configured to perform normalization processing on the first data transmission index of the upper-layer node, to obtain the third data transmission index of the upper-layer node in the current detection period; 累加处理子模块,用于对所述上层节点在预设时间长度内的所有所述第三数据传输指标进行累加处理,得到所述上层节点的第四数据传输指标;其中,所述预设时间长度包括当前探测周期和多个历史探测周期;an accumulation processing submodule, configured to perform accumulation processing on all the third data transmission indicators of the upper-layer node within a preset time length to obtain a fourth data transmission indicator of the upper-layer node; wherein the preset time The length includes the current detection period and multiple historical detection periods; 稳定性处理子模块,用于对所述上层节点的所述第四数据传输指标进行稳定性处理,得到所述上层节点的第二数据传输指标;a stability processing submodule, configured to perform stability processing on the fourth data transmission index of the upper-layer node to obtain the second data transmission index of the upper-layer node; 其中,所述稳定性处理子模块,具体用于:Wherein, the stability processing sub-module is specifically used for: 通过第三预设表达式,对上层节点的第四数据传输指标进行稳定性处理;Stability processing is performed on the fourth data transmission index of the upper-layer node through the third preset expression; 第三预设表达式为:The third preset expression is:
Figure FDA0002953465440000041
Figure FDA0002953465440000041
式中,
Figure FDA0002953465440000042
表示各个上层节点中第i个上层节点的第二数据传输指标;x表示预设底数;
Figure FDA0002953465440000043
表示第i个上层节点的第四数据传输指标;i为大于0的整数。
In the formula,
Figure FDA0002953465440000042
represents the second data transmission index of the i-th upper-layer node in each upper-layer node; x represents the preset base;
Figure FDA0002953465440000043
Indicates the fourth data transmission indicator of the i-th upper-layer node; i is an integer greater than 0.
8.一种服务器,其特征在于,包括处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令,所述处理器执行所述机器可执行指令以实现权利要求1-6任一项所述的方法步骤。8. A server, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor executes the machine The instructions are executable to implement the method steps of any of claims 1-6. 9.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一项所述的方法步骤。9. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of any one of claims 1-6 are implemented .
CN201811377278.5A 2018-11-19 2018-11-19 Data acquisition method, data acquisition device, server and storage medium Active CN109495568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811377278.5A CN109495568B (en) 2018-11-19 2018-11-19 Data acquisition method, data acquisition device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811377278.5A CN109495568B (en) 2018-11-19 2018-11-19 Data acquisition method, data acquisition device, server and storage medium

Publications (2)

Publication Number Publication Date
CN109495568A CN109495568A (en) 2019-03-19
CN109495568B true CN109495568B (en) 2021-06-18

Family

ID=65697032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811377278.5A Active CN109495568B (en) 2018-11-19 2018-11-19 Data acquisition method, data acquisition device, server and storage medium

Country Status (1)

Country Link
CN (1) CN109495568B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307218A (en) * 2011-03-15 2012-01-04 陈建国 Stream media data request transmission method for multimedia telephone peer-to-peer (P2P) video-on-demand
CN102368776A (en) * 2011-11-25 2012-03-07 中国科学技术大学 Optimization function module of node list in content distribution/delivery network (CDN)
CN102594852A (en) * 2011-01-04 2012-07-18 中国移动通信集团公司 Data access method, node and system
CN104580274A (en) * 2013-10-12 2015-04-29 中国电信股份有限公司 Content replacement method, system and node in CDN
CN107493232A (en) * 2016-06-12 2017-12-19 阿里巴巴集团控股有限公司 A kind of access accelerating method and device of CDN

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013033869A1 (en) * 2011-09-09 2013-03-14 Nokia Siemens Networks Oy Method, device and system for providing and selecting candidate nodes for live streaming services

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594852A (en) * 2011-01-04 2012-07-18 中国移动通信集团公司 Data access method, node and system
CN102307218A (en) * 2011-03-15 2012-01-04 陈建国 Stream media data request transmission method for multimedia telephone peer-to-peer (P2P) video-on-demand
CN102368776A (en) * 2011-11-25 2012-03-07 中国科学技术大学 Optimization function module of node list in content distribution/delivery network (CDN)
CN104580274A (en) * 2013-10-12 2015-04-29 中国电信股份有限公司 Content replacement method, system and node in CDN
CN107493232A (en) * 2016-06-12 2017-12-19 阿里巴巴集团控股有限公司 A kind of access accelerating method and device of CDN

Also Published As

Publication number Publication date
CN109495568A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
US7299300B2 (en) System and method for dynamically selecting a level of compression for data to be transmitted
CN110362612B (en) Abnormal data detection method and device executed by electronic equipment and electronic equipment
CN114528231B (en) A method, device, electronic device and storage medium for dynamic data storage
CN104202220B (en) Method for testing pressure and device
US9774654B2 (en) Service call graphs for website performance
WO2017016423A1 (en) Real-time new data update method and device
US20150095338A1 (en) Systems and methods for categorizing exceptions and logs
CN105337786B (en) A kind of server performance detection method, device and equipment
CN110661879A (en) Node scheduling method, device and system, scheduling server and terminal equipment
TW201636839A (en) Method and apparatus of realizing resource provisioning
CN111338967A (en) Shunting test method and device, electronic equipment and storage medium
CN108322495B (en) Method, device and system for processing resource access request
CN110059939A (en) A kind of risk checking method and device
CN111654561B (en) Method and device for determining IP address number, electronic equipment and storage medium
CN113676514A (en) File source returning method and device
CN117201612A (en) Scheduling method, device and electronic equipment for content distribution network
CN108156257B (en) Information pushing method and device
CN111984896A (en) Buried point data acquisition method, device, computer equipment and readable storage medium
CN116368779A (en) Detecting network-induced contributions to quality of experience degradation
US9912564B2 (en) Methods and systems to identify bottleneck causes in applications using temporal bottleneck point detection
US20150081710A1 (en) Data typing with probabilistic maps having imbalanced error costs
CN109495568B (en) Data acquisition method, data acquisition device, server and storage medium
CN111597047A (en) Service deployment method, device, electronic equipment and storage medium
CN108287659B (en) Data sampling method and device based on real-time data stream and electronic equipment
CN110677683B (en) Video storage and video access method and distributed storage and video access system

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