WO2021142632A1 - Transmission time determination method, link state evaluation method, computing device, and medium - Google Patents

Transmission time determination method, link state evaluation method, computing device, and medium Download PDF

Info

Publication number
WO2021142632A1
WO2021142632A1 PCT/CN2020/072080 CN2020072080W WO2021142632A1 WO 2021142632 A1 WO2021142632 A1 WO 2021142632A1 CN 2020072080 W CN2020072080 W CN 2020072080W WO 2021142632 A1 WO2021142632 A1 WO 2021142632A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
data packet
time
data
transmission time
Prior art date
Application number
PCT/CN2020/072080
Other languages
French (fr)
Chinese (zh)
Inventor
张海涛
于禾
周文晶
王琪
Original Assignee
西门子股份公司
西门子(中国)有限公司
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 西门子股份公司, 西门子(中国)有限公司 filed Critical 西门子股份公司
Priority to PCT/CN2020/072080 priority Critical patent/WO2021142632A1/en
Publication of WO2021142632A1 publication Critical patent/WO2021142632A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing

Definitions

  • the present disclosure generally relates to the technical field of the Internet of Things, and more specifically, to a transmission time determination method, a link state evaluation method, a computing device, and a medium.
  • FIG. 1 shows a schematic diagram of a basic architecture 100 of an IOT application.
  • the architecture includes a field device 102, an edge controller 104, and a cloud platform 106.
  • the field device 102 performs field operations to generate field data;
  • the edge controller 104 responds to the collected field data, translates the data, and sends the data to the cloud platform 106; on the cloud platform 106, the data is analyzed and visualized.
  • the route from the edge device to the cloud platform is selected through the router or gateway of the Internet. If the path is overloaded, the transmission delay from the edge device to the cloud will be relatively large, so data may be lost in the process of data transmission from the edge device to the cloud platform.
  • the data sent on the edge device side can be adjusted to avoid data loss or reduce the transmission delay, such as reducing the amount of data and increasing the transmission gap.
  • the traditional routing algorithm can calculate the transmission cost through hops or weighted hops to select the corresponding path, there is no way to obtain the transmission cost except for the routing algorithm.
  • the present disclosure proposes a method for automatically calculating the data transmission time between two nodes, which uses the existing Transmission Control Protocol (TCP) transmission mechanism to expand the transmitted data packet,
  • TCP Transmission Control Protocol
  • a method for determining data transmission time wherein the data transmission is based on a transmission control protocol and includes: a first sending step: a first node sends a data packet to a second node, and the first node records The first moment when the second node sends the data packet; the first receiving step: the first node receives the confirmation data packet from the second node, and records the receipt of the confirmation data from the second node The second moment of the packet, wherein the received confirmation data packet includes the processing time for the second node to process the data packet; and the step of determining the transmission time: the first node is based at least on the first moment, The second time and the processing time determine the data transmission time from the first node to the second node.
  • the step of determining the transmission time includes: determining the transmission time from the first node to the first node based on the first time, the second time, the processing time, and the load information. The data transmission time of the second node.
  • the data packet is a TCP keep-alive data packet
  • the confirmation data packet is a TCP keep-alive confirmation data packet
  • the first node is an edge device
  • the second node is a cloud platform
  • a method for determining data transmission time is provided, the data transmission is based on a transmission control protocol, and includes: a second receiving step: a second node receives a data packet sent from a first node, and records The third time when the data packet is received; the processing step: the second node processes the data packet; and the second sending step: the second node sends a confirmation data packet, and records the sending of the confirmation data
  • the confirmation data packet includes the processing time for the second node to process the data packet, where the processing time is the elapsed time from the third time to the fourth time.
  • the confirmation data packet further includes load information of the second node.
  • a link state evaluation method which includes: a first node and a second node respectively repeatedly execute the above-mentioned method for determining data transmission time to determine the first node and the second node. Multiple data transmission times of the link between the two nodes; and evaluating the state of the link based on the multiple data transmission times.
  • a link state evaluation method which includes: a transmission time calculation step: for each of a plurality of links between a node and a plurality of other nodes, repeat the above The method for determining the data transmission time is to calculate multiple data transmission times for each link; the storage step: store multiple data transmission times for each link; and the state assessment step: when the node is to be in the multiple When data transmission is performed on one of the links, the status of the link is evaluated based on the stored data transmission time of the link.
  • the transmission time calculation step further includes: constructing multiple data packets of different predetermined sizes, and for each link, calculating and transmitting each data packet of the predetermined size.
  • the storing step further includes: storing a plurality of data transmission times corresponding to each data packet of a predetermined size transmitted on each link.
  • a computing device including: at least one processor; and a memory coupled with the at least one processor, the memory is used to store instructions, when the instructions are used by the at least one When the processor executes, the processor is caused to execute the method as described above.
  • a non-transitory machine-readable storage medium which stores executable instructions that, when executed, cause the machine to perform the method as described above.
  • a computer program including computer-executable instructions that, when executed, cause at least one processor to perform the method as described above.
  • a computer program product that is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least A processor executes the method described above.
  • the transmission time determination method and the link state evaluation method according to the present disclosure can use the existing TCP transmission mechanism to automatically calculate the data transmission time between two nodes, and the link state can be evaluated in real time based on the data transmission time.
  • the link is overloaded, the amount of data sent can be reduced, or the transmission gap can be increased, so as to avoid data loss or reduce transmission delay.
  • the method according to the present disclosure uses the existing TCP transmission mechanism, so as long as there is a TCP connection, the method according to the present disclosure can be used, and only minor modifications to the confirmation data packet are required, so the existing transmission system has little impact.
  • TCP connections use the TCP keep-alive mechanism to check whether the connection is active.
  • the method according to the present disclosure can use the existing TCP keep-alive mechanism to calculate the transmission time, and automatically measure the transmission time in real time without the need to transmit more data packets.
  • TCP keep-alive packets are periodically sent between the two ends of a TCP connection. Therefore, the data transmission time can be obtained periodically by the method according to the present disclosure, so that the status of the link can be evaluated in real time. It is also possible to set the sending interval of TCP keep-active data packets according to the needs of the application, that is, to set the measurement period of the transmission time, so as to further ensure the real-time and accuracy of the assessment of the link status.
  • the size of the TCP keep-alive data packet can be set to be the same as the data packet size used by the application data to ensure the calculated data transmission time More precise.
  • Figure 1 shows a schematic diagram of the basic architecture of the IOT application
  • FIG. 2 is a flowchart showing an exemplary process of a method for determining a data transmission time according to an embodiment of the present disclosure
  • Figure 3 is a schematic diagram showing data transmission between two nodes
  • FIG. 4 is a flowchart showing an exemplary process of a data transmission time determination method according to an embodiment of the present disclosure
  • FIG. 5 is a flowchart showing an exemplary process of a link state evaluation method according to an embodiment of the present disclosure
  • FIG. 6 is a flowchart showing an exemplary process of a link state evaluation method according to another embodiment of the present disclosure
  • FIG. 7 is a block diagram showing an exemplary configuration of a first device for determining data transmission time according to an embodiment of the present disclosure
  • FIG. 8 is a block diagram showing an exemplary configuration of a second device for determining data transmission time according to an embodiment of the present disclosure.
  • FIG. 9 shows a block diagram of a computing device 900 that implements determining data transmission time or performing link state evaluation according to an embodiment of the present disclosure.
  • Edge controller 106 Cloud platform
  • Tsend TCP keeps active data packet transmission
  • Tack TCP keeps alive and confirms data packet transmission T1: the first moment
  • T2 second moment Tp2: second node processing time
  • Tp1 first node processing time Tr: third moment
  • Type of production line 400 Method for determining data transmission time
  • Transmission time determination unit 800 Second device
  • Second receiving unit 804 Processing unit
  • Second sending unit 900 Computing equipment
  • the term “including” and its variations mean open terms, meaning “including but not limited to”.
  • the term “based on” means “based at least in part on.”
  • the terms “one embodiment” and “an embodiment” mean “at least one embodiment.”
  • the term “another embodiment” means “at least one other embodiment.”
  • the terms “first”, “second”, etc. may refer to different or the same objects. Other definitions can be included below, whether explicit or implicit. Unless clearly indicated in the context, the definition of a term is consistent throughout the specification.
  • a method for automatically calculating the data transmission time between two nodes which uses the existing Transmission Control Protocol (TCP) transmission mechanism to perform data packet transmission
  • TCP Transmission Control Protocol
  • the transmission time can be calculated flexibly.
  • OPC UA Object Linking and Embedding (OLE) for Process Control Unified Architecture
  • http HyperText Transfer Protocol
  • https HyperText Transfer Protocol
  • cloud applications are also based on TCP connections.
  • OPC UA is used to send data from the edge device side to the cloud platform side.
  • FIG. 2 is a flowchart showing an exemplary process of a data transmission time determination method 200 according to an embodiment of the present disclosure.
  • the exemplary process shown in FIG. 2 is a method for determining the data transmission time described from the side of the first node P1 that sends the data packet.
  • the first node P1 sends a data packet to the second node P2, and the first node P1 records the first time T1 at which the data packet is sent to the second node P2.
  • the first node and the second node may be, for example, an edge device and a cloud platform, respectively, or any two devices that perform data transmission.
  • the device types of the first node and the second node are not limited in the method of the present invention.
  • the data packet sent here may be a measurement data packet specifically used to measure the data transmission time, or a TCP keep-alive data packet in the TCP transmission may be used.
  • the TCP connection has the feature of keeping alive to check whether the link is active.
  • the mechanism of TCP keep alive is: one end of the TCP connection sends a TCP keep alive (TCP keep alive) packet to the other end, and then the other end sends back a TCP keep alive ACK packet to one end.
  • TCP keep alive TCP keep alive
  • the TCP keep-alive data packet can be used as a measurement data packet, and the transmission time can be calculated according to the corresponding parameters.
  • the specific parameters can be determined by the time measurement method.
  • the data packet sent is a TCP keep-alive data packet as an example for description.
  • TCP keep-alive data packet as an example for description.
  • other data packets can also be used as measurement data packets.
  • the first node P1 receives the confirmation data packet from the second node P2, and records the second time T2 when the confirmation data packet is received from the second node P2, wherein,
  • the received confirmation data packet includes the processing time Tp2 for the second node P2 to process the data packet.
  • the first node P1 sends a TCP keep-alive data packet to the second node P2, and it takes Tsend time.
  • the second node P2 receives the data packet and processes the received data packet within the time Tp2, and then It took Tack time to send a TCP keep-alive confirmation packet to the first node P1.
  • the first round-trip transmission time A T2-T1 of the keep-alive confirmation data packet.
  • the first round-trip transmission time A includes the transmission time Tsend of the TCP keep-alive data packet, the transmission time Tack of the TCP keep-alive acknowledgment data packet, and the processing time Tp2 of the second node P2, so the following equation (1) is given.
  • the size of the TCP keep-alive data packet and the TCP keep-alive confirmation data packet are basically the same, and the transmission time of the two data packets is generally within 1-2 minutes, it can be considered that the transmission link will not be large in a short time interval. The change.
  • Tsend is basically equal to Tack.
  • equation (1) can be transformed into:
  • Ttr is the data transmission time on the link from the first node P1 to the second node P2.
  • the first round-trip transmission time A T2-T1. Therefore, in block S106, the first time T1 when the first node P1 sends the data packet and the second time T2 when the confirmation data packet is received can be used, and the first The processing time Tp2 for the second node P2 to process the data packet determines the data transmission time from the first node P1 to the second node P2.
  • the second node P2 sends a TCP keep-alive data packet to the first node P1
  • the second node P2 receives a TCP keep-alive confirmation data packet from the first node P1.
  • Tp1 or Tp2 is also a factor that affects the transmission time in the round-trip transmission time A or B.
  • Tp1 or Tp2 is the time for processing TCP keep-alive data packets at node P1 or P2, respectively.
  • Tp1 and Tp2 can be measured separately in the corresponding nodes.
  • FIG. 4 is a flowchart showing an exemplary process of a data transmission time determination method 400 according to an embodiment of the present disclosure.
  • the exemplary process shown in FIG. 4 is a method for determining the data transmission time described from the side of the second node P2 that receives the data packet.
  • the second node P2 receives the data packet sent from the first node P1, and records the third time Tr when the data packet is received.
  • the second node P2 processes the data packet.
  • the second node P2 sends a confirmation data packet, and records the fourth time Ts when the confirmation data packet is sent, and the confirmation data packet includes the processing time for the second node P2 to process the data packet ,
  • the standard TCP keep-alive data packet and TCP keep-alive confirmation data packet do not include any data.
  • the data packet in order to calculate the data transmission time, the data packet can be expanded.
  • the TCP keep-alive data packet does not need to be extended, while for the TCP keep-alive acknowledgment data packet, it can be expanded to include the data processing time of the node. That is, the second node P2 may pack the measured data processing time Tp2 of the second node in a TCP keep-alive confirmation data packet, and send it to the first node P1.
  • the processing time of the second node P2 to process the data packet can be obtained, so that the first node P1 can send out according to the first node P1
  • the first time T1 of the data packet and the second time T2 of receiving the confirmation data packet, and the data processing time of the second node P2 included in the received confirmation data packet determine the time from the first node P1 to the second node P2. Data transfer time.
  • the confirmation data packet sent from the second node P2 to the first node P1 may also include the load information of the second node P2.
  • the information obtained by analyzing the confirmation packet may include the node processing time Tp, the node's load information Ln, and so on. Therefore, the first node P1 will determine the data transmission time from the first node to the second node based on the load information in addition to the recorded first time, second time, and the processing time of the second node P2.
  • Equation (5) can be used to calculate the first data processing time Tp1 of the first node P1.
  • the first node is an edge device and the second node is a cloud platform, it is usually easy to know the data processing time of the cloud platform, and equation (5) can be used to calculate the data processing time of the edge device.
  • the link state may be evaluated based on the data transmission time Ttr. If Ttr is large, it means that it takes more time to transmit data on the link, which may be due to unstable or overloaded link.
  • FIG. 5 is a flowchart showing an exemplary process of a link state evaluation method 500 according to an embodiment of the present disclosure.
  • block S502 the method for determining data transmission time described above with reference to FIGS. 2-4 is repeatedly executed between two nodes to determine multiple data transmissions of the link between the two nodes in a period of time. time.
  • the state of the link is evaluated based on the plurality of data transmission times.
  • a transmission time sequence for a link within a period of time can be obtained, for example, Ttr1, Ttr2, Ttr3,... Ttrn. From the curve of the time data on the time axis, we can see whether the time data is stable, increasing or decreasing, so that we can know whether the corresponding link is stable, the load increases or the load decreases.
  • the node can choose an appropriate method to transmit data according to the state of the link. For example, in the case of link overload, the amount of data sent can be reduced, or the transmission gap can be increased, so as to avoid data loss or reduce transmission delay.
  • TCP is widely used in the network.
  • a node can use different TCP connections to connect to multiple different nodes.
  • For each link using a TCP connection multiple data transmission times can be calculated separately through the above methods.
  • FIG. 6 is a flowchart showing an exemplary process of a link state evaluation method 600 according to another embodiment of the present disclosure.
  • multiple data transmission times of each link between a node and other nodes can be stored locally in the node.
  • the status of the link may be evaluated based on the stored data transmission time of the link .
  • a node can know the respective status of multiple links between it and multiple other nodes.
  • the node wants to transmit data on one of the multiple links, it can be based on the link Select the appropriate way to transfer data.
  • the data packet size is also a factor that affects the transmission time on the same link. This means that on the same link, the transmission time of a 100-byte data packet and the transmission time of a 500-byte data packet are different. Therefore, TCP keepalive data packets of different sizes can be formed respectively, such as 100 bytes in size, 500 bytes in size, and 1000 bytes in size.
  • the size of the TCP keep-alive confirmation packet corresponds to the size of the TCP keep-alive packet. Therefore, at both ends of a TCP connection, the TCP keep-alive packet and TCP keep-alive confirmation packet should be filled with random data to make the size equal to the corresponding size.
  • a variety of data packets of different predetermined sizes can be constructed, for example, three data packets of 100 bytes, 500 bytes and 1000 bytes can be constructed respectively, and each predetermined size is adopted for each link.
  • the size of the TCP keep-alive data packet can be set to be the same as the data packet size used by the data of the application according to the needs of the application program to transmit data, thereby ensuring that the calculated data transmission time is more accurate.
  • the data transmission time can be obtained periodically by the method according to the present disclosure, and the data transmission time of the stored link can also be periodically updated, so that the status of the link can be evaluated in real time based on the data transmission time of the link.
  • the connection between the edge device and the cloud is an Internet link based on TCP.
  • Most data transmission from edge devices to the cloud is based on TCP, such as OPC UA protocol, https protocol and so on. Therefore, the above method can be used to calculate the transmission time of the link from the edge device to the cloud.
  • the edge device can evaluate the link status in real time and send data in the corresponding format. For example, when the link is overloaded, it can reduce the amount of data sent, or increase the transmission gap, so as to avoid data loss or can Reduce transmission delay.
  • the transmission time determination method and the link state evaluation method according to the present disclosure may have at least the following advantages.
  • the transmission time determination method and the link state evaluation method according to the present disclosure can use the existing TCP transmission mechanism to automatically calculate the data transmission time between two nodes, and the link state can be evaluated in real time based on the data transmission time.
  • the link is overloaded, the amount of data sent can be reduced, or the transmission gap can be increased, so as to avoid data loss or reduce transmission delay.
  • the method according to the present disclosure uses the existing TCP transmission mechanism, so as long as there is a TCP connection, the method according to the present disclosure can be used, and only minor modifications to the confirmation data packet are required, so the existing transmission system has little impact.
  • TCP connections use the TCP keep-alive mechanism to check whether the connection is active.
  • the method according to the present disclosure can use the existing TCP keep-alive mechanism to calculate the transmission time, and automatically measure the transmission time in real time without the need to transmit more data packets.
  • TCP keep-alive packets are periodically sent between the two ends of a TCP connection. Therefore, the data transmission time can be obtained periodically by the method according to the present disclosure, so that the status of the link can be evaluated in real time. It is also possible to set the sending interval of TCP keep-active data packets according to the needs of the application, that is, to set the measurement period of the transmission time, so as to further ensure the real-time and accuracy of the assessment of the link status.
  • the size of the TCP keep-alive data packet can be set to be the same as the data packet size used by the application data to ensure the calculated data transmission time More precise.
  • FIG. 7 is a block diagram showing an exemplary configuration of a first device 700 for determining a data transmission time according to an embodiment of the present disclosure.
  • the first device 700 includes a first sending unit 702, a first receiving unit 704, and a transmission time determining unit 706.
  • the first sending unit 702 is configured to send a data packet to the second node, and record the first moment when the data packet is sent to the second node.
  • the first receiving unit 704 is configured to receive a confirmation data packet from the second node, and to record a second moment when the confirmation data packet is received from the second node, wherein the received confirmation data packet includes all The processing time for the second node to process the data packet.
  • the transmission time determining unit 706 is configured to determine the data transmission time from the first node to the second node based on at least the first moment, the second moment, and the processing time.
  • the transmission time determining unit 706 is further configured to determine the data transmission time to the second node based on the first moment, the second moment, the processing time, and the load information.
  • the data packet is a TCP keep-alive data packet
  • the confirmation data packet is a TCP keep-alive confirmation data packet
  • the first device 700 is set on an edge device, and the second node is a cloud platform.
  • FIG. 8 is a block diagram showing an exemplary configuration of a second device 800 for determining data transmission time according to an embodiment of the present disclosure.
  • the second device 800 includes a second receiving unit 802, a processing unit 804, and a second sending unit 806.
  • the second receiving unit 802 is configured to receive a data packet sent from the first sending unit 702 of the first device 700, and record the third time when the data packet is received.
  • the processing unit 804 is configured to process the data packet.
  • the second sending unit 806 is configured to send a confirmation data packet, and record the fourth moment when the confirmation data packet is sent, the confirmation data packet includes the processing time of the processing unit to process the data packet, wherein the The processing time is equal to the elapsed time from the third moment to the fourth moment.
  • the confirmation data packet also includes load information of the second node.
  • the second device is set on the cloud platform, and the first device is set on the edge device.
  • first device 700 and the second device 800 for determining the data transmission time and their constituent units shown in FIG. 7 and FIG. 8 are only exemplary, and those skilled in the art can compare FIG. 7 as needed. And the structural block diagram shown in Figure 8 is modified.
  • the details of the operations and functions of the various parts of the first device 700 and the second device 800 for determining the data transmission time may be related to the embodiments of the data transmission time determining methods 200 and 400 of the present disclosure described with reference to FIGS. 1-4, for example.
  • the parts are the same or similar, and will not be described in detail here.
  • FIGS. 1 to 8 the embodiments of the method and device for determining the data transmission time and the method for evaluating the link state according to the embodiments of the present disclosure are described.
  • the methods and devices described above can be implemented by hardware, or by software or a combination of hardware and software.
  • FIG. 9 shows a block diagram of a computing device 900 that implements determining data transmission time or performing link state evaluation according to an embodiment of the present disclosure.
  • the computing device 900 may include at least one processor 902, which executes at least one computer-readable instruction stored or encoded in a computer-readable storage medium (ie, the memory 904) (ie, the above-mentioned in the form of software) Implemented elements).
  • a non-transitory machine-readable medium may have machine-executable instructions (that is, the above-mentioned elements implemented in the form of software), which when executed by a machine, cause the machine to execute the various embodiments of the present disclosure in conjunction with FIGS. 1-6.
  • machine-executable instructions that is, the above-mentioned elements implemented in the form of software
  • a computer program including computer-executable instructions, which, when executed, cause at least one processor to execute each of the above described in conjunction with FIGS. 1-6 in the various embodiments of the present disclosure.
  • a computer program product including computer-executable instructions, which, when executed, cause at least one processor to execute the above described in conjunction with FIGS. 1-6 in the various embodiments of the present disclosure.

Landscapes

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

Abstract

The present disclosure relates to a transmission time determination method, a link state evaluation method, a computing device, and a medium. A method for determining a data transmission time, wherein data transmission is based on a transmission control protocol, comprises: a first sending step: a first node sends a data packet to a second node, and the first node records a first moment when the data packet is sent to the second node; a first receiving step: the first node receives an acknowledgement data packet from the second node, and records a second moment when the acknowledgement data packet is received from the second node, wherein the received acknowledgement data packet comprises a processing time when the second node processes the data packet; and a transmission time determining step: the first node determines a data transmission time from the first node to the second node at least on the basis of the first moment, the second moment, and the processing time.

Description

传输时间确定方法、链路状态评估方法、计算设备和介质Transmission time determination method, link state evaluation method, computing device and medium 技术领域Technical field
本公开通常涉及物联网技术领域,更具体地,涉及传输时间确定方法、链路状态评估方法、计算设备和介质。The present disclosure generally relates to the technical field of the Internet of Things, and more specifically, to a transmission time determination method, a link state evaluation method, a computing device, and a medium.
背景技术Background technique
工业物联网(IoT)应用近来发展迅速。图1示出了IOT应用的基本架构100的示意图。该架构包括现场设备102、边缘控制器104和云平台106。现场设备102执行现场操作,生成现场数据;边缘控制器104对采集的现场数据做出响应,对数据进行翻译并发送至云平台106;在云平台106上将对数据进行解析并且可视化。Industrial Internet of Things (IoT) applications have developed rapidly recently. Fig. 1 shows a schematic diagram of a basic architecture 100 of an IOT application. The architecture includes a field device 102, an edge controller 104, and a cloud platform 106. The field device 102 performs field operations to generate field data; the edge controller 104 responds to the collected field data, translates the data, and sends the data to the cloud platform 106; on the cloud platform 106, the data is analyzed and visualized.
通过因特网的路由器或网关来选择从边缘设备到云平台的路径。如果路径超负荷,则从边缘设备到云的传输延迟会比较大,因此在数据从边缘设备传输至云平台的过程中,可能会丢失数据。The route from the edge device to the cloud platform is selected through the router or gateway of the Internet. If the path is overloaded, the transmission delay from the edge device to the cloud will be relatively large, so data may be lost in the process of data transmission from the edge device to the cloud platform.
如果可以预先知道从边缘设备到云平台的路径的传输时间,可以调整边缘设备侧的发送数据,以避免数据丢失或者可以减少传输延迟,例如减少数据量、增加传输间隙等。If the transmission time of the path from the edge device to the cloud platform can be known in advance, the data sent on the edge device side can be adjusted to avoid data loss or reduce the transmission delay, such as reducing the amount of data and increasing the transmission gap.
虽然传统的路由算法可以通过跳(hop)或者带有权重的跳来计算传输成本,从而选择对应的路径,但是除了路由算法以外,没有办法获得传输成本。Although the traditional routing algorithm can calculate the transmission cost through hops or weighted hops to select the corresponding path, there is no way to obtain the transmission cost except for the routing algorithm.
发明内容Summary of the invention
在下文中给出关于本发明的简要概述,以便提供关于本发明的某些方面的基本理解。应当理解,这个概述并不是关于本发明的穷举性概述。它并不是意图确定本发明的关键或重要部分,也不是意图限定本发明的范围。其目的仅仅是以简化的形式给出某些概念,以此作为稍后论述的更详细描述的前序。A brief overview of the present invention is given below in order to provide a basic understanding of certain aspects of the present invention. It should be understood that this summary is not an exhaustive summary of the present invention. It is not intended to determine the key or important part of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to present some concepts in a simplified form as a prelude to the more detailed description that will be discussed later.
鉴于上述,本公开提出了一种自动计算两个节点之间的数据传输时间的方法,其利用现有的传输控制协议(Transmission Control Protocol,TCP)的传输机制,对传输的数据包进行扩展,可以灵活地计算传输时间。In view of the above, the present disclosure proposes a method for automatically calculating the data transmission time between two nodes, which uses the existing Transmission Control Protocol (TCP) transmission mechanism to expand the transmitted data packet, The transmission time can be calculated flexibly.
根据本公开的一个方面,提供了确定数据传输时间的方法,其中,数据传输基于传输控制协议,包括:第一发送步骤:第一节点向第二节点发送数据包,所述第一节点记录向所述第二节点发送所述数据包的第一时刻;第一接收步骤:所述第一节点从所述第二节点接收确认数据包,并且记录从所述第二节点接收到所述确认数据包的第二时刻,其中,所接收的确认数据包中包括所述第二节点处理所述数据包的处理时间;以及传输时间确定步骤:所述第一节点至少基于所述第一时刻、所述第二时刻和所述处理时间确定从所述第一节点到所述第二节点的数据传输时间。According to one aspect of the present disclosure, there is provided a method for determining data transmission time, wherein the data transmission is based on a transmission control protocol and includes: a first sending step: a first node sends a data packet to a second node, and the first node records The first moment when the second node sends the data packet; the first receiving step: the first node receives the confirmation data packet from the second node, and records the receipt of the confirmation data from the second node The second moment of the packet, wherein the received confirmation data packet includes the processing time for the second node to process the data packet; and the step of determining the transmission time: the first node is based at least on the first moment, The second time and the processing time determine the data transmission time from the first node to the second node.
可选地,在上述方面的一个示例中,所述传输时间确定步骤包括:基于所述第一时刻、所述第二时刻和所述处理时间以及所述负荷信息确定从所述第一节点到所述第二节点的数据传输时间。Optionally, in an example of the foregoing aspect, the step of determining the transmission time includes: determining the transmission time from the first node to the first node based on the first time, the second time, the processing time, and the load information. The data transmission time of the second node.
可选地,在上述方面的一个示例中,所述数据包是TCP保持活跃数据包,所述确认数据包是TCP保持活跃确认数据包。Optionally, in an example of the foregoing aspect, the data packet is a TCP keep-alive data packet, and the confirmation data packet is a TCP keep-alive confirmation data packet.
可选地,在上述方面的一个示例中,所述第一节点是边缘设备,所述第二节点是云平台。Optionally, in an example of the foregoing aspect, the first node is an edge device, and the second node is a cloud platform.
根据本公开的另一方面,提供了用于确定数据传输时间的方法,所述数据传输基于传输控制协议,包括:第二接收步骤:第二节点接收从第一节点发送的数据包,并且记录接收到所述数据包的第三时刻;处理步骤:所述第二节点对所述数据包进行处理;以及第二发送步骤:所述第二节点发送确认数据包,并且记录发送所述确认数据包的第四时刻,所述确认数据包中包括所述第二节点处理所述数据包的处理时间,其中,所述处理时间为从所述第三时刻到所述第四时刻经过的时间。According to another aspect of the present disclosure, a method for determining data transmission time is provided, the data transmission is based on a transmission control protocol, and includes: a second receiving step: a second node receives a data packet sent from a first node, and records The third time when the data packet is received; the processing step: the second node processes the data packet; and the second sending step: the second node sends a confirmation data packet, and records the sending of the confirmation data At the fourth time of the packet, the confirmation data packet includes the processing time for the second node to process the data packet, where the processing time is the elapsed time from the third time to the fourth time.
可选地,在上述方面的一个示例中,所述确认数据包中还包括所述第二节点的负荷信息。Optionally, in an example of the foregoing aspect, the confirmation data packet further includes load information of the second node.
根据本公开的另一方面,提供了链路状态评估方法,包括:第一节点和第二节点分别重复执行以上所述的确定数据传输时间的方法,来确定所述第一节点和所述第二节点之间的链路的多个数据传输时间;以及基于所 述多个数据传输时间来评估所述链路的状态。According to another aspect of the present disclosure, a link state evaluation method is provided, which includes: a first node and a second node respectively repeatedly execute the above-mentioned method for determining data transmission time to determine the first node and the second node. Multiple data transmission times of the link between the two nodes; and evaluating the state of the link based on the multiple data transmission times.
根据本公开的另一方面,提供了链路状态评估方法,包括:传输时间计算步骤:针对一个节点与其它多个节点之间的多条链路中的每一条链路,重复执行以上所述的确定数据传输时间的方法,分别计算每一条链路的多个数据传输时间;存储步骤:存储每一条链路的多个数据传输时间;以及状态评估步骤:当所述节点要在所述多条链路中的一条链路上进行数据传输时,基于所存储的该条链路的数据传输时间来评估该条链路的状态。According to another aspect of the present disclosure, a link state evaluation method is provided, which includes: a transmission time calculation step: for each of a plurality of links between a node and a plurality of other nodes, repeat the above The method for determining the data transmission time is to calculate multiple data transmission times for each link; the storage step: store multiple data transmission times for each link; and the state assessment step: when the node is to be in the multiple When data transmission is performed on one of the links, the status of the link is evaluated based on the stored data transmission time of the link.
可选地,在上述方面的一个示例中,所述传输时间计算步骤进一步包括:构造多种不同预定大小的数据包,针对所述每一条链路,分别计算传输每一种预定大小的数据包的多个数据传输时间;所述存储步骤进一步包括:存储在每一条链路上传输每一种预定大小的数据包所对应的多个数据传输时间。Optionally, in an example of the above aspect, the transmission time calculation step further includes: constructing multiple data packets of different predetermined sizes, and for each link, calculating and transmitting each data packet of the predetermined size. The storing step further includes: storing a plurality of data transmission times corresponding to each data packet of a predetermined size transmitted on each link.
根据本公开的另一方面,提供了计算设备,包括:至少一个处理器;以及与所述至少一个处理器耦合的一个存储器,所述存储器用于存储指令,当所述指令被所述至少一个处理器执行时,使得所述处理器执行如上所述的方法。According to another aspect of the present disclosure, a computing device is provided, including: at least one processor; and a memory coupled with the at least one processor, the memory is used to store instructions, when the instructions are used by the at least one When the processor executes, the processor is caused to execute the method as described above.
根据本公开的另一方面,提供了一种非暂时性机器可读存储介质,其存储有可执行指令,所述指令当被执行时使得所述机器执行如上所述的方法。According to another aspect of the present disclosure, there is provided a non-transitory machine-readable storage medium, which stores executable instructions that, when executed, cause the machine to perform the method as described above.
根据本公开的另一方面,提供了一种计算机程序,包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行如上所述的方法。According to another aspect of the present disclosure, there is provided a computer program including computer-executable instructions that, when executed, cause at least one processor to perform the method as described above.
根据本公开的另一方面,提供了一种计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行如上所述的方法。According to another aspect of the present disclosure, there is provided a computer program product that is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least A processor executes the method described above.
根据本公开的传输时间确定方法和链路状态评估方法可以利用现有的TCP传输机制来自动计算两个节点之间的数据传输时间,基于该数据传输时间可以实时评估链路状态,从而,在链路超负荷的情况下,可以减少数据量的发送、或者增加传输间隙等,以避免数据丢失或者可以减小传输延迟。The transmission time determination method and the link state evaluation method according to the present disclosure can use the existing TCP transmission mechanism to automatically calculate the data transmission time between two nodes, and the link state can be evaluated in real time based on the data transmission time. When the link is overloaded, the amount of data sent can be reduced, or the transmission gap can be increased, so as to avoid data loss or reduce transmission delay.
根据本公开的方法使用现有的TCP传输机制,因此只要存在TCP连接,就可以采用根据本公开的方法,并且只需要对确认数据包进行细微的修改,因此对现有传输系统影响很小。The method according to the present disclosure uses the existing TCP transmission mechanism, so as long as there is a TCP connection, the method according to the present disclosure can be used, and only minor modifications to the confirmation data packet are required, so the existing transmission system has little impact.
大多数TCP连接使用TCP保持活跃机制来检查连接是否活跃。根据本公开的方法可以使用现有的TCP保持活跃的机制来计算传输时间,实时自动测量传输时间,而无需传输更多的数据包。Most TCP connections use the TCP keep-alive mechanism to check whether the connection is active. The method according to the present disclosure can use the existing TCP keep-alive mechanism to calculate the transmission time, and automatically measure the transmission time in real time without the need to transmit more data packets.
TCP保持活跃数据包在一个TCP连接的两端之间定期发送。因此,通过根据本公开的方法可以定期得到数据传输时间,从而可以实时评估链路的状态。也可以根据应用程序的需要设置TCP保持活跃数据包的发送间隔,也即设置传输时间的测量周期,从而进一步确保评估链路状态的实时性和准确性。TCP keep-alive packets are periodically sent between the two ends of a TCP connection. Therefore, the data transmission time can be obtained periodically by the method according to the present disclosure, so that the status of the link can be evaluated in real time. It is also possible to set the sending interval of TCP keep-active data packets according to the needs of the application, that is, to set the measurement period of the transmission time, so as to further ensure the real-time and accuracy of the assessment of the link status.
不同大小的数据包具有不同的传输时间,可以根据当前的应用程序,将TCP保持活跃数据包的大小设置为与该应用程序的数据所使用的数据包大小一样,从而确保所计算的数据传输时间更加精确。Data packets of different sizes have different transmission times. According to the current application, the size of the TCP keep-alive data packet can be set to be the same as the data packet size used by the application data to ensure the calculated data transmission time More precise.
附图说明Description of the drawings
参照下面结合附图对本发明实施例的说明,会更加容易地理解本发明的以上和其它目的、特点和优点。附图中的部件只是为了示出本发明的原理。在附图中,相同的或类似的技术特征或部件将采用相同或类似的附图标记来表示。With reference to the following description of the embodiments of the present invention in conjunction with the accompanying drawings, the above and other objectives, features and advantages of the present invention will be more easily understood. The components in the drawings are only to illustrate the principle of the present invention. In the drawings, the same or similar technical features or components will be represented by the same or similar reference numerals.
图1示出了IOT应用的基本架构的示意图;Figure 1 shows a schematic diagram of the basic architecture of the IOT application;
图2是示出了根据本公开的一个实施例的数据传输时间确定方法的示例性过程的流程图;FIG. 2 is a flowchart showing an exemplary process of a method for determining a data transmission time according to an embodiment of the present disclosure;
图3是示出两个节点之间进行数据传输的示意图;Figure 3 is a schematic diagram showing data transmission between two nodes;
图4是示出了根据本公开的一个实施例的数据传输时间确定方法的示例性过程的流程图;4 is a flowchart showing an exemplary process of a data transmission time determination method according to an embodiment of the present disclosure;
图5是示出了根据本公开的一个实施例的链路状态评估方法的示例性过程的流程图;FIG. 5 is a flowchart showing an exemplary process of a link state evaluation method according to an embodiment of the present disclosure;
图6是示出了根据本公开的另一个实施例的链路状态评估方法的示例性过程的流程图;FIG. 6 is a flowchart showing an exemplary process of a link state evaluation method according to another embodiment of the present disclosure;
图7是示出了根据本公开的一个实施例的确定数据传输时间的第一装置的示例性配置的框图;FIG. 7 is a block diagram showing an exemplary configuration of a first device for determining data transmission time according to an embodiment of the present disclosure;
图8是示出了根据本公开的一个实施例的确定数据传输时间的第二装置的示例性配置的框图;以及FIG. 8 is a block diagram showing an exemplary configuration of a second device for determining data transmission time according to an embodiment of the present disclosure; and
图9示出了根据本公开的实施例的实现确定数据传输时间或者进行的链路状态评估的计算设备900的方框图。FIG. 9 shows a block diagram of a computing device 900 that implements determining data transmission time or performing link state evaluation according to an embodiment of the present disclosure.
附图标记Reference number
100:IOT基本架构               102:现场设备100: Basic IOT architecture 102: Field equipment
104:边缘控制器                106:云平台104: Edge controller 106: Cloud platform
200:数据传输时间确定方法      S202、S204、S206、S402、S404、200: Data transmission time determination method S202, S204, S206, S402, S404,
                               S406、S502、S504、S602、S604、S406, S502, S504, S602, S604,
                               S606:步骤S606: Steps
300:数据传输示意图            P1:第一节点300: Data transmission diagram P1: First node
P2:第二节点                   Tsend:TCP保持活跃数据包传输P2: The second node Tsend: TCP keeps active data packet transmission
                               时间 time
Tack:TCP保持活跃确认数据包传  T1:第一时刻Tack: TCP keeps alive and confirms data packet transmission T1: the first moment
输时间Lost time
T2:第二时刻                   Tp2:第二节点处理时间T2: second moment Tp2: second node processing time
Tp1:第一节点处理时间          Tr:第三时刻Tp1: first node processing time Tr: third moment
Ts:第四时刻                   241:产线名称Ts: Fourth moment 241: Production line name
242:产线类型                  400:数据传输时间确定方法242: Type of production line 400: Method for determining data transmission time
500、600:链路状态评估方法     700:第一装置500, 600: Link status evaluation method 700: First device
702:第一发送单元              704:第一接收单元702: First sending unit 704: First receiving unit
706:传输时间确定单元          800:第二装置706: Transmission time determination unit 800: Second device
802:第二接收单元              804:处理单元802: Second receiving unit 804: Processing unit
806:第二发送单元              900:计算设备806: Second sending unit 900: Computing equipment
902:处理器                    904:存储器902: Processor 904: Memory
具体实施方式Detailed ways
现在将参考示例实施方式讨论本文描述的主题。应该理解,讨论这些实施方式只是为了使得本领域技术人员能够更好地理解从而实现本文描述的主题,并非是对权利要求书中所阐述的保护范围、适用性或者示例的限制。可以在不脱离本公开内容的保护范围的情况下,对所讨论的元素的功能和排列进行改变。各个示例可以根据需要,省略、替代或者添加各种过程或组件。例如,所描述的方法可以按照与所描述的顺序不同的顺序来执行,以及各个步骤可以被添加、省略或者组合。另外,相对一些示例所描述的特征在其它例子中也可以进行组合。The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and realize the subject described herein, and is not to limit the scope of protection, applicability, or examples set forth in the claims. The function and arrangement of the discussed elements can be changed without departing from the scope of protection of the present disclosure. Various examples can omit, substitute, or add various procedures or components as needed. For example, the described method may be executed in a different order from the described order, and various steps may be added, omitted, or combined. In addition, features described with respect to some examples can also be combined in other examples.
如本文中使用的,术语“包括”及其变型表示开放的术语,含义是“包括但不限于”。术语“基于”表示“至少部分地基于”。术语“一个实施例”和“一实施例”表示“至少一个实施例”。术语“另一个实施例”表示“至少一个其他实施例”。术语“第一”、“第二”等可以指代不同的或相同的对象。下面可以包括其他的定义,无论是明确的还是隐含的。除非上下文中明确地指明,否则一个术语的定义在整个说明书中是一致的。As used herein, the term "including" and its variations mean open terms, meaning "including but not limited to". The term "based on" means "based at least in part on." The terms "one embodiment" and "an embodiment" mean "at least one embodiment." The term "another embodiment" means "at least one other embodiment." The terms "first", "second", etc. may refer to different or the same objects. Other definitions can be included below, whether explicit or implicit. Unless clearly indicated in the context, the definition of a term is consistent throughout the specification.
在根据本公开的方法中,提出了一种自动计算两个节点之间的数据传输时间的方法,其利用现有的传输控制协议(Transmission Control Protocol,TCP)的传输机制,对传输的数据包进行扩展,可以灵活地计算传输时间。In the method according to the present disclosure, a method for automatically calculating the data transmission time between two nodes is proposed, which uses the existing Transmission Control Protocol (TCP) transmission mechanism to perform data packet transmission For extension, the transmission time can be calculated flexibly.
为了计算两个节点之间的传输时间,可以通过在这两个节点之间发送测量数据包,并且在节点和数据包中包括测量方法来实现。In order to calculate the transmission time between two nodes, it can be achieved by sending a measurement data packet between the two nodes, and including the measurement method in the node and the data packet.
很多数据传输协议使用TCP连接来传输数据,例如OPC UA(Object Linking and Embedding(OLE)for Process Control Unified Architecture)、http以及https等。大多数云应用程序也是基于TCP连接,例如采用OPC UA从边缘设备侧向云平台侧发送数据。Many data transmission protocols use TCP connections to transmit data, such as OPC UA (Object Linking and Embedding (OLE) for Process Control Unified Architecture), http, and https. Most cloud applications are also based on TCP connections. For example, OPC UA is used to send data from the edge device side to the cloud platform side.
现在结合附图来描述根据本公开的实施例的数据传输时间确定方法。The method for determining the data transmission time according to an embodiment of the present disclosure will now be described with reference to the accompanying drawings.
图2是示出了根据本公开的一个实施例的数据传输时间确定方法200的示例性过程的流程图。FIG. 2 is a flowchart showing an exemplary process of a data transmission time determination method 200 according to an embodiment of the present disclosure.
图2所示的示例性过程是从发送数据包的第一节点P1这一侧所描述的数据传输时间确定方法。The exemplary process shown in FIG. 2 is a method for determining the data transmission time described from the side of the first node P1 that sends the data packet.
首先,在方框S202中,第一节点P1向第二节点P2发送数据包,所述 第一节点P1记录向所述第二节点P2发送所述数据包的第一时刻T1。First, in block S202, the first node P1 sends a data packet to the second node P2, and the first node P1 records the first time T1 at which the data packet is sent to the second node P2.
第一节点和第二节点例如可以分别是边缘设备和云平台,也可以是进行数据传输的任意两个设备,在本发明的方法中对第一节点和第二节点的设备类型不做限定。The first node and the second node may be, for example, an edge device and a cloud platform, respectively, or any two devices that perform data transmission. The device types of the first node and the second node are not limited in the method of the present invention.
可以理解,这里发送的数据包可以是专门用于测量数据传输时间的测量数据包,也可以利用TCP传输中的TCP保持活跃数据包。It can be understood that the data packet sent here may be a measurement data packet specifically used to measure the data transmission time, or a TCP keep-alive data packet in the TCP transmission may be used.
TCP连接具有保持活跃的特征可以检查链路是否活跃。TCP保持活跃的机制是:TCP连接的一端向另一端发送一个TCP保持活跃(TCP keep alive)数据包,然后另一端向一端发回一个TCP保持活跃确认(TCP keep alive ACK)数据包。The TCP connection has the feature of keeping alive to check whether the link is active. The mechanism of TCP keep alive is: one end of the TCP connection sends a TCP keep alive (TCP keep alive) packet to the other end, and then the other end sends back a TCP keep alive ACK packet to one end.
因为在一个TCP连接的两端之间要周期性发送TCP保持活跃数据包,因此,可以利用该TCP保持活跃数据包作为测量数据包,根据相应的参数来计算传输时间。具体的参数可以由时间测量方法来决定。Because TCP keep-alive data packets are periodically sent between the two ends of a TCP connection, the TCP keep-alive data packet can be used as a measurement data packet, and the transmission time can be calculated according to the corresponding parameters. The specific parameters can be determined by the time measurement method.
在本文中,以发送的数据包是TCP保持活跃数据包为例进行说明,但是,本领域技术人员可以理解,也可以采用其它数据包作为测量数据包。In this article, the data packet sent is a TCP keep-alive data packet as an example for description. However, those skilled in the art will understand that other data packets can also be used as measurement data packets.
接着,在方框S204中,所述第一节点P1从所述第二节点P2接收确认数据包,并且记录从所述第二节点P2接收到所述确认数据包的第二时刻T2,其中,所接收的确认数据包中包括所述第二节点P2处理所述数据包的处理时间Tp2。Next, in block S204, the first node P1 receives the confirmation data packet from the second node P2, and records the second time T2 when the confirmation data packet is received from the second node P2, wherein, The received confirmation data packet includes the processing time Tp2 for the second node P2 to process the data packet.
现参照图3来说明第一节点P1与第二节点P2之间进行数据传输的具体过程。如图3所示,第一节点P1向第二节点P2发送TCP保持活跃数据包,花费了Tsend的时间,第二节点P2接收该数据包,并且在Tp2时间内处理接收到的数据包,然后向第一节点P1发送TCP保持活跃确认数据包,花费了Tack的时间。如果第一节点P1记录发送数据包的第一时刻为T1,记录接收TCP保持活跃确认数据包的第二时刻为T2,则从第一节点P1发送TCP保持活跃数据包到第一节点P1接收TCP保持活跃确认数据包的第一往返传输时间A=T2-T1。第一往返传输时间A包括TCP保持活跃数据包的传输时间Tsend,TCP保持活跃确认数据包的传输时间Tack,以及第二节点P2的处理时间Tp2,因此有下面的等式(1)。The specific process of data transmission between the first node P1 and the second node P2 will now be described with reference to FIG. 3. As shown in Figure 3, the first node P1 sends a TCP keep-alive data packet to the second node P2, and it takes Tsend time. The second node P2 receives the data packet and processes the received data packet within the time Tp2, and then It took Tack time to send a TCP keep-alive confirmation packet to the first node P1. If the first node P1 records that the first time of sending the data packet is T1, and the second time of recording the reception of the TCP keep-alive acknowledgment packet is T2, then the first node P1 sends the TCP keep-alive data packet to the first node P1 to receive TCP The first round-trip transmission time A=T2-T1 of the keep-alive confirmation data packet. The first round-trip transmission time A includes the transmission time Tsend of the TCP keep-alive data packet, the transmission time Tack of the TCP keep-alive acknowledgment data packet, and the processing time Tp2 of the second node P2, so the following equation (1) is given.
A=Tsend+Tack+Tp2…(1)A=Tsend+Tack+Tp2...(1)
因为TCP保持活跃数据包和TCP保持活跃确认数据包的大小基本上相同,并且两个数据包的传输时间一般在1-2分钟以内,可以认为传输链路在较短时间间隔内不会发生大的变化。Because the size of the TCP keep-alive data packet and the TCP keep-alive confirmation data packet are basically the same, and the transmission time of the two data packets is generally within 1-2 minutes, it can be considered that the transmission link will not be large in a short time interval. The change.
因此,可以认为Tsend基本上等于Tack。于是等式(1)可以变形为:Therefore, it can be considered that Tsend is basically equal to Tack. Then equation (1) can be transformed into:
A=2Tsend+Tp2=2Ttr+Tp2…(2)A=2Tsend+Tp2=2Ttr+Tp2...(2)
Ttr=(A-Tp2)/2=A/2-Tp2/2…(3)Ttr=(A-Tp2)/2=A/2-Tp2/2...(3)
Ttr即为从第一节点P1到第二节点P2的链路上的数据传输时间。Ttr is the data transmission time on the link from the first node P1 to the second node P2.
如上所述,第一往返传输时间A=T2-T1,因此,在方框S106中,可以根据第一节点P1发出数据包的第一时刻T1和接收确认数据包的第二时刻T2,以及第二节点P2处理该数据包的处理时间Tp2,确定从第一节点P1到第二节点P2的数据传输时间。As mentioned above, the first round-trip transmission time A=T2-T1. Therefore, in block S106, the first time T1 when the first node P1 sends the data packet and the second time T2 when the confirmation data packet is received can be used, and the first The processing time Tp2 for the second node P2 to process the data packet determines the data transmission time from the first node P1 to the second node P2.
类似地,如果第二节点P2向第一节点P1发送TCP保持活跃数据包,并且第二节点P2从第一节点P1接收TCP保持活跃确认数据包。将从第二节点P2到第一节点P1的往返传输时间记录为B,则有:Similarly, if the second node P2 sends a TCP keep-alive data packet to the first node P1, and the second node P2 receives a TCP keep-alive confirmation data packet from the first node P1. Record the round-trip transmission time from the second node P2 to the first node P1 as B, then:
B=2Ttr+Tp1B=2Ttr+Tp1
Ttr=B/2-Tp1/2…(4)Ttr=B/2-Tp1/2...(4)
根据等式(3)或(4)可以知道,处理时间Tp1或Tp2也是在往返传输时间A或B中影响传输时间的因子。Tp1或Tp2分别是在节点P1或P2处理TCP保持活跃数据包的时间。可以在相应的节点中分别测量Tp1和Tp2。According to equation (3) or (4), it can be known that the processing time Tp1 or Tp2 is also a factor that affects the transmission time in the round-trip transmission time A or B. Tp1 or Tp2 is the time for processing TCP keep-alive data packets at node P1 or P2, respectively. Tp1 and Tp2 can be measured separately in the corresponding nodes.
图4是示出了根据本公开的一个实施例的数据传输时间确定方法400的示例性过程的流程图。FIG. 4 is a flowchart showing an exemplary process of a data transmission time determination method 400 according to an embodiment of the present disclosure.
图4所示的示例性过程是从接收数据包的第二节点P2这一侧描述的数据传输时间确定方法。The exemplary process shown in FIG. 4 is a method for determining the data transmission time described from the side of the second node P2 that receives the data packet.
首先,在方框S402中,第二节点P2接收从第一节点P1发送的数据包,并且记录接收到所述数据包的第三时刻Tr。First, in block S402, the second node P2 receives the data packet sent from the first node P1, and records the third time Tr when the data packet is received.
接着,在方框S404中,第二节点P2对所述数据包进行处理。Next, in block S404, the second node P2 processes the data packet.
在方框S406中,第二节点P2发送确认数据包,并且记录发送所述确认数据包的第四时刻Ts,所述确认数据包中包括所述第二节点P2处理所述数据包的处理时间,其中所述处理时间等于从所述第三时刻到所述第四时刻经过的时间,即Tp2=Ts-Tr。In block S406, the second node P2 sends a confirmation data packet, and records the fourth time Ts when the confirmation data packet is sent, and the confirmation data packet includes the processing time for the second node P2 to process the data packet , Wherein the processing time is equal to the elapsed time from the third moment to the fourth moment, that is, Tp2=Ts-Tr.
在标准的TCP保持活跃数据包和TCP保持活跃确认数据包中不包括任何数据,而在本公开中,为了计算数据传输时间,可以对数据包进行扩展。The standard TCP keep-alive data packet and TCP keep-alive confirmation data packet do not include any data. In the present disclosure, in order to calculate the data transmission time, the data packet can be expanded.
具体地,对于TCP保持活跃数据包不需要进行扩展,而对于TCP保持活跃确认数据包,可以将其扩展为包括节点的数据处理时间。即,第二节点P2可以将其测量得到的第二节点的数据处理时间Tp2打包在TCP保持活跃确认数据包中,并发送给第一节点P1。Specifically, the TCP keep-alive data packet does not need to be extended, while for the TCP keep-alive acknowledgment data packet, it can be expanded to include the data processing time of the node. That is, the second node P2 may pack the measured data processing time Tp2 of the second node in a TCP keep-alive confirmation data packet, and send it to the first node P1.
也就是说,在第一节点P1接收到确认数据包时,通过对确认数据包进行解析,可以得到第二节点P2处理数据包的处理时间,从而使得第一节点P1可以根据第一节点P1发出数据包的第一时刻T1和接收确认数据包的第二时刻T2,以及接收到的确认数据包中所包括的第二节点P2的数据处理时间来确定从第一节点P1到第二节点P2的数据传输时间。That is to say, when the first node P1 receives the confirmation data packet, by analyzing the confirmation data packet, the processing time of the second node P2 to process the data packet can be obtained, so that the first node P1 can send out according to the first node P1 The first time T1 of the data packet and the second time T2 of receiving the confirmation data packet, and the data processing time of the second node P2 included in the received confirmation data packet determine the time from the first node P1 to the second node P2. Data transfer time.
在一个示例中,由于节点负荷也会影响数据传输时间,因此从第二节点P2向第一节点P1发送的确认数据包中还可以包括第二节点P2的负荷信息。在这种情况下,第一节点P1接收到TCP保持活跃确认数据包时,对确认数据包进行解析得到的信息可以包括节点处理时间Tp、节点的负荷信息Ln等。从而使得,第一节点P1除了基于其所记录的第一时刻、第二时刻,以及第二节点P2的处理时间,还会根据负荷信息来确定从第一节点到第二节点的数据传输时间。In an example, since the node load also affects the data transmission time, the confirmation data packet sent from the second node P2 to the first node P1 may also include the load information of the second node P2. In this case, when the first node P1 receives the TCP keep-alive confirmation packet, the information obtained by analyzing the confirmation packet may include the node processing time Tp, the node's load information Ln, and so on. Therefore, the first node P1 will determine the data transmission time from the first node to the second node based on the load information in addition to the recorded first time, second time, and the processing time of the second node P2.
结合等式(3)和(4),可以得到Tp1和Tp2之间的关系为:Combining equations (3) and (4), the relationship between Tp1 and Tp2 can be obtained as:
A/2-Tp2/2=B/2-Tp1/2A/2-Tp2/2=B/2-Tp1/2
Tp1=B-A+Tp2…(5)Tp1=B-A+Tp2...(5)
例如,在第一节点P1记录的第一往返传输时间为A,在第二节点P2记录的第二往返传输数据为B,在已知第二节点P2的第二数据处理时间Tp2的情况下,可以利用等式(5)来计算第一节点P1的第一数据处理时间Tp1。例如,在第一节点为边缘设备、第二节点为云平台的情况下,通常容易已知云平台的数据处理时间,则可以利用等式(5)来计算边缘设备的数据处理时间。For example, the first round-trip transmission time recorded at the first node P1 is A, and the second round-trip transmission data recorded at the second node P2 is B. In the case that the second data processing time Tp2 of the second node P2 is known, Equation (5) can be used to calculate the first data processing time Tp1 of the first node P1. For example, when the first node is an edge device and the second node is a cloud platform, it is usually easy to know the data processing time of the cloud platform, and equation (5) can be used to calculate the data processing time of the edge device.
在根据本公开的一个实施例中,可以基于数据传输时间Ttr来评估链路状态。如果Ttr较大,意味着在该链路上传输数据要花费较多的时间,这可能是由于链路不稳定或者过负载等。In an embodiment according to the present disclosure, the link state may be evaluated based on the data transmission time Ttr. If Ttr is large, it means that it takes more time to transmit data on the link, which may be due to unstable or overloaded link.
图5是示出了根据本公开的一个实施例的链路状态评估方法500的示例性过程的流程图。FIG. 5 is a flowchart showing an exemplary process of a link state evaluation method 500 according to an embodiment of the present disclosure.
在方框S502中,在两个节点之间重复执行以上参照图2-4所描述的确定数据传输时间的方法,来确定这两个节点之间的链路在一段时间内的多个数据传输时间。In block S502, the method for determining data transmission time described above with reference to FIGS. 2-4 is repeatedly executed between two nodes to determine multiple data transmissions of the link between the two nodes in a period of time. time.
在方框S504中,基于所述多个数据传输时间来评估所述链路的状态。In block S504, the state of the link is evaluated based on the plurality of data transmission times.
通过方框S502中的操作,可以得到针对一个链路在一段时间内的传输时间序列,例如Ttr1、Ttr2、Ttr3、…Ttrn。从时间数据在时间轴上的曲线,可以看到时间数据是稳定的、增加的还是减小的,从而可以知道对应的链路是稳定的、负载增多还是负载减少。节点可以根据链路的状态,选择适当的方式来传输数据。例如在链路超负荷的情况下,可以减少数据量的发送、或者增加传输间隙等,从而避免数据丢失或者可以减小传输延迟。Through the operation in block S502, a transmission time sequence for a link within a period of time can be obtained, for example, Ttr1, Ttr2, Ttr3,... Ttrn. From the curve of the time data on the time axis, we can see whether the time data is stable, increasing or decreasing, so that we can know whether the corresponding link is stable, the load increases or the load decreases. The node can choose an appropriate method to transmit data according to the state of the link. For example, in the case of link overload, the amount of data sent can be reduced, or the transmission gap can be increased, so as to avoid data loss or reduce transmission delay.
TCP在网络中广泛使用,一个节点可以使用不同的TCP连接分别与多个不同的节点连接。对于采用TCP连接的每一条链路,可以分别通过上述方法来计算多个数据传输时间。TCP is widely used in the network. A node can use different TCP connections to connect to multiple different nodes. For each link using a TCP connection, multiple data transmission times can be calculated separately through the above methods.
图6是示出了根据本公开的另一个实施例的链路状态评估方法600的示例性过程的流程图。FIG. 6 is a flowchart showing an exemplary process of a link state evaluation method 600 according to another embodiment of the present disclosure.
在方框S602中,针对一个节点与其它多个节点之间的多条链路中的每一条链路,重复执行以上参照图2-4所描述的确定数据传输时间的方法,分别计算每一条链路的多个数据传输时间。In block S602, for each of the multiple links between one node and multiple other nodes, repeat the method for determining the data transmission time described above with reference to Figures 2-4, and calculate each link separately. Multiple data transmission time of the link.
在方框S604中,存储每一条链路的多个数据传输时间。In block S604, store multiple data transmission times for each link.
例如,可以将一个节点与其他节点的每一条链路的多个数据传输时间本地存储在该节点中。For example, multiple data transmission times of each link between a node and other nodes can be stored locally in the node.
在方框S606中,当所述节点要在所述多条链路中的一条链路上进行数据传输时,可以基于所存储的该条链路的数据传输时间来评估该条链路的状态。In block S606, when the node wants to perform data transmission on one of the multiple links, the status of the link may be evaluated based on the stored data transmission time of the link .
通过上述操作,一个节点可以知道它与其它多个节点之间的多条链路各自的状态,当该节点要在多条链路中的一条链路上进行数据传输时,可以根据该链路的状态,选择适当的方式来传输数据。Through the above operations, a node can know the respective status of multiple links between it and multiple other nodes. When the node wants to transmit data on one of the multiple links, it can be based on the link Select the appropriate way to transfer data.
此外,可以知道,数据包大小也是影响在同一条链路上的传输时间的 因素。这意味着,在同一链路上,100字节数据包的传输时间和500字节数据包的传输时间是不同的。因此,可以分别构成不同大小的TCP保持活跃数据包,例如100字节大小、500字节大小和1000字节大小。此外,TCP保持活跃确认数据包的大小对应于TCP保持活跃数据包的大小。因此,在一个TCP连接的两端,应该给TCP保持活跃数据包及TCP保持活跃确认数据包填充随机数据来使其大小等于对应的大小。In addition, it can be known that the data packet size is also a factor that affects the transmission time on the same link. This means that on the same link, the transmission time of a 100-byte data packet and the transmission time of a 500-byte data packet are different. Therefore, TCP keepalive data packets of different sizes can be formed respectively, such as 100 bytes in size, 500 bytes in size, and 1000 bytes in size. In addition, the size of the TCP keep-alive confirmation packet corresponds to the size of the TCP keep-alive packet. Therefore, at both ends of a TCP connection, the TCP keep-alive packet and TCP keep-alive confirmation packet should be filled with random data to make the size equal to the corresponding size.
因此,在一个示例中,可以构造多种不同预定大小的数据包,例如分别构造100字节、500字节和1000字节三种数据包,针对每一条链路,分别采用每一种预定大小的数据包重复执行以上参照图2-4所描述的确定数据传输时间的方法,来计算多个数据传输时间。通过该操作,可以确定每一条链路在传输不同大小的数据包时的多个数据传输时间。在这种情况下,在存储一条链路的传输时间时,要分别记录不同大小的数据包所对应的多个数据传输时间。Therefore, in an example, a variety of data packets of different predetermined sizes can be constructed, for example, three data packets of 100 bytes, 500 bytes and 1000 bytes can be constructed respectively, and each predetermined size is adopted for each link. Repeat the method of determining the data transmission time described above with reference to Figures 2-4 to calculate multiple data transmission times. Through this operation, multiple data transmission times can be determined when each link transmits data packets of different sizes. In this case, when storing the transmission time of a link, multiple data transmission times corresponding to data packets of different sizes should be recorded separately.
这样,可以根据要传输数据的应用程序的需要,将TCP保持活跃数据包的大小设置为与该应用程序的数据所使用的数据包大小一样,从而确保所计算的数据传输时间更加精确。In this way, the size of the TCP keep-alive data packet can be set to be the same as the data packet size used by the data of the application according to the needs of the application program to transmit data, thereby ensuring that the calculated data transmission time is more accurate.
由于TCP保持活跃数据包在一个TCP连接的两端之间定期发送。因此,通过根据本公开的方法可以定期得到数据传输时间,也可以对存储的链路的数据传输时间定期进行更新,从而可以基于链路的数据传输时间来实时评估链路的状态。此外,也可以根据应用程序的需要来设置TCP保持活跃数据包的发送间隔,也即设置测量传输时间的周期,进一步确保评估链路状态的实时性和准确性。Because TCP keeps alive, data packets are periodically sent between the two ends of a TCP connection. Therefore, the data transmission time can be obtained periodically by the method according to the present disclosure, and the data transmission time of the stored link can also be periodically updated, so that the status of the link can be evaluated in real time based on the data transmission time of the link. In addition, you can also set the sending interval of TCP keep-alive data packets according to the needs of the application, that is, set the period of measuring the transmission time, to further ensure the real-time and accuracy of the evaluation of the link status.
边缘设备和云之间的连接是基于TCP的因特网链路。按照边缘设备的大小获取现场数据并发送至云。大多数从边缘设备到云的数据传输是基于TCP,例如OPC UA协议,https协议等。因此可以使用上述方法来计算边缘设备到云的链路的传输时间。基于传输时间,边缘设备可以实时评估链路状态,并且以对应的格式发送数据,例如在链路超负荷的情况下,可以减少数据量的发送、或者增加传输间隙等,从而避免数据丢失或者可以减小传输延迟。The connection between the edge device and the cloud is an Internet link based on TCP. Obtain field data according to the size of the edge device and send it to the cloud. Most data transmission from edge devices to the cloud is based on TCP, such as OPC UA protocol, https protocol and so on. Therefore, the above method can be used to calculate the transmission time of the link from the edge device to the cloud. Based on the transmission time, the edge device can evaluate the link status in real time and send data in the corresponding format. For example, when the link is overloaded, it can reduce the amount of data sent, or increase the transmission gap, so as to avoid data loss or can Reduce transmission delay.
根据本公开的传输时间确定方法和链路状态评估方法至少可以具有以下优势。The transmission time determination method and the link state evaluation method according to the present disclosure may have at least the following advantages.
根据本公开的传输时间确定方法和链路状态评估方法可以利用现有的TCP传输机制来自动计算两个节点之间的数据传输时间,基于该数据传输时间可以实时评估链路状态,从而,在链路超负荷的情况下,可以减少数据量的发送、或者增加传输间隙等,以避免数据丢失或者可以减小传输延迟。The transmission time determination method and the link state evaluation method according to the present disclosure can use the existing TCP transmission mechanism to automatically calculate the data transmission time between two nodes, and the link state can be evaluated in real time based on the data transmission time. When the link is overloaded, the amount of data sent can be reduced, or the transmission gap can be increased, so as to avoid data loss or reduce transmission delay.
根据本公开的方法使用现有的TCP传输机制,因此只要存在TCP连接,就可以采用根据本公开的方法,并且只需要对确认数据包进行细微的修改,因此对现有传输系统影响很小。The method according to the present disclosure uses the existing TCP transmission mechanism, so as long as there is a TCP connection, the method according to the present disclosure can be used, and only minor modifications to the confirmation data packet are required, so the existing transmission system has little impact.
大多数TCP连接使用TCP保持活跃机制来检查连接是否活跃。根据本公开的方法可以使用现有的TCP保持活跃的机制来计算传输时间,实时自动测量传输时间,而无需传输更多的数据包。Most TCP connections use the TCP keep-alive mechanism to check whether the connection is active. The method according to the present disclosure can use the existing TCP keep-alive mechanism to calculate the transmission time, and automatically measure the transmission time in real time without the need to transmit more data packets.
TCP保持活跃数据包在一个TCP连接的两端之间定期发送。因此,通过根据本公开的方法可以定期得到数据传输时间,从而可以实时评估链路的状态。也可以根据应用程序的需要设置TCP保持活跃数据包的发送间隔,也即设置传输时间的测量周期,从而进一步确保评估链路状态的实时性和准确性。TCP keep-alive packets are periodically sent between the two ends of a TCP connection. Therefore, the data transmission time can be obtained periodically by the method according to the present disclosure, so that the status of the link can be evaluated in real time. It is also possible to set the sending interval of TCP keep-active data packets according to the needs of the application, that is, to set the measurement period of the transmission time, so as to further ensure the real-time and accuracy of the assessment of the link status.
不同大小的数据包具有不同的传输时间,可以根据当前的应用程序,将TCP保持活跃数据包的大小设置为与该应用程序的数据所使用的数据包大小一样,从而确保所计算的数据传输时间更加精确。Data packets of different sizes have different transmission times. According to the current application, the size of the TCP keep-alive data packet can be set to be the same as the data packet size used by the application data to ensure the calculated data transmission time More precise.
图7是示出了根据本公开的一个实施例的确定数据传输时间的第一装置700的示例性配置的框图。FIG. 7 is a block diagram showing an exemplary configuration of a first device 700 for determining a data transmission time according to an embodiment of the present disclosure.
第一装置700包括第一发送单元702、第一接收单元704和传输时间确定单元706。The first device 700 includes a first sending unit 702, a first receiving unit 704, and a transmission time determining unit 706.
第一发送单元702被配置为向第二节点发送数据包,记录向所述第二节点发送所述数据包的第一时刻。The first sending unit 702 is configured to send a data packet to the second node, and record the first moment when the data packet is sent to the second node.
第一接收单元704被配置为从所述第二节点接收确认数据包,并且记录从所述第二节点接收到所述确认数据包的第二时刻,其中,所接收的确 认数据包中包括所述第二节点处理所述数据包的处理时间。The first receiving unit 704 is configured to receive a confirmation data packet from the second node, and to record a second moment when the confirmation data packet is received from the second node, wherein the received confirmation data packet includes all The processing time for the second node to process the data packet.
传输时间确定单元706被配置为至少基于所述第一时刻、所述第二时刻和所述处理时间确定从所述第一节点到所述第二节点的数据传输时间。The transmission time determining unit 706 is configured to determine the data transmission time from the first node to the second node based on at least the first moment, the second moment, and the processing time.
其中,传输时间确定单元706进一步被配置为基于所述第一时刻、所述第二时刻和所述处理时间以及所述负荷信息确定到所述第二节点的数据传输时间。Wherein, the transmission time determining unit 706 is further configured to determine the data transmission time to the second node based on the first moment, the second moment, the processing time, and the load information.
其中,所述数据包是TCP保持活跃数据包,所述确认数据包是TCP保持活跃确认数据包。Wherein, the data packet is a TCP keep-alive data packet, and the confirmation data packet is a TCP keep-alive confirmation data packet.
在一个示例中,第一装置700设置在边缘设备上,所述第二节点是云平台。In an example, the first device 700 is set on an edge device, and the second node is a cloud platform.
图8是示出了根据本公开的一个实施例的确定数据传输时间的第二装置800的示例性配置的框图。FIG. 8 is a block diagram showing an exemplary configuration of a second device 800 for determining data transmission time according to an embodiment of the present disclosure.
第二装置800包括第二接收单元802、处理单元804和第二发送单元806。The second device 800 includes a second receiving unit 802, a processing unit 804, and a second sending unit 806.
其中,第二接收单元802被配置为接收从第一装置700的第一发送单元702发送的数据包,并且记录接收到所述数据包的第三时刻。Wherein, the second receiving unit 802 is configured to receive a data packet sent from the first sending unit 702 of the first device 700, and record the third time when the data packet is received.
处理单元804被配置为对所述数据包进行处理。The processing unit 804 is configured to process the data packet.
第二发送单元806被配置为发送确认数据包,并且记录发送所述确认数据包的第四时刻,所述确认数据包中包括所述处理单元处理所述数据包的处理时间,其中,所述处理时间等于从所述第三时刻到所述第四时刻经过的时间。The second sending unit 806 is configured to send a confirmation data packet, and record the fourth moment when the confirmation data packet is sent, the confirmation data packet includes the processing time of the processing unit to process the data packet, wherein the The processing time is equal to the elapsed time from the third moment to the fourth moment.
在一个示例中,所述确认数据包中还包括所述第二节点的负荷信息。In an example, the confirmation data packet also includes load information of the second node.
在一个示例中,第二装置设置在云平台上,第一装置设置在边缘设备上。In one example, the second device is set on the cloud platform, and the first device is set on the edge device.
还需要说明的是,图7和图8所示的确定数据传输时间的第一装置700和第二装置800及其组成单元的结构仅仅是示例性的,本领域技术人员可以根据需要对图7和图8所示的结构框图进行修改。It should also be noted that the structures of the first device 700 and the second device 800 for determining the data transmission time and their constituent units shown in FIG. 7 and FIG. 8 are only exemplary, and those skilled in the art can compare FIG. 7 as needed. And the structural block diagram shown in Figure 8 is modified.
确定数据传输时间的第一装置700和第二装置800的各个部分的操作和功能的细节例如可以与参照结合图1-4描述的本公开的数据传输时间确 定方法200和400的实施例的相关部分相同或类似,这里不再详细描述。The details of the operations and functions of the various parts of the first device 700 and the second device 800 for determining the data transmission time may be related to the embodiments of the data transmission time determining methods 200 and 400 of the present disclosure described with reference to FIGS. 1-4, for example. The parts are the same or similar, and will not be described in detail here.
如上参照图1到图8,对根据本公开的实施例的数据传输时间确定方法和装置以及链路状态评估方法的实施例进行了描述。以上所述的方法和装置可以采用硬件实现,也可以采用软件或者硬件和软件的组合来实现。As above, referring to FIGS. 1 to 8, the embodiments of the method and device for determining the data transmission time and the method for evaluating the link state according to the embodiments of the present disclosure are described. The methods and devices described above can be implemented by hardware, or by software or a combination of hardware and software.
图9示出了根据本公开的实施例的实现确定数据传输时间或者进行的链路状态评估的计算设备900的方框图。根据一个实施例,计算设备900可以包括至少一个处理器902,处理器902执行在计算机可读存储介质(即,存储器904)中存储或编码的至少一个计算机可读指令(即,上述以软件形式实现的元素)。FIG. 9 shows a block diagram of a computing device 900 that implements determining data transmission time or performing link state evaluation according to an embodiment of the present disclosure. According to an embodiment, the computing device 900 may include at least one processor 902, which executes at least one computer-readable instruction stored or encoded in a computer-readable storage medium (ie, the memory 904) (ie, the above-mentioned in the form of software) Implemented elements).
应该理解,在存储器904中存储的计算机可执行指令当执行时使得至少一个处理器902执行本公开的各个实施例中以上结合图1-6描述的各种操作和功能。It should be understood that the computer-executable instructions stored in the memory 904, when executed, cause at least one processor 902 to perform the various operations and functions described above in conjunction with FIGS. 1-6 in the various embodiments of the present disclosure.
根据一个实施例,提供了一种非暂时性机器可读介质。该非暂时性机器可读介质可以具有机器可执行指令(即,上述以软件形式实现的元素),该指令当被机器执行时,使得机器执行本公开的各个实施例中以上结合图1-6描述的各种操作和功能。According to one embodiment, a non-transitory machine-readable medium is provided. The non-transitory machine-readable medium may have machine-executable instructions (that is, the above-mentioned elements implemented in the form of software), which when executed by a machine, cause the machine to execute the various embodiments of the present disclosure in conjunction with FIGS. 1-6. Various operations and functions described.
根据一个实施例,提供了一种计算机程序,包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本公开的各个实施例中以上结合图1-6描述的各种操作和功能。According to one embodiment, there is provided a computer program, including computer-executable instructions, which, when executed, cause at least one processor to execute each of the above described in conjunction with FIGS. 1-6 in the various embodiments of the present disclosure. Kinds of operations and functions.
根据一个实施例,提供了一种计算机程序产品,包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行本公开的各个实施例中以上结合图1-6描述的各种操作和功能。According to one embodiment, there is provided a computer program product, including computer-executable instructions, which, when executed, cause at least one processor to execute the above described in conjunction with FIGS. 1-6 in the various embodiments of the present disclosure. Various operations and functions.
上面结合附图阐述的具体实施方式描述了示例性实施例,但并不表示可以实现的或者落入权利要求书的保护范围的所有实施例。在整个本说明书中使用的术语“示例性”意味着“用作示例、实例或例示”,并不意味着比其它实施例“优选”或“具有优势”。出于提供对所描述技术的理解的目的,具体实施方式包括具体细节。然而,可以在没有这些具体细节的情况下实施这些技术。在一些实例中,为了避免对所描述的实施例的概念造成难以理解,公知的结构和装置以框图形式示出。The specific implementations set forth above in conjunction with the drawings describe exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the protection scope of the claims. The term "exemplary" used throughout this specification means "serving as an example, instance, or illustration", and does not mean "preferred" or "advantageous" over other embodiments. The detailed description includes specific details for the purpose of providing an understanding of the described technology. However, these techniques can be implemented without these specific details. In some instances, in order to avoid incomprehensibility to the concepts of the described embodiments, well-known structures and devices are shown in the form of block diagrams.
本公开内容的上述描述被提供来使得本领域任何普通技术人员能够实现或者使用本公开内容。对于本领域普通技术人员来说,对本公开内容进行的各种修改是显而易见的,并且,也可以在不脱离本公开内容的保护范围的情况下,将本文所定义的一般性原理应用于其它变型。因此,本公开内容并不限于本文所描述的示例和设计,而是与符合本文公开的原理和新颖性特征的最广范围相一致。The foregoing description of the present disclosure is provided to enable any person of ordinary skill in the art to implement or use the present disclosure. For those of ordinary skill in the art, various modifications to the present disclosure are obvious, and the general principles defined herein can also be applied to other modifications without departing from the scope of protection of the present disclosure. . Therefore, the present disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope that conforms to the principles and novel features disclosed herein.

Claims (13)

  1. 确定数据传输时间的方法,其中,数据传输基于传输控制协议,包括:A method for determining the data transmission time, where the data transmission is based on the transmission control protocol, including:
    第一发送步骤:第一节点向第二节点发送数据包,所述第一节点记录向所述第二节点发送所述数据包的第一时刻;The first sending step: the first node sends a data packet to the second node, and the first node records the first moment when the data packet is sent to the second node;
    第一接收步骤:所述第一节点从所述第二节点接收确认数据包,并且记录从所述第二节点接收到所述确认数据包的第二时刻,其中,所接收的确认数据包中包括所述第二节点处理所述数据包的处理时间;以及The first receiving step: the first node receives the confirmation data packet from the second node, and records the second time when the confirmation data packet is received from the second node, wherein the received confirmation data packet Including the processing time for the second node to process the data packet; and
    传输时间确定步骤:所述第一节点至少基于所述第一时刻、所述第二时刻和所述处理时间确定从所述第一节点到所述第二节点的数据传输时间。Transmission time determining step: The first node determines the data transmission time from the first node to the second node based on at least the first time, the second time, and the processing time.
  2. 如权利要求1所述的方法,所述确认数据包中还包括所述第二节点的负荷信息,其中,所述传输时间确定步骤包括:The method according to claim 1, wherein the confirmation data packet further includes load information of the second node, wherein the step of determining the transmission time includes:
    基于所述第一时刻、所述第二时刻和所述处理时间以及所述负荷信息确定从所述第一节点到所述第二节点的数据传输时间。The data transmission time from the first node to the second node is determined based on the first time, the second time, the processing time, and the load information.
  3. 如权利要求1或2所述的方法,其中,所述数据包是TCP保持活跃数据包,所述确认数据包是TCP保持活跃确认数据包。The method according to claim 1 or 2, wherein the data packet is a TCP keep-alive data packet, and the confirmation data packet is a TCP keep-alive confirmation data packet.
  4. 如权利要求1-3中任意一项所述的方法,其中,所述第一节点是边缘设备,所述第二节点是云平台。The method according to any one of claims 1 to 3, wherein the first node is an edge device, and the second node is a cloud platform.
  5. 确定数据传输时间的方法,所述数据传输基于传输控制协议,包括:A method for determining data transmission time, the data transmission is based on a transmission control protocol, and includes:
    第二接收步骤:第二节点接收从第一节点发送的数据包,并且记录接收到所述数据包的第三时刻;The second receiving step: the second node receives the data packet sent from the first node, and records the third time when the data packet is received;
    处理步骤:所述第二节点对所述数据包进行处理;以及Processing step: the second node processes the data packet; and
    第二发送步骤:所述第二节点发送确认数据包,并且记录发送所述确认数据包的第四时刻,所述确认数据包中包括所述第二节点处理所述数据包的处理时间,其中,所述处理时间为从所述第三时刻到所述第四时刻经 过的时间。The second sending step: the second node sends a confirmation data packet, and records the fourth moment when the confirmation data packet is sent, the confirmation data packet includes the processing time of the second node to process the data packet, wherein , The processing time is the elapsed time from the third time to the fourth time.
  6. 如权利要求5所述的方法,其中,所述确认数据包中还包括所述第二节点的负荷信息。The method according to claim 5, wherein the confirmation data packet further includes load information of the second node.
  7. 链路状态评估方法,包括:Link status assessment methods, including:
    第一节点和第二节点分别重复执行根据权利要求1-4中任意一项所述的方法和根据权利要求5-6中任意一项所述的方法,来确定所述第一节点和所述第二节点之间的链路的多个数据传输时间;以及The first node and the second node respectively repeatedly execute the method according to any one of claims 1-4 and the method according to any one of claims 5-6 to determine the first node and the Multiple data transmission times of the link between the second nodes; and
    基于所述多个数据传输时间来评估所述链路的状态。The state of the link is evaluated based on the plurality of data transmission times.
  8. 链路状态评估方法,包括:Link status assessment methods, including:
    传输时间计算步骤:针对一个节点与其它多个节点之间的多条链路中的每一条链路,重复执行根据权利要求1-4中任意一项所述的方法和根据权利要求5-6中任意一项所述的方法,分别计算每一条链路的多个数据传输时间;Transmission time calculation step: for each of the multiple links between one node and multiple other nodes, repeat the method according to any one of claims 1-4 and according to claims 5-6 In the method described in any one of the above, the multiple data transmission times of each link are calculated separately;
    存储步骤:存储每一条链路的多个数据传输时间;以及Storage steps: store multiple data transmission times for each link; and
    状态评估步骤:当所述节点要在所述多条链路中的一条链路上进行数据传输时,基于所存储的该条链路的数据传输时间来评估该条链路的状态。The state evaluation step: when the node wants to perform data transmission on one of the multiple links, the state of the link is evaluated based on the stored data transmission time of the link.
  9. 如权利要求8所述的方法,其中,The method of claim 8, wherein:
    所述传输时间计算步骤进一步包括:构造多种不同预定大小的数据包,针对所述每一条链路,分别计算传输每一种预定大小的数据包的多个数据传输时间;The transmission time calculation step further includes: constructing a plurality of data packets of different predetermined sizes, and for each link, respectively calculating multiple data transmission times for transmitting each data packet of the predetermined size;
    所述存储步骤进一步包括:存储在每一条链路上传输每一种预定大小的数据包所对应的多个数据传输时间。The storing step further includes: storing multiple data transmission times corresponding to each data packet of a predetermined size transmitted on each link.
  10. 计算设备(900),包括:Computing equipment (900), including:
    至少一个处理器(902);以及At least one processor (902); and
    与所述至少一个处理器(902)耦合的一个存储器(904),所述存储器 用于存储指令,当所述指令被所述至少一个处理器(902)执行时,使得所述处理器(902)执行如权利要求1到9中任意一项所述的方法。A memory (904) coupled to the at least one processor (902), where the memory is used to store instructions. When the instructions are executed by the at least one processor (902), the processor (902) ) Perform the method according to any one of claims 1 to 9.
  11. 一种非暂时性机器可读存储介质,其存储有可执行指令,所述指令当被执行时使得所述机器执行如权利要求1到9中任意一项所述的方法。A non-transitory machine-readable storage medium that stores executable instructions that, when executed, cause the machine to execute the method according to any one of claims 1 to 9.
  12. 一种计算机程序,包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行根据权利要求1至9中任意一项所述的方法。A computer program comprising computer-executable instructions that, when executed, cause at least one processor to execute the method according to any one of claims 1 to 9.
  13. 一种计算机程序产品,所述计算机程序产品被有形地存储在计算机可读介质上并且包括计算机可执行指令,所述计算机可执行指令在被执行时使至少一个处理器执行根据权利要求1至9中任意一项所述的方法。A computer program product that is tangibly stored on a computer-readable medium and includes computer-executable instructions, which when executed, cause at least one processor to execute according to claims 1 to 9 The method described in any one of.
PCT/CN2020/072080 2020-01-14 2020-01-14 Transmission time determination method, link state evaluation method, computing device, and medium WO2021142632A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/072080 WO2021142632A1 (en) 2020-01-14 2020-01-14 Transmission time determination method, link state evaluation method, computing device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/072080 WO2021142632A1 (en) 2020-01-14 2020-01-14 Transmission time determination method, link state evaluation method, computing device, and medium

Publications (1)

Publication Number Publication Date
WO2021142632A1 true WO2021142632A1 (en) 2021-07-22

Family

ID=76863381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/072080 WO2021142632A1 (en) 2020-01-14 2020-01-14 Transmission time determination method, link state evaluation method, computing device, and medium

Country Status (1)

Country Link
WO (1) WO2021142632A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925435A (en) * 2005-08-31 2007-03-07 华为技术有限公司 Method for obtaining chain circuit evaluating method
US20090310490A1 (en) * 2008-06-11 2009-12-17 Oki Electric Industry Co., Ltd. Radio communication system
CN105578553A (en) * 2015-12-23 2016-05-11 北京奇虎科技有限公司 Data communication initiating, relaying and receiving method and device thereof
CN108449772A (en) * 2017-02-16 2018-08-24 网宿科技股份有限公司 Routing resource and system, node server based on multi-path transmission protocol
CN110113641A (en) * 2019-04-17 2019-08-09 腾讯科技(深圳)有限公司 Transmission method, device, edge service node and the medium of video data
CN110545214A (en) * 2019-08-21 2019-12-06 视联动力信息技术股份有限公司 time delay detection method based on video network and switch

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925435A (en) * 2005-08-31 2007-03-07 华为技术有限公司 Method for obtaining chain circuit evaluating method
US20090310490A1 (en) * 2008-06-11 2009-12-17 Oki Electric Industry Co., Ltd. Radio communication system
CN105578553A (en) * 2015-12-23 2016-05-11 北京奇虎科技有限公司 Data communication initiating, relaying and receiving method and device thereof
CN108449772A (en) * 2017-02-16 2018-08-24 网宿科技股份有限公司 Routing resource and system, node server based on multi-path transmission protocol
CN110113641A (en) * 2019-04-17 2019-08-09 腾讯科技(深圳)有限公司 Transmission method, device, edge service node and the medium of video data
CN110545214A (en) * 2019-08-21 2019-12-06 视联动力信息技术股份有限公司 time delay detection method based on video network and switch

Similar Documents

Publication Publication Date Title
US11611498B2 (en) Round-trip time evaluation system, method, and apparatus
TWI528755B (en) A controller for delay measurement, a delay measurement system and a delay measurement method in sdn
EP2961102B1 (en) Method and device for monitoring network performance
EP2234333B1 (en) System and method for estimation of round trip times within a tcp based data network
US6445681B1 (en) Method for measuring delay parameters in a network
US10129123B2 (en) Measurement apparatus, communications apparatus, and relay apparatus
JP4778453B2 (en) Communication terminal, congestion control method, and congestion control program
US20100208613A1 (en) Efficient and loss tolerant method and mechanism for measuring available bandwidth
JP2004253934A (en) Radio communication system, server, base station, mobile terminal, and retransmit time out determining method therefor
KR20060100512A (en) Method and system for estimating average bandwidth in a communication network based on transmission control protocol
US20110255437A1 (en) Communication quality monitoring device, communication system, communication quality monitoring method and program thereof
US10038641B2 (en) Flow control device, communication system, control method for flow control device, and program
EP2922241B1 (en) Methods and apparatus to determine network delay with location independence from retransmission delay and application response time
Mohamed et al. Studying the TCP flow and congestion control mechanisms impact on Internet environment
WO2021142632A1 (en) Transmission time determination method, link state evaluation method, computing device, and medium
US11153220B2 (en) Methods and apparatus to determine network delay with location independence
US9503519B2 (en) Method and arrangement for the supervision of transactions in a peer-to-peer overlay network
JP5169441B2 (en) Network quality measurement system, network quality measurement method, and network quality measurement program
EP3085021B1 (en) Probing a network
ALBASRAWI Improve the performance of transport layer of TCP Protocol in wireless sensor network
Bansal et al. Enhancing MANET's performance: A transport layer solution
Mulugeta et al. Performance improvement of tcp using tcp-door-ts algorithm in mobile ad hoc networks
Qu An enhanced TCP Vegas algorithm based on route surveillance and bandwidth estimation over geo satellite networks
Hisch Performance evaluation of TCP flows
Kizhakkethottam et al. Routing Failure Recovery with Contention Window Adaptation in Wireless Networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20913157

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20913157

Country of ref document: EP

Kind code of ref document: A1