WO2017181586A1 - 节点间距离的度量方法及电子设备 - Google Patents
节点间距离的度量方法及电子设备 Download PDFInfo
- Publication number
- WO2017181586A1 WO2017181586A1 PCT/CN2016/099712 CN2016099712W WO2017181586A1 WO 2017181586 A1 WO2017181586 A1 WO 2017181586A1 CN 2016099712 W CN2016099712 W CN 2016099712W WO 2017181586 A1 WO2017181586 A1 WO 2017181586A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- distance
- packet loss
- average
- loss rate
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/123—Evaluation of link metrics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/28—Flow control; Congestion control in relation to timing considerations
- H04L47/283—Flow control; Congestion control in relation to timing considerations in response to processing delays, e.g. caused by jitter or round trip time [RTT]
Definitions
- the present invention relates to the field of Internet technologies, and in particular, to a method for measuring distance between nodes and an electronic device.
- the CDN Content Delivery Network
- the CDN can redirect the user's request to the service node closest to the user based on the network traffic and the connection of each node, the load status, and the distance to the user and the response time.
- the purpose is to be able to select a node that is relatively close to the user to send the content required by the user to the user, alleviate the congestion of the network, and improve the response speed of the website.
- the download speed between two nodes is used to measure the distance between two nodes, but the download speed between the two nodes is constantly changing with time, so the nodes measured by the download speed are measured.
- the distance needs to be constantly updated to ensure the accuracy of the distance.
- every time the distance between nodes is updated a large amount of data is sent to retest the download speed between the two nodes to determine the distance between nodes.
- This inevitably requires a lot of bandwidth and other network resources to test the download speed.
- This has caused a great waste of network resources. Therefore, there is an urgent need for an update that can ensure that the distance between nodes is updated in time to ensure the distance between the nodes, thereby ensuring high-quality services for users and updating the distance between nodes with minimum network resource overhead.
- the present invention provides a method for measuring the distance between nodes and an electronic device for solving at least the technical problem of waste of network resources caused by determining the distance between nodes by the download speed between nodes in the prior art.
- an embodiment of the present invention provides a method for measuring distance between nodes, including:
- the distance between the first node and the second node is measured according to at least the average round trip time and the average packet loss rate, wherein the average round trip time and the average packet loss rate are proportional to the distance.
- the present invention provides a measurement system for distance between nodes, including:
- An average round-trip time determining module configured to send multiple test data from the first node to the second node in a preset time period to obtain an average round-trip time in the preset time period;
- the average packet loss rate determining module is configured to send multiple test data from the first node to the second node in a plurality of the preset time periods to obtain an average packet loss rate in the multiple preset time periods;
- a distance measurement module configured to measure a distance between the first node and the second node according to the average round trip time and an average packet loss rate, wherein the average round trip time, the average packet loss rate, and the The distance is directly proportional.
- an embodiment of the present invention further provides a non-volatile computer storage medium storing computer-executable instructions for performing a method for measuring a distance between nodes according to any one of the foregoing applications of the present application.
- an embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory; wherein the memory stores a program executable by the at least one processor, where the instruction is Said at least one processor is operative to enable said at least one processor to perform a method of measuring the distance between nodes of any of the above-mentioned embodiments of the present application.
- an embodiment of the present invention further provides a computer program product, the computer program product comprising a computing program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instruction When executed by a computer, the computer is caused to perform a measure of the distance between any of the above nodes.
- the method for measuring the distance between nodes and the electronic device measure the average round trip time and the average packet loss rate when communicating between the first node and the second node, and comprehensively consider the average round trip time and the average packet loss rate.
- the distance between the two nodes because the average round-trip time and the average packet loss rate can be directly obtained through the ping test with minimal network resource consumption and simple operation, thereby realizing the timely update of the distance between nodes to ensure the distance between the nodes.
- Accuracy providing users with quality
- the service completes the update of the distance between nodes with the minimum network resource overhead.
- FIG. 1 is a flowchart of an embodiment of a method for measuring inter-node distance according to the present invention
- FIG. 2 is a flowchart of another embodiment of a method for measuring inter-node distance according to the present invention.
- FIG. 3 is a flowchart of still another embodiment of a method for measuring inter-node distance according to the present invention.
- FIG. 4 is a flowchart of still another embodiment of a method for measuring inter-node distance according to the present invention.
- FIG. 5 is a schematic diagram of an embodiment of an inter-node distance measurement system according to the present invention.
- FIG. 6 is a schematic diagram of another embodiment of an inter-node distance measurement system according to the present invention.
- FIG. 7 is a schematic diagram of still another embodiment of an inter-node distance measurement system according to the present invention.
- FIG. 8 is a schematic diagram of still another embodiment of an inter-node distance measurement system according to the present invention.
- FIG. 9 is a schematic diagram showing the hardware structure of an electronic device that performs a method of measuring a distance between nodes.
- the invention is applicable to a wide variety of general purpose or special purpose computing system environments or configurations.
- the invention may be described in the general context of computer-executable instructions executed by a computer.
- a program module For example, a program module.
- program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
- the invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
- program modules can be located in both local and remote computer storage media including storage devices.
- a method for measuring the distance between nodes includes:
- the scheduling center (ie, the server) sends a plurality of test data from the first node to the second node in a preset time period to obtain an average round trip time in the preset time period;
- the scheduling center sends multiple test data from the first node to the second node in a plurality of the preset time periods to obtain an average packet loss rate in the plurality of preset time periods;
- the dispatching center measures the distance between the first node and the second node according to the average round trip time and the average packet loss rate, wherein the average round trip time and the average packet loss rate are proportional to the distance.
- the distance between the two nodes is measured, because the average round trip time is And the average packet loss rate can be directly obtained through the ping test with minimal network resource consumption and simple operation, thereby realizing the timely update of the distance between nodes to ensure the accuracy of the distance between the nodes, and providing users with high-quality services.
- the update of the distance between nodes is completed with the minimum network resource overhead.
- multiple test data is sent from the first node to the second node in a preset time period to obtain the preset time period.
- the average round trip time includes:
- the dispatching center sends multiple test data from the first node to the second node to obtain multiple round trip times;
- the dispatch center averages the plurality of round trip times to obtain the average round trip time.
- the cause is avoided.
- the effect of a single round trip time caused by an unexpected situation is too long or very short to measure the distance between the final nodes.
- multiple test data is sent from the first node to the second node in a plurality of the preset time periods to obtain the plurality of
- the average packet loss rate for a preset period of time includes:
- the scheduling center sends multiple test data from the first node to the second node in a plurality of the preset time periods to obtain multiple packet loss rates;
- the scheduling center averages the multiple packet loss rates to obtain the average packet loss rate.
- the average packet loss rate avoids the impact of the case where the packet loss rate is too large or too small due to an unexpected situation to measure the distance between the final nodes.
- the distance between the first node and the second node is measured according to at least the average round trip time and the average packet loss rate, including:
- the dispatching center assigns a first weight and a second weight to the round trip time and the packet loss rate respectively;
- the dispatching center performs weighted summation on the round trip time and the packet loss rate, and measures the distance between the first node and the second node by using the obtained sum value.
- the inter-node distances described in all embodiments of the present invention are not geographically actual distances, but rather a measure of the quality of communication between nodes, and the longer the round-trip time between the two nodes, the greater the packet loss rate. It shows that the worse the communication quality between the two nodes, the longer the distance between the nodes between the two nodes. Therefore, the longer the round-trip time between the two nodes, the weighted summation of the packet loss rate is used to measure the distance between the two nodes.
- the first weight is given by the average round trip time and the average packet loss rate, respectively. Two weights are summed and the distance between the two nodes is measured.
- the first weight and the second weight can be adjusted according to requirements to achieve a more accurate and reliable measurement of the distance between the nodes, for example, when the network environment changes.
- the proportion of the round-trip time and the packet loss rate to the measurement of the distance between nodes will inevitably change.
- the first weight can be adjusted according to the second weight.
- the weighting method achieves the adjustment of the proportion of the above factors, thereby measuring the distance between the two nodes more accurately and reliably.
- the distance between nodes can be determined by the following formula:
- L is the node spacing
- v is the download speed between nodes
- r is the average round trip time
- d is the average packet loss rate
- ⁇ 1 is the first weight
- ⁇ 2 is the second weight.
- the update of the distance L can be tested only for the average round trip time r and the average packet loss rate d between the two nodes. can.
- the download speed v between nodes can be tested once, and the pairs of average round trip time and average packet loss rate (r n , d n ) can be tested during the test download speed v (because When testing the download speed v, a large amount of test data is sent, so that multiple pairs of average round trip time and average packet loss rate can be obtained during the measurement v), where n is the pair of the average round trip time and the average packet loss rate of the test. Number, you can set n as needed.
- the first weight ⁇ 1 and the second weight ⁇ 2 are determined according to a least square method.
- a 0 1/v ⁇ 1
- the minimum is the “optimization criterion”.
- a 0 ( ⁇ Yi)/na 1 ( ⁇ Xi)/n (1-10)
- a 1 [n ⁇ (Xi Yi)-( ⁇ Xi ⁇ Yi)]/(n ⁇ Xi ⁇ 2- ⁇ Xi ⁇ Xi) (1-11)
- first weight ⁇ 1 and the second weight ⁇ 2 may be determined based on the obtained a 0 and a 1 .
- the test data sent by the first node to the second node may be historical data of a previous request and response between two nodes in an actual application, or may be a test request specially sent to measure the distance between two nodes.
- Information; also determining that the average round trip time and the average packet loss rate between the first node and the second node may also be based on historical data collected or determined based on test request information.
- the distance between the two nodes is measured by comprehensively considering the round-trip time and the packet loss rate between the two nodes (where the round-trip time is the time for a complete communication between the two nodes, and the shorter the round-trip time, the two nodes are The closer the distance is; the packet loss rate is the end of the transmission of information between the two nodes.
- the measure of integrity the greater the packet loss rate, the less complete the information transmitted between the two nodes, that is, the greater the distance between the two nodes, because the round-trip time and packet loss rate between nodes can be obtained through ping test.
- the network resources consumed by such a test are also very small, so that the distance between the two nodes can be updated in time without guaranteeing excessive waste of network resources, so that the distance value between the finally determined two nodes is more reliable. Therefore, it is possible to provide a more reliable scheduling basis for content distribution of the CDN system, and ensure the quality of service to the user, thereby contributing to the improvement of the user experience.
- the round-trip time in this embodiment is directly monitored; wherein the round-trip time is simply the time elapsed by the sender from the time the data is transmitted until the confirmation message is received from the recipient, which is an important in the computer network.
- the performance indicator indicates that the data is sent from the sender, and the sender receives the acknowledgement from the receiver (the receiver immediately sends the acknowledgement after receiving the data).
- the total delay is determined by three parts: the chain The propagation time of the road, the processing time of the end system, and the queuing and processing time in the cache of the router; wherein the values of the first two parts are relatively fixed as a TCP connection, and the queuing and processing time in the cache of the router will follow the entire network.
- the degree of congestion changes, so the change of RTT reflects the change of network congestion to some extent.
- Package Loss Rate refers to the ratio of the number of lost packets in the test to the transmitted data set.
- the calculation method is: “[(input message-output message)/input message]*100 %”
- the packet loss rate in the present embodiment is the data sent by the first node minus the data received by the second node divided by the data sent by the first node multiplied by one hundred percent.
- the present invention further provides a CDN scheduling method, which uses the method for measuring the distance between nodes of any of the above embodiments to determine the CDN node that is closest to the requesting user to be scheduled to the requesting user.
- a related function module can be implemented by a hardware processor.
- an embodiment of the present invention further provides a measurement system for distance between nodes, including:
- An average round-trip time determining module configured to send multiple test data from the first node to the second node in a preset time period to obtain an average round-trip time in the preset time period;
- the average packet loss rate determining module is configured to send multiple test data from the first node to the second node in a plurality of the preset time periods to obtain an average packet loss rate in the multiple preset time periods;
- a distance measurement module configured to measure a distance between the first node and the second node according to the average round trip time and an average packet loss rate, wherein the average round trip time, the average packet loss rate, and the The distance is directly proportional.
- the distance between the two nodes is measured, because the average round trip time is And the average packet loss rate can be directly obtained through the ping test with minimal network resource consumption and simple operation, thereby realizing the timely update of the distance between nodes to ensure the accuracy of the distance between the nodes, and providing users with high-quality services.
- the update of the distance between nodes is completed with the minimum network resource overhead.
- the measurement electronic device of the inter-node distance may be a separate server or a server cluster, and each of the foregoing modules may be a separate server or a server cluster.
- the interaction between the modules is represented by each module.
- the measuring electronic device of the inter-node distance formed by the server or the server cluster corresponding to each module includes:
- the average round-trip time determining server or server cluster is configured to send multiple test data from the first node to the second node in a preset time period to obtain an average round-trip time in the preset time period;
- the average packet loss rate determining server or server cluster is configured to send multiple test data from the first node to the second node in a plurality of the preset time periods to obtain an average lost time in the multiple preset time periods.
- a distance measurement server or a server cluster configured to measure a distance between the first node and the second node according to the average round trip time and an average packet loss rate, wherein the average round trip time, the average packet loss rate It is proportional to the distance.
- the average round trip time determining module includes:
- a round-trip time determining unit configured to send multiple test data from the first node to the second node to obtain multiple round-trip times
- a first mean unit for averaging the plurality of round trip times to obtain the average round trip time.
- the cause is avoided.
- the effect of a single round trip time caused by an unexpected situation is too long or very short to measure the distance between the final nodes.
- the average round-trip time determining module may be a server or a server cluster, where each unit may be a separate server or a server cluster.
- the interaction between the above units is represented by a server corresponding to each unit or The interaction between the server clusters, which together constitute the average round trip time determination module for metric electronics constituting the inter-node distance of the present invention.
- the average packet loss rate determining module includes:
- a packet loss rate determining unit configured to send multiple test data from the first node to the second node in a plurality of the preset time periods to obtain multiple packet loss rates
- a second averaging unit configured to average the multiple packet loss rates to obtain the average packet loss rate.
- the average packet loss rate avoids the impact of the case where the packet loss rate is too large or too small due to an unexpected situation to measure the distance between the final nodes.
- the average packet loss rate determining module may be a server or a server cluster, where each unit may be a separate server or a server cluster.
- the interaction between the above units is represented by the server corresponding to each unit.
- the distance metric module includes:
- a weight allocation unit configured to respectively assign a first weight and a second weight to the round trip time and the packet loss rate
- a weighted summation unit configured to perform weighted summation on the round trip time and the packet loss rate to measure a distance between the first node and the second node by using the obtained sum value.
- the inter-node distances described in all embodiments of the present invention are not geographically actual distances, but rather a measure of the quality of communication between nodes, and the longer the round-trip time between the two nodes, the greater the packet loss rate. It shows that the worse the communication quality between the two nodes, the longer the distance between the nodes between the two nodes. Therefore, the longer the round-trip time between the two nodes, the weighted summation of the packet loss rate is used to measure the distance between the two nodes.
- the distance measurement module may be a server or a server cluster, where each unit may be a separate server or a server cluster.
- the interaction between the above units is represented by a server or a server cluster corresponding to each unit.
- the plurality of servers or server clusters together form the above-described distance metric module for metric electronics constituting the inter-node distance of the present invention.
- the distance between the two nodes is measured by the first round weight and the average weight loss rate, and the first weight and the second weight are respectively summed, wherein the first weight and the second weight are according to the demand.
- Adjust to achieve a more accurate and reliable measure of the distance between nodes such as when the network environment changes (such as network operators adjust the network environment in different regions) round-trip time and packet loss rate to the distance between nodes
- the proportion of the influence will inevitably change.
- the adjustment of the proportion of the above factors can be realized according to the method of adjusting the first weight and the second weight, thereby measuring the distance between the two nodes more accurately and reliably.
- the distance is determined by the following formula:
- L is the node spacing
- r is the average round trip time
- d is the average packet loss rate
- ⁇ 1 is the first weight
- ⁇ 2 is the second weight.
- the embodiment of the present invention further provides a non-volatile computer storage medium storing computer-executable instructions, which can perform the method for measuring the distance between nodes in any of the foregoing method embodiments.
- FIG. 9 is a schematic structural diagram of hardware of an electronic device for performing a method for measuring distance between nodes according to an embodiment of the present invention. As shown in FIG. 9, the device includes:
- processors 910 and memory 920 one processor 910 is taken as an example in FIG.
- the apparatus for performing the measurement method of the distance between nodes may further include: an input device 930 and an output device 940.
- the processor 910, the memory 920, the input device 930, and the output device 940 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
- the memory 920 is a non-volatile computer readable storage medium, and can be used for storing a non-volatile software program, a non-volatile computer executable program, and a module, as in the method for measuring the distance between nodes in the embodiment of the present application.
- Program instructions/modules eg, average round trip time determination module, average packet loss rate determination module, and distance metric module shown in FIG. 5.
- the processor 910 executes various functional applications of the server and data processing by running non-volatile software programs, instructions, and modules stored in the memory 920, that is, a method of measuring the distance between nodes of the above method embodiments.
- the memory 920 can include a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function; the storage data area can be created by using a processing device according to a measure of the distance between the nodes. Data, etc.
- memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
- memory 920 can optionally include memory remotely located relative to processor 910, which can be connected by a network to a processing device that measures the distance between nodes. Above network Examples include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
- Input device 930 can receive input numeric or character information, as well as key signal inputs related to user settings and function control of the processing device that produces a measure of the distance between the nodes.
- Output device 940 can include a display device such as a display screen.
- the one or more modules are stored in the memory 920, and when executed by the one or more processors 910, perform a method of measuring the distance between nodes in any of the above method embodiments.
- the electronic device of the embodiment of the present application exists in various forms, including but not limited to:
- Mobile communication devices These devices are characterized by mobile communication functions and are mainly aimed at providing voice and data communication.
- Such terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
- Ultra-mobile personal computer equipment This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has mobile Internet access.
- Such terminals include: PDAs, MIDs, and UMPC devices, such as the iPad.
- Portable entertainment devices These devices can display and play multimedia content. Such devices include: audio, video players (such as iPod), handheld game consoles, e-books, and smart toys and portable car navigation devices.
- the server consists of a processor, a hard disk, a memory, a system bus, etc.
- the server is similar to a general-purpose computer architecture, but because of the need to provide highly reliable services, processing power and stability High reliability in terms of reliability, security, scalability, and manageability.
- embodiments of the present invention can be provided as a method, an electronic device, or a computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. Instructions are provided for implementing a process or multiple processes in a flowchart And/or block diagram of the steps of a function specified in a box or blocks.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明提供了一种节点间距离的度量方法,包括:在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比;相应的还提供一种节点间距离的度量电子设备;本发明的节点间距离的度量方法及电子设备解决了现有技术中度量节点间距离消耗网络资源过度、节点间距离度量不准确、不可靠的技术问题。
Description
本发明涉及互联网技术领域,特别涉及一种节点间距离的度量方法及电子设备。
CDN(Content Delivery Network,内容分发网络)是一种通过在网络各处放置节点服务器所构成的在现有的互联网基础之上的一层智能虚拟网络。CDN能够实时地根据网络流量和各节点的连接、负载状况以及到用户的距离和响应时间等综合信息将用户的请求重新导向离用户最近的服务节点上。其目的是能够选择离用户相对较近的节点向用户发送用户所需的内容,缓解网络拥挤的状况,提高网站的响应速度。
现有技术中,采用两个节点之间的下载速度来衡量两个节点之间的距离,但是,两节点之间的下载速度是在随时间不断的变化的,因此通过下载速度衡量的节点间的距离需要不断的更新才能保证该距离的准确性。但是每一次更新节点间距离都要发送大量的数据来重新测试两节点间的下载速度,以确定节点间距离,这必然要花费大量的带宽以及其它的网络资源在下载速度的测试上,这就造成了对网络资源的极大的浪费。因此,急需一种既能够保证节点间距离得到及时的更新以保证该节点间距离的准确性,从而保证为用户提供优质的服务,又能够以最小的网络资源的开销来完成节点间距离的更新的方法。
发明内容
本发明提供一种节点间距离的度量方法及电子设备,以用于至少解决现有技术中通过节点间的下载速度来确定节点间距离而造成的对网络资源的浪费的技术问题。
本发明第一方面,本发明实施例提供了一种节点间距离的度量方法,包括:
在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;
在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;
至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比。
第二方面,本发明提供一种节点间距离的度量系统,包括:
平均往返时间确定模块,用于在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;
平均丢包率确定模块,用于在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;
距离度量模块,用于至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比。
第三方面,本发明实施例还提供了一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行本申请上述任一项节点间距离的度量方法。
第四方面,本发明实施例还提供了一种电子设备,包括:至少一个处理器;以及存储器;其中,所述存储器存储有可被所述至少一个处理器执行的程序,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请上述任一项节点间距离的度量方法。
第五方面,本发明实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任一项节点间距离的度量方法。
本发明实施方式的节点间距离的度量方法及电子设备,通过探测第一节点和第二节点间通信时的平均往返时间和平均丢包率,并综合考虑平均往返时间和平均丢包率来度量两节点间的距离,由于平均往返时间和平均丢包率是可以通过网络资源消耗极少的且操作简单的ping测试直接得到的,从而实现了及时的更新节点间距离以保证该节点间距离的准确性,为用户提供优质
的服务,又以最小的网络资源开销完成了节点间距离的更新。
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明的节点间距离度量方法的一实施方式的流程图;
图2为本发明的节点间距离度量方法的另一实施方式的流程图;
图3为本发明的节点间距离度量方法的又一实施方式的流程图;
图4为本发明的节点间距离度量方法的再一实施方式的流程图;
图5为本发明的节点间距离度量系统的一实施方式的示意图;
图6为本发明的节点间距离度量系统的另一实施方式的示意图;
图7为本发明的节点间距离度量系统的又一实施方式的示意图;
图8为本发明的节点间距离度量系统的再一实施方式的示意图;
图9为执行节点间距离的度量方法的电子设备的硬件结构示意图。
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
需要说明的是,在不冲突的情况下,本申请中的实施方式及实施方式中的特征可以相互组合。
本发明可用于众多通用或专用的计算系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。
本发明可以在由计算机执行的计算机可执行指令的一般上下文中描述,
例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本发明,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”,不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
如图1所示,本发明的一实施方式的节点间距离的度量方法,包括:
调度中心(即,服务器)在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;
调度中心在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;
调度中心至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比。
本实施例中,通过探测第一节点和第二节点间通信时的平均往返时间和平均丢包率,并综合考虑平均往返时间和平均丢包率来度量两节点间的距离,由于平均往返时间和平均丢包率是可以通过网络资源消耗极少的且操作简单的ping测试直接得到的,从而实现了及时的更新节点间距离以保证该节点间距离的准确性,为用户提供优质的服务,又以最小的网络资源开销完成了节点间距离的更新。
如图2所示,在本发明的一实施方式的节点间距离的度量方法中,在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间包括:
调度中心从第一节点向第二节点发送多次测试数据得到多个往返时间;
调度中心对所述多个往返时间求平均值得到所述平均往返时间。
本实施例中,通过在预设时间段内从第一节点向第二节点发送多次数据以确定多个往返时间,然后对得到的多个往返时间求平均值得到平均往返时间,避免了因突发情况导致的单次往返时间过长或者极短的情况对最终节点间距离的度量的影响。
如图3所示,在本发明的一实施方式的节点间距离的度量方法中,在多个所述预设时间段内从第一节点向第二节点发送多次测试数据以获取所述多个预设时间段内的平均丢包率包括:
调度中心在多个所述预设时间段内从第一节点向第二节点发送多次测试数据得到多个丢包率;
调度中心对所述多个丢包率求平均值得到所述平均丢包率。
本实施例中,通过在设置了多个预设时间段,并且依次在每一个时间段内分别发送多次测试数据以得到多个丢包率,然后对得到的多个丢包率求平均值得到平均丢包率,避免了因突发情况导致的只测一次得到的丢包率过大或者过小的情况对最终节点间距离的度量的影响。
如图4所示,在本发明的一实施方式的节点间距离的度量方法中,至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离包括:
调度中心对所述往返时间和丢包率分别赋予第一权重、第二权重;
调度中心对所述往返时间和丢包率进行加权求和,利用求得的和值度量所述第一节点和第二节点之间的距离。
本发明的所有实施例中所述的节点间距离并不是地理上的实际距离,而是一种度量节点间通信质量的量化,而两节点之间的往返时间越长、丢包率越大则表明两节点间的通信质量越差,两节点间的节点间距离也就越长,因此综合考虑两节点间的往返时间越长、丢包率进行加权求和来度量两节点间的距离。
本实施例中只列举了通过两节点之间的往返时间越长、丢包率来度量节点间距离,但并不限于此,还可以综合考虑可能会对两节点间的通信质量造成影响的其它的因素。
本实施方式中,通过平均往返时间和平均丢包率分别赋予第一权重、第
二权重并进行求和的方式来度量两个节点之间的距离,其中第一权重、第二权重可根据需求进行调整,以达到对节点间距离的更加准确可靠的度量,例如当网络环境变化时(如网络运营商对不同地域内的网络环境进行调整)往返时间和丢包率对节点间距离的度量的影响所占的比重必然发生变化,这时就可以根据调整第一权重、第二权重的方法实现对上述因子所占比重的调整,从而更加准确可靠的度量两个节点间的距离。
此外,两节点间的距离越短,则表明两节点间的下载速度就越快,即下载速度与两节点间的距离成反比:L=1/v,其中L为节点间距,v为节点间的下载速度。
因此,节点间距离可以由以下公式确定:
L=1/v=α1r+α2d; (1-1)
其中L为节点间距,v为节点间的下载速度,r为平均往返时间,d为平均丢包率,α1为第一权重,α2为第二权重。
本实施例中的只要将第一权重α1、第二权重α2两个未知参数确定下来,以后对距离L的更新就可以只测试两节点间的平均往返时间r和平均丢包率d即可。
由上述公式(1-1)可知,可以通过测试一次节点间的下载速度v,并在测试下载速度v的过程中测试多对平均往返时间和平均丢包率(rn,dn)(因为测试下载速度v时要发送大量的测试数据,这样也就可以在测v期间得到多对的平均往返时间和平均丢包率了),其中n为测试的平均往返时间和平均丢包率的对数,可以根据需要设定n。
然后基于得到的多对平均往返时间和平均丢包率(rn,dn)根据最小二乘法确定第一权重α1、第二权重α2。
为使本实施例更加清楚,结合一下具体示例进行描述:
其中x代表平均往返时间r,y代表平均丢包率d。
在我们研究两个变量(x,y)之间的相互关系时,通常可以得到一系列成对的数据(x1,y1.x2,y2...xn,yn);将这些数据描绘在x-y直角坐标系中,若发现这些点在一条直线附近,可以令这条直线方程为:
yi=a0+a1x (1-2)
由公式(1-1)可得:
r=1/vα1-dα2/α1 (1-3)
由此可得,a0=1/vα1,a1=-α2/α1,是任意实数。
为建立这直线方程就要确定a0和a1,应用《最小二乘法原理》,将实测值Yi与计算值Yj(Yj=a0+a1X)的差(Yi-Yj)的平方和
∑(Yi-Yj)2
最小为“优化判据”。
把式(1-2)代入式(1-4)中得:
∑2(a0+a1*Xi-Yi)=0 (1-6)
∑2Xi(a0+a1*Xi-Yi)=0 (1-7)
亦即:
na0+(∑Xi)a1=∑Yi (1-8)
(∑Xi)a0+(∑Xi^2)a1=∑(Xi*Yi) (1-9)
得到的两个关于a0、a1为未知数的两个方程组,解这两个方程组得出:
a0=(∑Yi)/n-a1(∑Xi)/n (1-10)
a1=[n∑(Xi Yi)-(∑Xi∑Yi)]/(n∑Xi^2-∑Xi∑Xi) (1-11)
再根据求得的a0、a1确定第一权重α1、第二权重α2即可。
本实施方式中第一节点向第二节点发送的测试数据可以是实际应用中两个节点间以往的请求与响应的历史数据,也可以是为了度量两个节点间的距离而专门发送的测试请求信息;同样确定第一节点和第二节点之间的平均往返时间和平均丢包率也可以是根据历史数据采集的信息或者是根据测试请求信息确定的。
本实施方式中通过综合考虑两节点间的往返时间和丢包率来度量两节点之间的距离(其中往返时间为两节点之间进行一次完整的通信的时间,往返时间越短说明两节点间距离越近;丢包率为两节点之间通信时传输信息的完
整性的度量,丢包率越大则表明两节点之间传输信息的越不完整,即两节点间的距离越大),因为节点间的往返时间和丢包率可以通过ping测试就能够得到,而且这种测试消耗的网络资源也是非常小的,因此可以在保证不过度消耗浪费网络资源的情况下及时的更新两节点间的距离,使得最终确定的两节点之间的距离值更可靠,从而能够为CDN系统进行内容的分发提供更可靠的调度依据,保证对用户的服务质量,从而有助于提升用户体验。
本实施方式中的往返时间直接进行监测得到;其中,往返时间简单来说就是发送方从发送数据开始,到收到来自接受方的确认信息所经历的时间,其在计算机网络中它是一个重要的性能指标,表示从发送端发送数据开始,到发送端收到来自接收端的确认(接收端收到数据后便立即发送确认),总共经历的时延,RTT值由三个部分决定:即链路的传播时间、末端系统的处理时间以及路由器的缓存中的排队和处理时间;其中,前面两个部分的值作为一个TCP连接相对固定,路由器的缓存中的排队和处理时间会随着整个网络拥塞程度的变化而变化,所以RTT的变化在一定程度上反映了网络拥塞程度的变化。
丢包率(Loss Tolerance或Packet Loss Rate)是指测试中所丢失数据包数量占所发送数据组的比率,计算方法是:“[(输入报文-输出报文)/输入报文]*100%”,本实施方式中的丢包率为第一节点发送的数据减去第二节点接收到的数据除以第一节点发送的数据乘以百分百。
此外,本发明还提供一种CDN调度方法,采用上述任一实施方式的节点间距离的度量方法确定距离请求用户最近的CDN节点调度给请求用户。
本发明实施方式中可以通过硬件处理器(hardware processor)来实现相关功能模块。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作合并,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
如图5所示,本发明的实施方式还提供一种节点间距离的度量系统,包括:
平均往返时间确定模块,用于在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;
平均丢包率确定模块,用于在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;
距离度量模块,用于至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比。本实施例中,通过探测第一节点和第二节点间通信时的平均往返时间和平均丢包率,并综合考虑平均往返时间和平均丢包率来度量两节点间的距离,由于平均往返时间和平均丢包率是可以通过网络资源消耗极少的且操作简单的ping测试直接得到的,从而实现了及时的更新节点间距离以保证该节点间距离的准确性,为用户提供优质的服务,又以最小的网络资源开销完成了节点间距离的更新。
在本实施例中,所述节点间距离的度量电子设备可以为单独的服务器或者服务器集群,上述各模块可以为单独的服务器或者服务器集群,此时,各模块之间的交互体现为各模块所对应的服务器或者服务器集群之间的交互,各模块所对应的服务器或者服务器集群共同构成了本发明的节点间距离的度量电子设备。
具体地,各模块所对应的服务器或者服务器集群共同构成的节点间距离的度量电子设备包括:
平均往返时间确定服务器或者服务器集群,用于在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;
平均丢包率确定服务器或者服务器集群,用于在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;
距离度量服务器或者服务器集群,用于至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比。
如图6所示,在一些实施方式中,平均往返时间确定模块包括:
往返时间确定单元,用于从第一节点向第二节点发送多次测试数据得到多个往返时间;
第一均值单元,用于对所述多个往返时间求平均值得到所述平均往返时间。
本实施例中,通过在预设时间段内从第一节点向第二节点发送多次数据以确定多个往返时间,然后对得到的多个往返时间求平均值得到平均往返时间,避免了因突发情况导致的单次往返时间过长或者极短的情况对最终节点间距离的度量的影响。
在本实施例中,平均往返时间确定模块可以为一个服务器或者服务器集群,其中每个单元可以是单独的服务器或者服务器集群,此时,上述单元之间的交互表现为各单元所对应的服务器或者服务器集群之间的交互,所述多个服务器或者服务器集群共同构成上述平均往返时间确定模块以用于构成本发明的节点间距离的度量电子设备。
在一种替代实施例中,可以是上述多个单元中的几个单元共同组成一个服务器或者服务器集群。
如图7所示,在一些实施方式中,平均丢包率确定模块包括:
丢包率确定单元,用于在多个所述预设时间段内从第一节点向第二节点发送多次测试数据得到多个丢包率;
第二均值单元,用于对所述多个丢包率求平均值得到所述平均丢包率。
本实施例中,通过在设置了多个预设时间段,并且依次在每一个时间段内分别发送多次测试数据以得到多个丢包率,然后对得到的多个丢包率求平均值得到平均丢包率,避免了因突发情况导致的只测一次得到的丢包率过大或者过小的情况对最终节点间距离的度量的影响。
在本实施例中,平均丢包率确定模块可以为一个服务器或者服务器集群,其中每个单元可以是单独的服务器或者服务器集群,此时,上述单元之间的交互表现为各单元所对应的服务器或者服务器集群之间的交互,所述多个服务器或者服务器集群共同构成上述平均丢包率确定模块以用于构成本发明的节点间距离的度量电子设备。
在一种替代实施例中,可以是上述多个单元中的几个单元共同组成一个
服务器或者服务器集群。
如图8所示,在一些实施方式中,距离度量模块包括:
权重分配单元,用于对所述往返时间和丢包率分别赋予第一权重、第二权重;
加权求和单元,用于对所述往返时间和丢包率进行加权求和,以利用求得的和值度量所述第一节点和第二节点之间的距离。
本发明的所有实施例中所述的节点间距离并不是地理上的实际距离,而是一种度量节点间通信质量的量化,而两节点之间的往返时间越长、丢包率越大则表明两节点间的通信质量越差,两节点间的节点间距离也就越长,因此综合考虑两节点间的往返时间越长、丢包率进行加权求和来度量两节点间的距离。
在本实施例中,距离度量模块可以为一个服务器或者服务器集群,其中每个单元可以是单独的服务器或者服务器集群,此时,上述单元之间的交互表现为各单元所对应的服务器或者服务器集群之间的交互,所述多个服务器或者服务器集群共同构成上述距离度量模块以用于构成本发明的节点间距离的度量电子设备。
在一种替代实施例中,可以是上述多个单元中的几个单元共同组成一个服务器或者服务器集群。
本实施例中只列举了通过两节点之间的往返时间越长、丢包率来度量节点间距离,但并不限于此,还可以综合考虑可能会对两节点间的通信质量造成影响的其它的因素。
本实施方式中,通过平均往返时间和平均丢包率分别赋予第一权重、第二权重并进行求和的方式来度量两个节点之间的距离,其中第一权重、第二权重可根据需求进行调整,以达到对节点间距离的更加准确可靠的度量,例如当网络环境变化时(如网络运营商对不同地域内的网络环境进行调整)往返时间和丢包率对节点间距离的度量的影响所占的比重必然发生变化,这时就可以根据调整第一权重、第二权重的方法实现对上述因子所占比重的调整,从而更加准确可靠的度量两个节点间的距离。
在一些实施例中,距离由以下公式确定:
L=α1r+α2d;
其中L为节点间距,r为平均往返时间,d为平均丢包率,α1为第一权重,α2为第二权重。
本发明实施例还提供了一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的节点间距离的度量方法。
图9是本发明实施例提供的执行节点间距离的度量方法的电子设备的硬件结构示意图,如图9所示,该设备包括:
一个或多个处理器910以及存储器920,图9中以一个处理器910为例。
执行节点间距离的度量方法的设备还可以包括:输入装置930和输出装置940。
处理器910、存储器920、输入装置930和输出装置940可以通过总线或者其他方式连接,图9中以通过总线连接为例。
存储器920作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的节点间距离的度量方法对应的程序指令/模块(例如,附图5所示的平均往返时间确定模块、平均丢包率确定模块和距离度量模块)。处理器910通过运行存储在存储器920中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例节点间距离的度量方法。
存储器920可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据节点间距离的度量的处理装置的使用所创建的数据等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器920可选包括相对于处理器910远程设置的存储器,这些远程存储器可以通过网络连接至节点间距离的度量的处理装置。上述网络的
实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置930可接收输入的数字或字符信息,以及产生与节点间距离的度量的处理装置的用户设置以及功能控制有关的键信号输入。输出装置940可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器920中,当被所述一个或者多个处理器910执行时,执行上述任意方法实施例中的节点间距离的度量方法。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请实施例的电子设备以多种形式存在,包括但不限于:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。
(5)其他具有数据交互功能的电子装置。
以上所描述的方法实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络
单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
本领域内的技术人员应明白,本发明的实施方式可提供为方法、电子设备、或计算机程序产品。因此,本发明可采用完全硬件实施方式、完全软件实施方式、或结合软件和硬件方面的实施方式的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施方式的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程
和/或方框图一个方框或多个方框中指定的功能的步骤。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。
Claims (13)
- 一种节点间距离的度量方法,应用于电子设备,包括:在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比。
- 根据权利要求1所述的节点间距离的度量方法,其中,所述在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间包括:从第一节点向第二节点发送多次测试数据得到多个往返时间;对所述多个往返时间求平均值得到所述平均往返时间。
- 根据权利要求1所述的节点间距离的度量方法,其中,所述在多个所述预设时间段内从第一节点向第二节点发送多次测试数据以获取所述多个预设时间段内的平均丢包率包括:在多个所述预设时间段内从第一节点向第二节点发送多次测试数据得到多个丢包率;对所述多个丢包率求平均值得到所述平均丢包率。
- 根据权利要求1-3任一项所述的节点间距离的度量方法,其中,所述至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离包括:对所述往返时间和丢包率分别赋予第一权重、第二权重;对所述往返时间和丢包率进行加权求和,利用求得的和值度量所述第一节点和第二节点之间的距离。
- 根据权利要求4所述的节点间距离的度量方法,其中,所述距离由以 下公式确定:L=α1r+α2d;其中L为节点间距,r为平均往返时间,d为平均丢包率,α1为第一权重,α2为第二权重。
- 一种节点间距离的度量系统,包括:平均往返时间确定模块,用于在预设时间段内从第一节点向第二节点发送多次测试数据以获取所述预设时间段内的平均往返时间;平均丢包率确定模块,用于在多个所述预设时间段内从第一节点向第二节点分别发送多次测试数据以获取所述多个预设时间段内的平均丢包率;距离度量模块,用于至少根据所述平均往返时间和平均丢包率度量所述第一节点和第二节点之间的距离,其中,所述平均往返时间、所述平均丢包率与所述距离成正比。
- 根据权利要求6所述的节点间距离的度量系统,其中,所述平均往返时间确定模块包括:往返时间确定单元,用于从第一节点向第二节点发送多次测试数据得到多个往返时间;第一均值单元,用于对所述多个往返时间求平均值得到所述平均往返时间。
- 根据权利要求6所述的节点间距离的度量系统,其中,所述平均丢包率确定模块包括:丢包率确定单元,用于在多个所述预设时间段内从第一节点向第二节点发送多次测试数据得到多个丢包率;第二均值单元,用于对所述多个丢包率求平均值得到所述平均丢包率。
- 根据权利要求6-8任一项所述的节点间距离的度量系统,其中,所述距离度量模块包括:权重分配单元,用于对所述往返时间和丢包率分别赋予第一权重、第二 权重;加权求和单元,用于对所述往返时间和丢包率进行加权求和,以利用求得的和值度量所述第一节点和第二节点之间的距离。
- 根据权利要求9所述的节点间距离的度量系统,其中,所述距离由以下公式确定:L=α1r+α2d;其中L为节点间距,r为平均往返时间,d为平均丢包率,α1为第一权重,α2为第二权重。
- 一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-5任一所述的方法。
- 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行权利要求1-5任一所述方法。
- 一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1-5任一所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610245386.1A CN105978807A (zh) | 2016-04-19 | 2016-04-19 | 节点间距离的度量方法及系统 |
| CN201610245386.1 | 2016-04-19 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017181586A1 true WO2017181586A1 (zh) | 2017-10-26 |
Family
ID=56993063
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/099712 Ceased WO2017181586A1 (zh) | 2016-04-19 | 2016-09-22 | 节点间距离的度量方法及电子设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105978807A (zh) |
| WO (1) | WO2017181586A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114615164A (zh) * | 2022-03-09 | 2022-06-10 | 网易(杭州)网络有限公司 | 丢包率探测方法及装置、存储介质、电子设备 |
| CN116390148A (zh) * | 2023-06-02 | 2023-07-04 | 联友智连科技有限公司 | 用于对c-v2x无线通信设备的通信距离进行测试的方法和装置 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109787868B (zh) * | 2019-03-18 | 2022-03-01 | 网宿科技股份有限公司 | 一种选取路由路径的方法、系统及服务器 |
| CN115567602A (zh) * | 2022-08-15 | 2023-01-03 | 乐视云计算有限公司 | Cdn节点回源方法、设备及计算机可读存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1889519A (zh) * | 2006-07-14 | 2007-01-03 | 清华大学 | 覆盖路由网络中的路由表计算方法 |
| US20120290677A1 (en) * | 2009-12-14 | 2012-11-15 | Telefonaktiebolaget L M Ericsson (Publ) | Dynamic Cache Selection Method and System |
| CN104734869A (zh) * | 2013-12-19 | 2015-06-24 | 华耀(中国)科技有限公司 | 基于动态探测的智能dns域名系统及方法 |
| CN105897582A (zh) * | 2015-12-07 | 2016-08-24 | 乐视云计算有限公司 | 节点间距离的度量方法及系统 |
-
2016
- 2016-04-19 CN CN201610245386.1A patent/CN105978807A/zh active Pending
- 2016-09-22 WO PCT/CN2016/099712 patent/WO2017181586A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1889519A (zh) * | 2006-07-14 | 2007-01-03 | 清华大学 | 覆盖路由网络中的路由表计算方法 |
| US20120290677A1 (en) * | 2009-12-14 | 2012-11-15 | Telefonaktiebolaget L M Ericsson (Publ) | Dynamic Cache Selection Method and System |
| CN104734869A (zh) * | 2013-12-19 | 2015-06-24 | 华耀(中国)科技有限公司 | 基于动态探测的智能dns域名系统及方法 |
| CN105897582A (zh) * | 2015-12-07 | 2016-08-24 | 乐视云计算有限公司 | 节点间距离的度量方法及系统 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114615164A (zh) * | 2022-03-09 | 2022-06-10 | 网易(杭州)网络有限公司 | 丢包率探测方法及装置、存储介质、电子设备 |
| CN114615164B (zh) * | 2022-03-09 | 2023-12-29 | 网易(杭州)网络有限公司 | 丢包率探测方法及装置、存储介质、电子设备 |
| CN116390148A (zh) * | 2023-06-02 | 2023-07-04 | 联友智连科技有限公司 | 用于对c-v2x无线通信设备的通信距离进行测试的方法和装置 |
| CN116390148B (zh) * | 2023-06-02 | 2023-08-11 | 联友智连科技有限公司 | 用于c-v2x无线通信设备的通信距离测试方法和装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105978807A (zh) | 2016-09-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11411825B2 (en) | In intelligent autoscale of services | |
| CN109787868B (zh) | 一种选取路由路径的方法、系统及服务器 | |
| US20170171344A1 (en) | Scheduling method and server for content delivery network service node | |
| CN105897845A (zh) | Cdn服务节点的调度方法及服务器 | |
| CN105933226A (zh) | 内容分发方法及系统 | |
| WO2017096837A1 (zh) | 节点间距离的度量方法及系统 | |
| CN101771585B (zh) | 一种网络延时测量设备及其方法 | |
| WO2017181586A1 (zh) | 节点间距离的度量方法及电子设备 | |
| CN105933233A (zh) | Cdn网络的拓扑结构生成方法及系统 | |
| CN105933234A (zh) | Cdn网络中的节点管理方法和系统 | |
| WO2018112877A1 (zh) | 路径计算和访问请求分发方法、装置及系统 | |
| CN114423043B (zh) | 一种用于移动终端分配链路的方法及设备 | |
| CN105847159A (zh) | Cdn网络的拓扑结构生成方法和系统 | |
| CN105871612A (zh) | Cdn网络的拓扑结构生成器 | |
| CN105847380A (zh) | 内容分发网络中的udp加速方法和系统 | |
| US11876694B1 (en) | Latency monitoring and reporting for distributed gateways | |
| US20170163509A1 (en) | Inter-node distance metric method and system | |
| CN110875938A (zh) | 一种区块链中信息的发送方法及装置 | |
| CN106549827A (zh) | 网络状态的探测方法及装置 | |
| CN114448838B (zh) | 系统可靠度评估方法 | |
| CN103024091B (zh) | 获得网络客户端真实物理地址的方法及装置 | |
| CN115801639B (zh) | 一种带宽探测方法、装置、电子设备及存储介质 | |
| Phanekham et al. | Throughput measurements and profile analysis of cloud networks | |
| Maiti et al. | Estimation of round trip time in distributed real time system architectures | |
| CN107171887B (zh) | 一种网络带宽测试方法、客户端及网络带宽测试系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16899172 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16899172 Country of ref document: EP Kind code of ref document: A1 |