WO2012103701A1 - Method and gateway device for sending data - Google Patents

Method and gateway device for sending data Download PDF

Info

Publication number
WO2012103701A1
WO2012103701A1 PCT/CN2011/076190 CN2011076190W WO2012103701A1 WO 2012103701 A1 WO2012103701 A1 WO 2012103701A1 CN 2011076190 W CN2011076190 W CN 2011076190W WO 2012103701 A1 WO2012103701 A1 WO 2012103701A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
time window
storage area
area corresponding
current time
Prior art date
Application number
PCT/CN2011/076190
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/CN2011/076190 priority Critical patent/WO2012103701A1/en
Priority to CN201180001275.1A priority patent/CN102754396B/en
Publication of WO2012103701A1 publication Critical patent/WO2012103701A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information

Definitions

  • Embodiments of the present invention relate to the field of communication technologies, and, more particularly, to a method and a gateway device for transmitting data. Background technique
  • the sensor network gateway will play a very important role in the future Internet of Things era, and it will become the link between the sensor network and the traditional communication network.
  • the sensor network gateway can implement protocol conversion between the sensor network and the communication network, and different types of sensor networks, such as wide-area interconnection or local area interconnection.
  • the sensors in the Internet of Things send the collected data to the gateway in the form of data packets, and then forward them through the gateway to an external network (such as Ethernet) based on other protocols.
  • the gateway is responsible for protocol conversion between different networks, and then the gateway is responsible for protocol conversion between different networks, and then Forward the packet.
  • the gateway forwards the data packets collected by the sensor network to the external network, it does not consider the time delay characteristics of different data packets, but is directly forwarded.
  • the network bandwidth is narrow, some real-time data may not be sent in time. Non-emergency data packets will occupy the resources of real-time data, so that the emergency data of the sensor network cannot be reported in time.
  • the gateway needs to manage and efficiently forward data as much as possible to realize timely and effective scheduling and reporting of sensor data.
  • Embodiments of the present invention provide a method for transmitting data and a gateway device, which can reasonably forward a data packet of a sensor network based on a characteristic requirement of a data packet of a sensor network.
  • a method of transmitting data comprising: receiving a data packet from a sensor network, and determining an application layer data attribute and/or a delay requirement of the data packet; and applying layer data attributes according to the data packet and/or Or a delay request, determining a time window to which the data packet belongs, storing the data packet in a storage area corresponding to the determined time window; and, when reaching a sending time of the current time window, storing a storage area corresponding to the current time window
  • the packets stored in the package are packaged and the packaged packets are sent to another network.
  • a gateway device including: a first determining unit, configured to receive a data packet from a sensor network, and determine application layer data attributes and/or delay requirements of the data packet; a determining unit, configured to determine, according to an application layer data attribute and/or a delay requirement of the data packet, a time window to which the data packet belongs, and store the data packet in a storage area corresponding to the determined time window; And, when the sending time of the current time window is reached, the data packet stored in the storage area corresponding to the current time window is packaged, and the packaged data packet is sent to another network.
  • the embodiment of the invention uses a time window-based forwarding mechanism to determine the time window to which the data packet belongs according to the attribute or delay requirement of the data packet, and package and forward the data packet in the time window periodically, so as to reasonably send the different data packets.
  • the scheduling is performed, and the transmission delay of the data packet with high immediacy is reduced, and the timely and reasonable reporting of the sensor data is realized.
  • FIG. 1 is a flow chart of a packet forwarding method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of an example of a time window in accordance with an embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of a data packet forwarding method according to another embodiment of the present invention.
  • FIG. 4 is a schematic block diagram of a gateway device in accordance with an embodiment of the present invention.
  • FIG. 5 is a schematic block diagram of a gateway device according to another embodiment of the present invention. detailed description
  • Embodiments of the present invention enable reasonable scheduling of packet forwarding so that packets transmitted from the sensor network are packetized and sent to another network through a reasonable time window arrangement.
  • 1 is a flow chart of a packet forwarding method according to an embodiment of the present invention. The method of Figure 1 is performed by a gateway device.
  • 101 Receive a data packet from the sensor network, and determine application layer data attributes and/or delay requirements of the data packet.
  • 102. Determine, according to an application layer data attribute and/or a delay requirement of the data packet, a time window to which the data packet belongs, and store the data packet in a storage area corresponding to the determined time window.
  • the sending time of the current time window is reached, the data packet stored in the storage area corresponding to the current time window is packaged, and the packaged data packet is sent to another network.
  • the embodiment of the invention uses a time window-based forwarding mechanism to determine the time window to which the data packet belongs according to the attribute or delay requirement of the data packet, and package and forward the data packet in the time window periodically, so as to reasonably send the different data packets. Perform scheduling and reduce the transmission delay of packets with high immediacy.
  • the time window is used to solve the data packet queuing problem.
  • 2 is a schematic diagram of an example of a time window in accordance with an embodiment of the present invention.
  • the H ⁇ gateway uses six time windows, time window 0 to time window 5 shown on the left side of Figure 2.
  • the gateway will apply for a certain storage area for each time window to store the received data packets.
  • the gateway receives the data packet from the sensor network, reads the application layer data attributes and/or delay requirements of the data packet, and sequentially saves the data packet to the corresponding storage area (shaded in Figure 2), that is, The order in which packets are queued in the storage area is the order in which the gateway receives the packets.
  • the gateway can save these packets according to the time window until the gateway packages and sends the packets.
  • FIG. 3 is a schematic flow chart of a packet forwarding method according to another embodiment of the present invention.
  • the method of Figure 3 is performed by the gateway device, which uses a timer loop to control the sliding of the time window.
  • the method of Fig. 3 is described below in conjunction with Fig. 2.
  • the length of the timer is equal to the unit time of the time window. For example, if the unit time of the time window is T, the length of the timer is also T.
  • the current time window is changed to the next time window of the current time window, and the timer is restarted.
  • the current time window is sent at the current time window.
  • the gateway can start a timer, and each time a window time T is sent, the data packet (if any) in the storage area corresponding to the time window is sent.
  • H ⁇ is shown in Figure 2, and the sliding order of the time window is in a counterclockwise order.
  • the gateway starts the timer, and the timer length is T, that is, after the gateway passes the time T, the data packet in the time window 0 (ie, the current time window) is sent.
  • the time window 0 is rotated counterclockwise to the maximum numbered time window. Becomes a new time window 5.
  • time window 1 is rotated counterclockwise to time window 0 (ie, time window number minus 1) to become the new current time window.
  • Other time windows 2-4 rotate in turn to change their own time window number (for example, the respective time window number minus 1).
  • the process 300 of this embodiment may be performed before receiving a data packet, may be performed while receiving the data packet (for example, triggering a start timer by a receiving operation of the data packet), or may be elapsed after receiving the data packet.
  • the present invention does not limit this.
  • process 300 is shown in FIG. 3 as being performed prior to process 301, embodiments of the invention are not limited thereto. Process 300 can also be performed concurrently with process 301 or after process 301. These variations are all within the scope of embodiments of the invention.
  • 301 similar to 101 of FIG. 1, determining application layer data attributes and/or delay requirements of the received data packet.
  • the delay requirement of the data packet indicates that the gateway can save the time of the data packet, and the gateway can package and forward the data packet within the time range.
  • the delay requirement of a data packet can be expressed as a specific time value, such as 5ms, 15ms, and the like.
  • the delay requirement for the packet can be represented by a priority, and the highest priority delay requirement indicates that the packet is an urgent packet and needs to be forwarded immediately. The lower the priority, the longer the time saved at the gateway can be.
  • the application layer data attribute of the data packet can indicate the service nature of the data packet, such as a data packet indicating that the data packet is a measurement application such as temperature and humidity.
  • the application layer data attributes of the packet are defined by the sensing network and can also reflect the urgency of packet forwarding. For example, packets generated by applications with high immediacy requirements (such as security alarms) are urgent packets that need to be forwarded immediately. Packets generated by other applications can be delayed in transmission.
  • the application layer data attributes and/or latency requirements of the packet reflect the urgency of the packet forwarding.
  • a quantization process can be performed to determine the delay value of the packet based on the application layer data attributes and/or latency requirements of the packet.
  • the delay value D may be the time value.
  • a delay value D corresponding to a different application layer data attribute or a delay requirement priority may be specified.
  • the packet length of the data packet of time window 3 is almost equal to the maximum packet length of the external network, but there is no data packet in time window 2, which means that there are many packet delays in the data packet received by the gateway.
  • the value satisfies 3T ⁇ D ⁇ 4T, and the delay value of no packet satisfies 2T ⁇ D ⁇ 3T.
  • the storage area corresponding to the time window 3 may not be obtained.
  • the reason for this is: The delay requirements of the packets in the time window are the same, and the subsequent packets are backwards relative to the stored packets in the time window, so they can only be placed Behind the time window. Therefore, it not only satisfies the packet length specified by the external network, but also ensures the timeliness of the data packet.
  • the data packet is determined whether the length L of the data packet is greater than the remaining space Lr of the storage area corresponding to the determined time window.
  • L ⁇ Lr the data packet is stored in the storage area corresponding to the determined time window.
  • 1 1 ⁇ the data packet is stored in the storage area corresponding to the next time window of the determined time window.
  • it may be stored in the storage area corresponding to the next time window, or may be queued in the next time window.
  • the data packet stored in the storage area corresponding to the current time window is packaged, and the packaged data packet is sent to another network (for example, , Ethernet).
  • another network for example, , Ethernet
  • the transmission time of the current time window 0 is the time when the timer of the current time window 0 expires. Such as If the data packet does not exist in the storage area corresponding to the current time window 0 when the timer expires, the packet sending operation may not be performed. Alternatively, the data packet may be taken out from the subsequent time window 1-5, and the extracted data packet may be packaged and transmitted.
  • the stored data packet may be packaged and sent.
  • the data packet may be taken out from the storage area corresponding to the subsequent time window 1-5, and the storage area corresponding to the current time window 0 is The stored data packet is packaged and sent together with the extracted data packet.
  • the subsequent data packets are also packaged and sent together when the resource permits, that is, the packaged data is packed as much as possible.
  • the gateway packs and sends the data packet of the current time window 0.
  • the gateway only It can pack the data packet of the current time window 0; if the data packet of the current time window 0 is not full, it can be allowed to add a new data packet, then when the gateway is packaged and sent, it will judge that it can be subsequently obtained when the resource is allowed. How many packets are taken out of the window.
  • the order of taking out the data packets from the subsequent window is in the order in which the time windows are sent, and the data packets are sequentially taken out from the time window and packaged together with the data packets in the current time window 0.
  • the embodiment of the present invention can also perform special processing to ensure the timeliness of the emergency data packet.
  • the emergency data packet can be forwarded to another network immediately, and the data packet is not put into the network packet regardless of whether the time window to which the emergency data packet belongs can accommodate the data packet.
  • the time window to ensure the timeliness of the packet. Where resources permit, it is also possible to take appropriate packets from time windows 0-5 and package them with the urgent packets to make more efficient use of bandwidth.
  • the storage condition within the current time window 0 is determined.
  • the length L of the emergency data packet is less than or equal to the remaining space Lr ( L ⁇ Lr ) of the storage area corresponding to the current time window
  • the emergency data packet and the storage area corresponding to the current time window 0 are immediately
  • the data packets stored in the package are sent together and sent, and the data packets are no longer sent after the timer expires at time T. Since L ⁇ Lr, the total packet length of the packet packaged at this time does not exceed the maximum packet length Lmax allowed by the external network, and the original time window is guaranteed while ensuring the timeliness of the emergency data packet.
  • the gateway receives an urgent data packet, and the gateway will package the data packet in time window 0 together with the emergency data packet. Within the remaining time (T-t), the gateway will still receive the packet, and then at time T, the gateway will packetize the packet belonging to time window 0 received during the period (T-t).
  • some resources may be reserved for these emergency data packets in time window 0 or time window 1. These resources are not too many, that is, resources that satisfy 1 to 2 packets are reserved in a time window. Since emergency data packets are generally small, these reserved resources can meet the requirements of emergency data packets.
  • the emergency data packet is immediately forwarded to another network without placing the emergency data packet Within the time window.
  • a portion of the data packet may be fetched from the current time window 0 and packaged with the emergency data packet to more fully utilize the bandwidth.
  • the emergency packet when the length L of the emergency packet is greater than the remaining space Lr (L>Lr) of the storage area corresponding to the current time window 0, the emergency packet is allowed to be queued. Specifically, all or part of the data packets stored in the storage area corresponding to the current time window 0 may be transferred and stored into the subsequent time windows 1-5, so that the remaining space Lr of the storage area corresponding to the current time window 0 is greater than or It is equal to the length L of the emergency packet, and then the emergency packet is stored in the storage area corresponding to the current time window 0 after the above-described transfer processing.
  • the method for transmitting data classifies a data packet that needs to be forwarded by a gateway according to an application layer data attribute and/or a delay requirement of the data packet, and designs a time window-based forwarding mechanism.
  • the data packet is packaged and sent in the time window.
  • the embodiment of the present invention can improve the bandwidth utilization of the forwarding process of the gateway while considering the timeliness of the data packet.
  • various types of data collected by the sensor can be transmitted to an external network, such as an Ethernet network, through a reasonable arrangement and scheduling of the gateway, thereby realizing effective transmission of sensor data information.
  • Gateway device 40 of FIG. 4 is a schematic block diagram of a gateway device in accordance with an embodiment of the present invention.
  • Gateway device 40 of FIG. The first determining unit 41, the second determining unit 42, and the transmitting unit 43 are included.
  • the first determining unit 41 receives the data packet from the sensor network and determines the application layer data attributes and/or delay requirements for the data packet.
  • the second determining unit 42 determines, according to the application layer data attribute and/or the delay requirement of the data packet determined by the first determining unit 41, the time window to which the data packet belongs, in the storage area corresponding to the determined time window. Store the packet.
  • the transmitting unit 43 packs the data packets stored in the storage area corresponding to the current time window when the transmission time of the current time window is reached, and transmits the packaged data packet to another network.
  • the embodiment of the invention uses a time window-based forwarding mechanism to determine the time window to which the data packet belongs according to the attribute or delay requirement of the data packet, and package and forward the data packet in the time window periodically, so as to reasonably send the different data packets. Perform scheduling and reduce the transmission delay of packets with high immediacy.
  • the first determining unit 41, the second determining unit 42, and the transmitting unit 43 may respectively process the crying port.
  • the gateway device 40 can implement the various processes of the method embodiments described above.
  • the second determining unit 42 may determine the delay value of the data packet according to the application layer data attribute and/or the delay requirement of the data packet, and according to the ratio between the delay value of the data packet and the unit time of the time window, Determine the time window to which the packet belongs.
  • the second determining unit 42 may determine whether the length of the data packet is greater than a remaining space of the storage area corresponding to the determined time window, where the length of the data packet is less than or equal to the determined time window.
  • the data packet is stored in the storage area corresponding to the determined time window, and when the length of the data packet is greater than the remaining space of the storage area corresponding to the determined time window, The data packet is stored in a storage area corresponding to the next time window of the determined time window.
  • the sending unit 43 may further extract the data packet from the storage area corresponding to the subsequent time window and store the data stored in the storage area corresponding to the current time window, if the storage area corresponding to the current time window has remaining space.
  • the packet is packaged and sent together with the extracted packet.
  • FIG. 5 is a schematic block diagram of a gateway device according to another embodiment of the present invention.
  • a timer 51 and an emergency processing unit 52 are included in the gateway device 50 of Fig. 5, in addition to the first determining unit 41, the second determining unit 42, and the transmitting unit 43, shown in Fig. 4, a timer 51 and an emergency processing unit 52 are included.
  • Timer 51 and emergency processing unit 52 may each be a processor.
  • the length of the timer 51 is equal to the unit time of the time window.
  • the sending time of the current time window is the time when the timer 51 of the current time window expires.
  • the emergency processing unit 52 can immediately forward the emergency data packet to another network.
  • the emergency processing unit 52 may immediately forward the emergency data packet to another network when the length of the emergency data packet is greater than the remaining space of the storage area corresponding to the current time window.
  • the emergency processing unit 52 may immediately store the emergency data packet and the storage area corresponding to the current time window in a case where the length of the emergency data packet is less than or equal to the remaining space of the storage area corresponding to the current time window.
  • the packets are packaged and sent together.
  • the application layer data attribute and/or the delay requirement of the data packet indicates that the data packet is an urgent data packet that needs to be forwarded as soon as possible, and the length of the emergency data packet is greater than a current time window.
  • the emergency processing unit 52 may transfer all or part of the data packets stored in the storage area corresponding to the current time window to the subsequent time window, so that the current time window corresponds to The remaining space of the storage area is greater than or equal to the length of the emergency data packet, and the emergency data packet is stored in the storage area corresponding to the current time window.
  • the gateway device in the embodiment of the present invention classifies the data packets that need to be forwarded by the gateway according to the application layer data attribute and/or the delay requirement of the data packet, and designs a time window-based forwarding mechanism, and the gateway is in the time window. Packets are sent and sent within. In the embodiment of the present invention, the bandwidth utilization rate of the forwarding process of the gateway can be improved while considering the timeliness of the data packet.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another The system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential to the prior art or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Landscapes

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

Abstract

A method and gateway device for sending data are provided by the embodiments of the invention. The method includes: receiving a data packet from a sensor network, and determining the application layer data attribute and/or delay demand of the data packet; according to the application layer data attribute and/or delay demand of the data packet, determining the time window which the data packet belongs to, and storing the data packet in a storage area corresponding to the determined time window; when arriving a sending time of the current time window, packing the data packet stored in the storage area corresponding to current time window, and sending the packetized data packet to another network. The invention embodiments uses forwarding mechanism based on the time window, determines the time window for the data packet according to the application layer data attribute and/or delay demand of the data packet, and timely packs and forwards the data packet within the time window, therefore reasonable schedules the sending time for the different data packet, and debases the sending delay for the high instantaneity data packet.

Description

发送数据的方法和网关设备 技术领域  Method for transmitting data and gateway device
本发明实施例涉及通信技术领域, 并且更具体地, 涉及发送数据的方法 和网关设备。 背景技术  Embodiments of the present invention relate to the field of communication technologies, and, more particularly, to a method and a gateway device for transmitting data. Background technique
传感网网关在未来的物联网时代将扮演非常重要的角色, 它将成为连接 传感网与传统通信网络的纽带。 作为一种网关设备, 传感网网关可以实现传 感网与通信网络、 以及不同类型的传感网之间的协议转换, 例如实现广域互 联或局域互联。物联网中的传感器把采集到的数据以数据包的形式发送给网 关, 再通过网关转发到基于其他协议的外部网络(例如以太网) 中, 此时网 关负责不同网络之间的协议转换, 然后转发数据包。  The sensor network gateway will play a very important role in the future Internet of Things era, and it will become the link between the sensor network and the traditional communication network. As a gateway device, the sensor network gateway can implement protocol conversion between the sensor network and the communication network, and different types of sensor networks, such as wide-area interconnection or local area interconnection. The sensors in the Internet of Things send the collected data to the gateway in the form of data packets, and then forward them through the gateway to an external network (such as Ethernet) based on other protocols. At this time, the gateway is responsible for protocol conversion between different networks, and then the gateway is responsible for protocol conversion between different networks, and then Forward the packet.
网关在将传感网采集的数据包转发到外部网络时,没有考虑到不同数据 包的时间延迟特性, 而是一律直接转发, 当网络带宽较窄时, 可能造成一些 即时数据不能及时发送, 而非紧急数据包会占用即时数据的资源, 使得传感 网的紧急数据得不到及时上报。  When the gateway forwards the data packets collected by the sensor network to the external network, it does not consider the time delay characteristics of different data packets, but is directly forwarded. When the network bandwidth is narrow, some real-time data may not be sent in time. Non-emergency data packets will occupy the resources of real-time data, so that the emergency data of the sensor network cannot be reported in time.
因此, 网关处需要尽可能的对数据进行管理和高效转发以实现传感器数 据的及时有效调度和上报。 发明内容  Therefore, the gateway needs to manage and efficiently forward data as much as possible to realize timely and effective scheduling and reporting of sensor data. Summary of the invention
本发明实施例提供一种发送数据的方法和网关设备, 能够基于传感器网 络的数据包的特性需求合理转发传感器网络的数据包。  Embodiments of the present invention provide a method for transmitting data and a gateway device, which can reasonably forward a data packet of a sensor network based on a characteristic requirement of a data packet of a sensor network.
一方面, 提供了一种发送数据的方法, 包括: 接收来自传感器网络的数 据包,并确定该数据包的应用层数据属性和 /或延时要求;根据该数据包的应 用层数据属性和 /或延时要求,确定该数据包所属的时间窗口,在所确定的时 间窗口所对应的存储区域中存储该数据包; 在到达当前时间窗口的发送时刻 时, 将当前时间窗口所对应的存储区域中存储的数据包进行打包, 并将打包 后的数据包发送至另一网络。  In one aspect, a method of transmitting data is provided, comprising: receiving a data packet from a sensor network, and determining an application layer data attribute and/or a delay requirement of the data packet; and applying layer data attributes according to the data packet and/or Or a delay request, determining a time window to which the data packet belongs, storing the data packet in a storage area corresponding to the determined time window; and, when reaching a sending time of the current time window, storing a storage area corresponding to the current time window The packets stored in the package are packaged and the packaged packets are sent to another network.
另一方面, 提供了一种网关设备, 包括: 第一确定单元, 用于接收来自 传感器网络的数据包,并确定该数据包的应用层数据属性和 /或延时要求; 第 二确定单元,用于根据该数据包的应用层数据属性和 /或延时要求,确定该数 据包所属的时间窗口,在所确定的时间窗口所对应的存储区域中存储该数据 包; 发送单元, 用于在到达当前时间窗口的发送时刻时, 将当前时间窗口所 对应的存储区域中存储的数据包进行打包, 并将打包后的数据包发送至另一 网络。 In another aspect, a gateway device is provided, including: a first determining unit, configured to receive a data packet from a sensor network, and determine application layer data attributes and/or delay requirements of the data packet; a determining unit, configured to determine, according to an application layer data attribute and/or a delay requirement of the data packet, a time window to which the data packet belongs, and store the data packet in a storage area corresponding to the determined time window; And, when the sending time of the current time window is reached, the data packet stored in the storage area corresponding to the current time window is packaged, and the packaged data packet is sent to another network.
本发明实施例使用基于时间窗口的转发机制,根据数据包的属性或延时 要求确定数据包所属的时间窗口, 对时间窗口内的数据包定时打包转发, 从 而合理的对不同数据包的发送时间进行调度, 并降低即时性高的数据包的发 送时延, 实现传感器数据的及时合理上报。 附图说明  The embodiment of the invention uses a time window-based forwarding mechanism to determine the time window to which the data packet belongs according to the attribute or delay requirement of the data packet, and package and forward the data packet in the time window periodically, so as to reasonably send the different data packets. The scheduling is performed, and the transmission delay of the data packet with high immediacy is reduced, and the timely and reasonable reporting of the sensor data is realized. DRAWINGS
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技 术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面描述中的附图 仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only the present invention. For some embodiments, other drawings may be obtained from those of ordinary skill in the art without departing from the drawings.
图 1是根据本发明实施例的数据包转发方法的流程图。  1 is a flow chart of a packet forwarding method according to an embodiment of the present invention.
图 2是根据本发明实施例的时间窗口的一个例子的示意图。  2 is a schematic diagram of an example of a time window in accordance with an embodiment of the present invention.
图 3是根据本发明另一实施例的数据包转发方法的示意流程图。  FIG. 3 is a schematic flow chart of a data packet forwarding method according to another embodiment of the present invention.
图 4是根据本发明实施例的网关设备的示意框图。  4 is a schematic block diagram of a gateway device in accordance with an embodiment of the present invention.
图 5是根据本发明另一实施例的网关设备的示意框图。 具体实施方式  FIG. 5 is a schematic block diagram of a gateway device according to another embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创 造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without making creative labor are within the scope of the present invention.
本发明实施例能够对数据包转发进行合理调度,使得传感器网络中传来 的数据包通过合理的时间窗安排被打包并发送至另一网络之中。 图 1是根据 本发明实施例的数据包转发方法的流程图。 图 1的方法由网关设备执行。  Embodiments of the present invention enable reasonable scheduling of packet forwarding so that packets transmitted from the sensor network are packetized and sent to another network through a reasonable time window arrangement. 1 is a flow chart of a packet forwarding method according to an embodiment of the present invention. The method of Figure 1 is performed by a gateway device.
101 , 接收来自传感器网络的数据包, 并确定该数据包的应用层数据属 性和 /或延时要求。 102, 根据该数据包的应用层数据属性和 /或延时要求, 确定该数据包所 属的时间窗口, 在所确定的时间窗口所对应的存储区域中存储该数据包。 101. Receive a data packet from the sensor network, and determine application layer data attributes and/or delay requirements of the data packet. 102. Determine, according to an application layer data attribute and/or a delay requirement of the data packet, a time window to which the data packet belongs, and store the data packet in a storage area corresponding to the determined time window.
103 , 在到达当前时间窗口的发送时刻时, 将当前时间窗口所对应的存 储区域中存储的数据包进行打包, 并将打包后的数据包发送至另一网络。  103. When the sending time of the current time window is reached, the data packet stored in the storage area corresponding to the current time window is packaged, and the packaged data packet is sent to another network.
本发明实施例使用基于时间窗口的转发机制,根据数据包的属性或延时 要求确定数据包所属的时间窗口, 对时间窗口内的数据包定时打包转发, 从 而合理的对不同数据包的发送时间进行调度, 并降低即时性高的数据包的发 送时延。  The embodiment of the invention uses a time window-based forwarding mechanism to determine the time window to which the data packet belongs according to the attribute or delay requirement of the data packet, and package and forward the data packet in the time window periodically, so as to reasonably send the different data packets. Perform scheduling and reduce the transmission delay of packets with high immediacy.
本发明实施例中, 利用时间窗口解决数据包排队问题。 图 2是根据本发 明实施例的时间窗口的一个例子的示意图。 在图 2的例子中, H殳网关使用 6个时间窗口, 即图 2的左边所示的时间窗口 0至时间窗口 5。 每个时间窗 口的单位时间是 T, 例如 T=10ms。 假设时间窗口 0是当前时间窗口。  In the embodiment of the present invention, the time window is used to solve the data packet queuing problem. 2 is a schematic diagram of an example of a time window in accordance with an embodiment of the present invention. In the example of Figure 2, the H殳 gateway uses six time windows, time window 0 to time window 5 shown on the left side of Figure 2. The unit time per time window is T, for example T=10ms. Assume that time window 0 is the current time window.
网关会为每一个时间窗口申请一定的存储区域,用来存放接收到的数据 包。每个时间窗口所对应的存储区域的大小可以是能够满足外部网络协议规 定的最大包长 Lmax。 图 2右边所示的是一个时间窗口的例子, 其中阴影部 分是相应存储区域中已经存储的数据包, 占据的空间大小为 Ls。 空白部分是 存储区域中的剩余空间, 大小为 Lr。 阴影部分和空白部分的大小总和是存储 区 i或的大小 Lmax=Ls+Lr。  The gateway will apply for a certain storage area for each time window to store the received data packets. The size of the storage area corresponding to each time window may be the maximum packet length Lmax that can meet the requirements of the external network protocol. Shown on the right side of Figure 2 is an example of a time window in which the shaded portion is the already stored data packet in the corresponding storage area, occupying a space of Ls. The blank part is the remaining space in the storage area, and the size is Lr. The sum of the size of the shaded portion and the blank portion is the size of the storage area i or Lmax = Ls + Lr.
网关接收到来自传感网的数据包,读取数据包的应用层数据属性和 /或延 时要求, 把数据包依次保存到相应的存储区域中 (图 2 中的阴影部分), 也 就是说存储区域中数据包排队的顺序就是网关接收到数据包的顺序。 网关可 以按照时间窗口保存这些数据包, 直至网关把这些数据包打包发送出去。  The gateway receives the data packet from the sensor network, reads the application layer data attributes and/or delay requirements of the data packet, and sequentially saves the data packet to the corresponding storage area (shaded in Figure 2), that is, The order in which packets are queued in the storage area is the order in which the gateway receives the packets. The gateway can save these packets according to the time window until the gateway packages and sends the packets.
时间窗口的滑动和时间窗口所对应的存储区域中存储的数据包的发送 可通过定时器进行控制。 图 3是根据本发明另一实施例的数据包转发方法的 示意流程图。  The sliding of the time window and the transmission of the data packets stored in the storage area corresponding to the time window can be controlled by a timer. FIG. 3 is a schematic flow chart of a packet forwarding method according to another embodiment of the present invention.
图 3的方法由网关设备执行, 利用定时器循环控制时间窗口的滑动。 下 面结合图 2描述图 3的方法。  The method of Figure 3 is performed by the gateway device, which uses a timer loop to control the sliding of the time window. The method of Fig. 3 is described below in conjunction with Fig. 2.
300, 启动定时器, 该定时器的长度等于时间窗口的单位时间。 例如, 如果时间窗口的单位时间是 T, 则定时器的长度也是 T。  300, starting a timer, the length of the timer is equal to the unit time of the time window. For example, if the unit time of the time window is T, the length of the timer is also T.
在该定时器到期时,将当前时间窗口变为该当前时间窗口的下一时间窗 口, 并重新启动定时器。 另外, 当前时间窗口的发送时刻是当前时间窗口的 定时器到期的时刻。 换句话说, 时间窗口是滑动的, 网关可以启动定时器, 每经过一个窗口时间 T就发送该时间窗口所对应的存储区域中的数据包(如 果有的话)。 When the timer expires, the current time window is changed to the next time window of the current time window, and the timer is restarted. In addition, the current time window is sent at the current time window. The time when the timer expires. In other words, the time window is sliding, and the gateway can start a timer, and each time a window time T is sent, the data packet (if any) in the storage area corresponding to the time window is sent.
例如, H殳如图 2所示, 时间窗口的滑动顺序是逆时针顺序。 网关启动 定时器, 定时器长度为 T, 即网关经过时间 T之后, 发送时间窗口 0 (即, 当前时间窗口) 内的数据包, 此时, 时间窗口 0逆时针转动为最大编号的时 间窗口, 变为新的时间窗口 5。 同时, 时间窗口 1逆时针转动为时间窗口 0 (即, 时间窗口号减去 1 ), 成为新的当前时间窗口。 其他时间窗口 2-4依次 转动, 变换自己的时间窗口号 (例如, 各自的时间窗口号减去 1 )。  For example, H殳 is shown in Figure 2, and the sliding order of the time window is in a counterclockwise order. The gateway starts the timer, and the timer length is T, that is, after the gateway passes the time T, the data packet in the time window 0 (ie, the current time window) is sent. At this time, the time window 0 is rotated counterclockwise to the maximum numbered time window. Becomes a new time window 5. At the same time, time window 1 is rotated counterclockwise to time window 0 (ie, time window number minus 1) to become the new current time window. Other time windows 2-4 rotate in turn to change their own time window number (for example, the respective time window number minus 1).
应注意, 本实施例的过程 300可以在接收数据包之前执行, 可以在接收 数据包的同时执行(例如, 由数据包的接收操作触发启动定时器), 也可能 在接收数据包之后经过一定时间后执行, 本发明对此不作限制。  It should be noted that the process 300 of this embodiment may be performed before receiving a data packet, may be performed while receiving the data packet (for example, triggering a start timer by a receiving operation of the data packet), or may be elapsed after receiving the data packet. After the implementation, the present invention does not limit this.
另外, 虽然图 3中将过程 300显示为在过程 301之前执行, 但本发明实 施例不限于此。过程 300也可以与过程 301同时执行或者在过程 301之后执 行。 这些变化均落入本发明实施例的范围内。  Additionally, although process 300 is shown in FIG. 3 as being performed prior to process 301, embodiments of the invention are not limited thereto. Process 300 can also be performed concurrently with process 301 or after process 301. These variations are all within the scope of embodiments of the invention.
301 , 类似于图 1的 101 , 确定所接收的数据包的应用层数据属性和 /或 延时要求。  301, similar to 101 of FIG. 1, determining application layer data attributes and/or delay requirements of the received data packet.
针对不同应用场景而产生的数据包的应用层数据属性或延时要求可能 是不一样的。 数据包的延时要求表示网关可以保存该数据包的时间, 网关就 可以在这个时间的范围之内, 对数据包进行打包和转发。 例如, 数据包的延 时要求可以表现为具体的时间值, 例如 5ms、 15ms等。 或者, 数据包的延 时要求可以用优先级表示, 最高优先级的延时要求表示该数据包是紧急数据 包, 需要立即转发。 优先级越低, 表示在网关处保存的时间可以越长。  Application layer data attributes or latency requirements for packets generated for different application scenarios may be different. The delay requirement of the data packet indicates that the gateway can save the time of the data packet, and the gateway can package and forward the data packet within the time range. For example, the delay requirement of a data packet can be expressed as a specific time value, such as 5ms, 15ms, and the like. Alternatively, the delay requirement for the packet can be represented by a priority, and the highest priority delay requirement indicates that the packet is an urgent packet and needs to be forwarded immediately. The lower the priority, the longer the time saved at the gateway can be.
数据包的应用层数据属性可以表示该数据包的业务性质,如表示该数据 包是温度、 湿度等测量应用产生的数据包。 数据包的应用层数据属性是由传 感网来定义的, 也可以反映出数据包转发的紧急程度。 例如, 即时性要求较 高的应用 (如安全报警等)所产生的数据包是紧急数据包, 需要立即转发。 其他应用产生的数据包可以适当延迟发送。  The application layer data attribute of the data packet can indicate the service nature of the data packet, such as a data packet indicating that the data packet is a measurement application such as temperature and humidity. The application layer data attributes of the packet are defined by the sensing network and can also reflect the urgency of packet forwarding. For example, packets generated by applications with high immediacy requirements (such as security alarms) are urgent packets that need to be forwarded immediately. Packets generated by other applications can be delayed in transmission.
需要说明的是,根据当前通信的实际情况,在传感网与外部网络通信时, 无法端到端地获得并控制传统的 QoS ( Quality of Service, 业务质量), 但可 以容易地提取数据包的应用层数据属性或延时要求。 302,类似于图 1的 102,根据在 301中确定的数据包的应用层数据属性 和 /或延时要求,确定该数据包所属的时间窗口, 以在所确定的时间窗口所对 应的存储区域中存储该数据包。 It should be noted that, according to the actual situation of the current communication, when the sensor network communicates with the external network, the traditional QoS (Quality of Service) cannot be obtained and controlled end-to-end, but the data packet can be easily extracted. Application layer data attributes or latency requirements. 302, similar to 102 of FIG. 1, determining the time window to which the data packet belongs according to the application layer data attribute and/or the delay requirement of the data packet determined in 301, to the storage area corresponding to the determined time window. Store the packet in .
如上所述,数据包的应用层数据属性和 /或延时要求反映了该数据包转发 的紧急程度。可以进行量化处理,根据数据包的应用层数据属性和 /或延时要 求, 确定该数据包的延时值0。 例如, 在延时要求是时间值的情况下, 延时 值 D可以是该时间值。或者,可以规定不同应用层数据属性或延时要求优先 级所对应的延时值 D。  As mentioned above, the application layer data attributes and/or latency requirements of the packet reflect the urgency of the packet forwarding. A quantization process can be performed to determine the delay value of the packet based on the application layer data attributes and/or latency requirements of the packet. For example, in the case where the delay requirement is a time value, the delay value D may be the time value. Alternatively, a delay value D corresponding to a different application layer data attribute or a delay requirement priority may be specified.
得到延时值 D之后,可根据数据包的延时值 D和时间窗口的单位时间 T 之间的比值, 确定数据包所属的时间窗口。 参照图 2 , 时间窗口 0可对应于 0<D<T, 即 0<D/T≤1 ; 时间窗口 1可对应于 T<D≤2T, 即 1<D/T≤2; 如此类 推。 在图 2的例子中, 时间窗口 3的数据包的包长几乎等于外部网络的最大 包长, 但是时间窗口 2中没有数据包, 这表示网关收到的数据包中有很多数 据包的延时值满足 3T<D≤4T, 而没有数据包的延时值满足 2T<D≤3T。  After the delay value D is obtained, the time window to which the data packet belongs can be determined according to the ratio between the delay value D of the data packet and the unit time T of the time window. Referring to FIG. 2, time window 0 may correspond to 0<D<T, that is, 0<D/T≤1; time window 1 may correspond to T<D≤2T, that is, 1<D/T≤2; and so on. In the example of FIG. 2, the packet length of the data packet of time window 3 is almost equal to the maximum packet length of the external network, but there is no data packet in time window 2, which means that there are many packet delays in the data packet received by the gateway. The value satisfies 3T < D ≤ 4T, and the delay value of no packet satisfies 2T < D ≤ 3T.
此外, 如果某些时间窗口 (例如图 2所示的时间窗口 3 ) 中的数据包较 多, 而后续仍接收到属于时间窗口 3的数据包, 可能导致该时间窗口 3所对 应的存储区域没有足够的剩余空间来存储后续的数据包, 此时可将后续数据 包放到后面的时间窗口 (例如, 时间窗口 4或时间窗口 5 ) 中。 这样做的原 因是: 在该时间窗口内的数据包的延时要求都是一样的, 而后续数据包相对 于本时间窗口内已存储的数据包来说是后到的, 所以只能放在后面的时间窗 口内。从而既满足了外部网络所规定的包长,也尽量保证了数据包的时效性。  In addition, if there are more data packets in some time windows (such as time window 3 shown in FIG. 2), and subsequent data packets belonging to time window 3 are still received, the storage area corresponding to the time window 3 may not be obtained. There is enough free space to store subsequent packets, and subsequent packets can be placed in a later time window (for example, Time Window 4 or Time Window 5). The reason for this is: The delay requirements of the packets in the time window are the same, and the subsequent packets are backwards relative to the stored packets in the time window, so they can only be placed Behind the time window. Therefore, it not only satisfies the packet length specified by the external network, but also ensures the timeliness of the data packet.
具体而言,可判断数据包的长度 L是否大于所确定的时间窗口所对应的 存储区域的剩余空间 Lr。 在 L≤Lr时, 在所确定的时间窗口所对应的存储区 域中存储该数据包。 另一方面, 在 1 1^时, 在所确定的时间窗口的下一时 间窗口所对应的存储区域中存储该数据包。 另外, 在下一时间窗口所对应的 存储区域也没有足够的剩余空间时,可以存储至再下一个时间窗口所对应的 存储区域, 或者在下一时间窗口中插队。  Specifically, it can be determined whether the length L of the data packet is greater than the remaining space Lr of the storage area corresponding to the determined time window. When L ≤ Lr, the data packet is stored in the storage area corresponding to the determined time window. On the other hand, at 1 1^, the data packet is stored in the storage area corresponding to the next time window of the determined time window. In addition, when there is not enough free space in the storage area corresponding to the next time window, it may be stored in the storage area corresponding to the next time window, or may be queued in the next time window.
303 , 类似于图 1的 103 , 在到达当前时间窗口的发送时刻时, 将当前时 间窗口所对应的存储区域中存储的数据包进行打包, 并将打包后的数据包发 送至另一网络(例如, 以太网)。  303. Similar to 103 in FIG. 1, when the sending time of the current time window is reached, the data packet stored in the storage area corresponding to the current time window is packaged, and the packaged data packet is sent to another network (for example, , Ethernet).
当前时间窗口 0的发送时刻是当前时间窗口 0的定时器到期的时刻。如 果定时器到期时, 当前时间窗口 0所对应的存储区域中没有存储数据包, 则 可以不进行打包发送操作。 或者, 可以从后续时间窗口 1-5中取出数据包, 对所取出的数据包进行打包发送。 The transmission time of the current time window 0 is the time when the timer of the current time window 0 expires. Such as If the data packet does not exist in the storage area corresponding to the current time window 0 when the timer expires, the packet sending operation may not be performed. Alternatively, the data packet may be taken out from the subsequent time window 1-5, and the extracted data packet may be packaged and transmitted.
如果定时器到期时,当前时间窗口 0所对应的存储区域中有存储数据包, 则可以对所存储的数据包进行打包发送。  If the storage packet exists in the storage area corresponding to the current time window 0 when the timer expires, the stored data packet may be packaged and sent.
另外, 在当前时间窗口 0所对应的存储区域还有剩余空间的情况下, 可 以从后续时间窗口 1-5所对应的存储区域中取出数据包, 并将当前时间窗口 0所对应的存储区域中存储的数据包和取出的数据包一起进行打包发送。 这 样, 可以在保证当前时间窗口 0内数据包被打包发送的情况下, 将后面的数 据包在资源允许的情况下也一起打包发送,也就是说尽量把打包的数据包装 满。  In addition, in a case where there is remaining space in the storage area corresponding to the current time window 0, the data packet may be taken out from the storage area corresponding to the subsequent time window 1-5, and the storage area corresponding to the current time window 0 is The stored data packet is packaged and sent together with the extracted data packet. In this way, in the case that the data packet is packaged and sent in the current time window 0, the subsequent data packets are also packaged and sent together when the resource permits, that is, the packaged data is packed as much as possible.
此时, 网关在对当前时间窗口 0的数据包进行打包发送时, 会做出如下 的判断: 如果当前时间窗口 0的数据包已经排满, 已经不允许加入新的数据 包, 那么网关就只能打包当前时间窗口 0的数据包; 如果当前时间窗口 0的 数据包没有排满, 可以允许加入新的数据包, 那么网关在打包发送时, 就会 判断在资源允许的情况下能从后续的窗口取出多少数据包。从后续窗口取出 数据包的顺序是按照时间窗口的发送顺序,依次从时间窗口中取出数据包后 和当前时间窗口 0内的数据包一起打包发送。  At this time, when the gateway packs and sends the data packet of the current time window 0, the following judgment is made: If the current time window 0 data packet is already full, and the new data packet is not allowed to be added, the gateway only It can pack the data packet of the current time window 0; if the data packet of the current time window 0 is not full, it can be allowed to add a new data packet, then when the gateway is packaged and sent, it will judge that it can be subsequently obtained when the resource is allowed. How many packets are taken out of the window. The order of taking out the data packets from the subsequent window is in the order in which the time windows are sent, and the data packets are sequentially taken out from the time window and packaged together with the data packets in the current time window 0.
这样做不仅可以充分利用带宽,尤其可以有效降低后续的待发时间窗口 内的数据包的转发时延。  This not only makes full use of the bandwidth, but also effectively reduces the forwarding delay of the data packets in the subsequent pending time window.
上面描述了常规数据包的窗口排队和窗口转发机制。在数据包的应用层 数据属性和 /或延时要求指示所述数据包为需要尽快转发的紧急数据包的情 况下, 本发明实施例还可以进行特殊处理, 以保证紧急数据包的时效性。  The window queuing and window forwarding mechanisms of conventional data packets are described above. In the case where the application layer data attribute and/or the delay requirement of the data packet indicates that the data packet is an urgent data packet that needs to be forwarded as soon as possible, the embodiment of the present invention can also perform special processing to ensure the timeliness of the emergency data packet.
可选地, 在一个实施例中, 可以立即转发所述紧急数据包至另一网络, 而不论该紧急数据包所属的时间窗口是否可以容纳下该数据包,都不会把该 数据包放入时间窗口内, 以保证该数据包的时效性。 在资源允许的情况下, 还可以从时间窗口 0-5中取出合适的数据包, 与该紧急数据包一起进行打包 发送, 从而更充分地利用带宽。  Optionally, in one embodiment, the emergency data packet can be forwarded to another network immediately, and the data packet is not put into the network packet regardless of whether the time window to which the emergency data packet belongs can accommodate the data packet. Within the time window to ensure the timeliness of the packet. Where resources permit, it is also possible to take appropriate packets from time windows 0-5 and package them with the urgent packets to make more efficient use of bandwidth.
作为另一实施例, 判断当前时间窗口 0内的存储情况。 在紧急数据包的 长度 L 小于或等于所述当前时间窗口所对应的存储区域的剩余空间 Lr ( L<Lr )的情况下, 立即将紧急数据包和当前时间窗口 0所对应的存储区域 中存储的数据包一起进行打包发送,而不再等计时器计时到时间 T后发送这 些数据包。 由于 L≤Lr, 因此此时一起打包的数据包的总包长不会超出外部 网络允许的最大包长 Lmax, 能够在保证紧急数据包的时效性的同时, 还保 证了原有的时间窗口 0内的数据包的时效性, 同时提高了带宽利用率。 As another embodiment, the storage condition within the current time window 0 is determined. When the length L of the emergency data packet is less than or equal to the remaining space Lr ( L<Lr ) of the storage area corresponding to the current time window, the emergency data packet and the storage area corresponding to the current time window 0 are immediately The data packets stored in the package are sent together and sent, and the data packets are no longer sent after the timer expires at time T. Since L ≤ Lr, the total packet length of the packet packaged at this time does not exceed the maximum packet length Lmax allowed by the external network, and the original time window is guaranteed while ensuring the timeliness of the emergency data packet. The timeliness of the data packets within, while improving bandwidth utilization.
例如, 假设当网关计时到时间 t时, 网关收到了一个紧急数据包, 网关 就会把时间窗口 0内的数据包和这个紧急数据包一起打包发送。在剩余的时 间 (T-t )之内, 网关依然会接收数据包, 然后在时间 T 时, 网关把(T-t ) 这段时间内收到的属于时间窗口 0的数据包进行打包发送。  For example, suppose that when the gateway times out to time t, the gateway receives an urgent data packet, and the gateway will package the data packet in time window 0 together with the emergency data packet. Within the remaining time (T-t), the gateway will still receive the packet, and then at time T, the gateway will packetize the packet belonging to time window 0 received during the period (T-t).
作为保证时间窗口内的剩余空间能够容纳紧急数据包的一个实施例, 可 以在时间窗口 0或者时间窗口 1内, 为这些紧急数据包预留一些资源。 这些 资源不会太多, 也就是一个时间窗口内会预留满足 1到 2个数据包的资源。 由于紧急数据包一般比较少, 这些预留的资源可以满足紧急数据包的要求。  As an embodiment of ensuring that the remaining space within the time window can accommodate emergency data packets, some resources may be reserved for these emergency data packets in time window 0 or time window 1. These resources are not too many, that is, resources that satisfy 1 to 2 packets are reserved in a time window. Since emergency data packets are generally small, these reserved resources can meet the requirements of emergency data packets.
另夕卜,在紧急数据包的长度 L大于当前时间窗口 0所对应的存储区域的 剩余空间 Lr ( L>Lr ) 时, 立即转发紧急数据包至另一网络, 而不将紧急数 据包放入时间窗口内。 作为另一实施例, 在资源允许的情况下, 可以从当前 时间窗口 0中取出部分数据包, 与该紧急数据包一起进行打包发送, 从而更 充分地利用带宽。  In addition, when the length L of the emergency data packet is greater than the remaining space Lr ( L>Lr ) of the storage area corresponding to the current time window 0, the emergency data packet is immediately forwarded to another network without placing the emergency data packet Within the time window. As another embodiment, in the case where resources permit, a portion of the data packet may be fetched from the current time window 0 and packaged with the emergency data packet to more fully utilize the bandwidth.
或者,在紧急数据包的长度 L大于当前时间窗口 0所对应的存储区域的 剩余空间 Lr ( L>Lr ) 时, 允许紧急数据包插队。 具体地, 可将当前时间窗 口 0所对应的存储区域中存储的全部或部分数据包转移存储到后续时间窗口 1-5中, 以使得当前时间窗口 0所对应的存储区域的剩余空间 Lr大于或等于 紧急数据包的长度 L, 然后在上述转移处理之后的当前时间窗口 0所对应的 存储区域中存储该紧急数据包。  Alternatively, when the length L of the emergency packet is greater than the remaining space Lr (L>Lr) of the storage area corresponding to the current time window 0, the emergency packet is allowed to be queued. Specifically, all or part of the data packets stored in the storage area corresponding to the current time window 0 may be transferred and stored into the subsequent time windows 1-5, so that the remaining space Lr of the storage area corresponding to the current time window 0 is greater than or It is equal to the length L of the emergency packet, and then the emergency packet is stored in the storage area corresponding to the current time window 0 after the above-described transfer processing.
本发明实施例的发送数据的方法根据数据包的应用层数据属性和 /或延 时要求, 对需要网关转发的数据包进行筒单分类, 并设计了一种基于时间窗 口的转发机制, 网关在时间窗口内对数据包进行打包发送。 本发明实施例能 够在考虑数据包的时效性的同时, 提高网关的转发处理对带宽的利用率。 例 如, 在无线传感网中, 通过采用上述方法, 传感器采集到的各类数据可经网 关合理的安排和调度被传送至外部网络, 如以太网, 从而实现传感器数据信 息的有效传递。  The method for transmitting data according to the embodiment of the present invention classifies a data packet that needs to be forwarded by a gateway according to an application layer data attribute and/or a delay requirement of the data packet, and designs a time window-based forwarding mechanism. The data packet is packaged and sent in the time window. The embodiment of the present invention can improve the bandwidth utilization of the forwarding process of the gateway while considering the timeliness of the data packet. For example, in the wireless sensor network, by adopting the above method, various types of data collected by the sensor can be transmitted to an external network, such as an Ethernet network, through a reasonable arrangement and scheduling of the gateway, thereby realizing effective transmission of sensor data information.
图 4是根据本发明实施例的网关设备的示意框图。 图 4的网关设备 40 包括第一确定单元 41、 第二确定单元 42和发送单元 43。 4 is a schematic block diagram of a gateway device in accordance with an embodiment of the present invention. Gateway device 40 of FIG. The first determining unit 41, the second determining unit 42, and the transmitting unit 43 are included.
第一确定单元 41接收来自传感器网络的数据包, 并确定该数据包的应 用层数据属性和 /或延时要求。第二确定单元 42根据第一确定单元 41所确定 的该数据包的应用层数据属性和 /或延时要求, 确定该数据包所属的时间窗 口, 在所确定的时间窗口所对应的存储区域中存储该数据包。 发送单元 43 在到达当前时间窗口的发送时刻时,将当前时间窗口所对应的存储区域中存 储的数据包进行打包, 并将打包后的数据包发送至另一网络。  The first determining unit 41 receives the data packet from the sensor network and determines the application layer data attributes and/or delay requirements for the data packet. The second determining unit 42 determines, according to the application layer data attribute and/or the delay requirement of the data packet determined by the first determining unit 41, the time window to which the data packet belongs, in the storage area corresponding to the determined time window. Store the packet. The transmitting unit 43 packs the data packets stored in the storage area corresponding to the current time window when the transmission time of the current time window is reached, and transmits the packaged data packet to another network.
本发明实施例使用基于时间窗口的转发机制,根据数据包的属性或延时 要求确定数据包所属的时间窗口, 对时间窗口内的数据包定时打包转发, 从 而合理的对不同数据包的发送时间进行调度, 并降低即时性高的数据包的发 送时延。第一确定单元 41、第二确定单元 42和发送单元 43可以分别是处理 哭口。  The embodiment of the invention uses a time window-based forwarding mechanism to determine the time window to which the data packet belongs according to the attribute or delay requirement of the data packet, and package and forward the data packet in the time window periodically, so as to reasonably send the different data packets. Perform scheduling and reduce the transmission delay of packets with high immediacy. The first determining unit 41, the second determining unit 42, and the transmitting unit 43 may respectively process the crying port.
网关设备 40可以实现上面所述的方法实施例的各个过程。 例如, 第二 确定单元 42可根据数据包的应用层数据属性和 /或延时要求, 确定数据包的 延时值, 并根据数据包的延时值和时间窗口的单位时间之间的比值, 确定该 数据包所属的时间窗口。  The gateway device 40 can implement the various processes of the method embodiments described above. For example, the second determining unit 42 may determine the delay value of the data packet according to the application layer data attribute and/or the delay requirement of the data packet, and according to the ratio between the delay value of the data packet and the unit time of the time window, Determine the time window to which the packet belongs.
可选地, 作为一个实施例, 第二确定单元 42可判断数据包的长度是否 大于所确定的时间窗口所对应的存储区域的剩余空间,在该数据包的长度小 于或等于所确定的时间窗口所对应的存储区域的剩余空间时,在所确定的时 间窗口所对应的存储区域中存储该数据包, 并且在该数据包的长度大于所确 定的时间窗口所对应的存储区域的剩余空间时,在所确定的时间窗口的下一 时间窗口所对应的存储区域中存储该数据包。  Optionally, as an embodiment, the second determining unit 42 may determine whether the length of the data packet is greater than a remaining space of the storage area corresponding to the determined time window, where the length of the data packet is less than or equal to the determined time window. When the remaining space of the corresponding storage area is used, the data packet is stored in the storage area corresponding to the determined time window, and when the length of the data packet is greater than the remaining space of the storage area corresponding to the determined time window, The data packet is stored in a storage area corresponding to the next time window of the determined time window.
发送单元 43还可以在当前时间窗口所对应的存储区域还有剩余空间的 情况下, 从后续时间窗口所对应的存储区域中取出数据包, 并将当前时间窗 口所对应的存储区域中存储的数据包和取出的数据包一起进行打包发送。  The sending unit 43 may further extract the data packet from the storage area corresponding to the subsequent time window and store the data stored in the storage area corresponding to the current time window, if the storage area corresponding to the current time window has remaining space. The packet is packaged and sent together with the extracted packet.
图 5是根据本发明另一实施例的网关设备的示意框图。在图 5的网关设 备 50中, 除了图 4所示的第一确定单元 41、 第二确定单元 42和发送单元 43之外, 还包括定时器 51和紧急处理单元 52。 定时器 51和紧急处理单元 52可以分别是处理器。  FIG. 5 is a schematic block diagram of a gateway device according to another embodiment of the present invention. In the gateway device 50 of Fig. 5, in addition to the first determining unit 41, the second determining unit 42, and the transmitting unit 43, shown in Fig. 4, a timer 51 and an emergency processing unit 52 are included. Timer 51 and emergency processing unit 52 may each be a processor.
定时器 51的长度等于时间窗口的单位时间, 在定时器 51到期时, 将当 前时间窗口变为当前时间窗口的下一时间窗口,并重新启动定时器 51。其中, 所述当前时间窗口的发送时刻是当前时间窗口的定时器 51到期的时刻。 在数据包的应用层数据属性和 /或延时要求指示该数据包为需要尽快转 发的紧急数据包的情况下, 紧急处理单元 52可立即转发该紧急数据包至另 一网络。 或者, 紧急处理单元 52可在该紧急数据包的长度大于当前时间窗 口所对应的存储区域的剩余空间时, 立即转发该紧急数据包至另一网络。 或 者, 紧急处理单元 52可在该紧急数据包的长度小于或等于当前时间窗口所 对应的存储区域的剩余空间的情况下, 立即将该紧急数据包和当前时间窗口 所对应的存储区域中存储的数据包一起进行打包发送。 The length of the timer 51 is equal to the unit time of the time window. When the timer 51 expires, the current time window is changed to the next time window of the current time window, and the timer 51 is restarted. among them, The sending time of the current time window is the time when the timer 51 of the current time window expires. In the case where the application layer data attribute and/or delay requirement of the data packet indicates that the data packet is an urgent data packet that needs to be forwarded as soon as possible, the emergency processing unit 52 can immediately forward the emergency data packet to another network. Alternatively, the emergency processing unit 52 may immediately forward the emergency data packet to another network when the length of the emergency data packet is greater than the remaining space of the storage area corresponding to the current time window. Alternatively, the emergency processing unit 52 may immediately store the emergency data packet and the storage area corresponding to the current time window in a case where the length of the emergency data packet is less than or equal to the remaining space of the storage area corresponding to the current time window. The packets are packaged and sent together.
可选地,在另一实施例中,在数据包的应用层数据属性和 /或延时要求指 示所述数据包为需要尽快转发的紧急数据包,且该紧急数据包的长度大于当 前时间窗口所对应的存储区域的剩余空间的情况下, 紧急处理单元 52可将 当前时间窗口所对应的存储区域中存储的全部或部分数据包转移存储到后 续时间窗口中, 以使得当前时间窗口所对应的存储区域的剩余空间大于或等 于该紧急数据包的长度, 并在当前时间窗口所对应的存储区域中存储该紧急 数据包。  Optionally, in another embodiment, the application layer data attribute and/or the delay requirement of the data packet indicates that the data packet is an urgent data packet that needs to be forwarded as soon as possible, and the length of the emergency data packet is greater than a current time window. In the case of the remaining space of the corresponding storage area, the emergency processing unit 52 may transfer all or part of the data packets stored in the storage area corresponding to the current time window to the subsequent time window, so that the current time window corresponds to The remaining space of the storage area is greater than or equal to the length of the emergency data packet, and the emergency data packet is stored in the storage area corresponding to the current time window.
本发明实施例的网关设备根据数据包的应用层数据属性和 /或延时要求, 对需要网关转发的数据包进行筒单分类, 并设计了一种基于时间窗口的转发 机制, 网关在时间窗口内对数据包进行打包发送。 本发明实施例能够在考虑 数据包的时效性的同时, 提高网关的转发处理对带宽的利用率。  The gateway device in the embodiment of the present invention classifies the data packets that need to be forwarded by the gateway according to the application layer data attribute and/or the delay requirement of the data packet, and designs a time window-based forwarding mechanism, and the gateway is in the time window. Packets are sent and sent within. In the embodiment of the present invention, the bandwidth utilization rate of the forwarding process of the gateway can be improved while considering the timeliness of the data packet.
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。  Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in a combination of electronic hardware or computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
所属领域的技术人员可以清楚地了解到, 为描述的方便和筒洁, 上述描 述的***、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。  It will be apparent to those skilled in the art that, for the convenience of the description and the cleaning process, the specific operation of the system, the device and the unit described above may be referred to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的***、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个 ***, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。 In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another The system, or some features can be ignored, or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。  The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一 个单元中。  In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使 用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明 的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部 分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前 述的存储介质包括: U盘、移动硬盘、只读存储器( ROM, Read-Only Memory )、 随机存取存储器(RAM, Random Access Memory ), 磁碟或者光盘等各种可 以存储程序代码的介质。  The functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential to the prior art or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims

权利要求 Rights request
1、 一种发送数据的方法, 其特征在于, 包括: A method for transmitting data, comprising:
接收来自传感器网络的数据包, 并确定所述数据包的应用层数据属性和 /或延时要求;  Receiving data packets from the sensor network and determining application layer data attributes and/or delay requirements for the data packets;
根据所述数据包的应用层数据属性和 /或延时要求,确定所述数据包所属 的时间窗口, 在所确定的时间窗口所对应的存储区域中存储所述数据包; 在到达当前时间窗口的发送时刻时,将所述当前时间窗口所对应的存储 区域中存储的数据包进行打包, 并将打包后的数据包发送至另一网络。  Determining, according to an application layer data attribute and/or a delay requirement of the data packet, a time window to which the data packet belongs, storing the data packet in a storage area corresponding to the determined time window; and reaching a current time window At the time of sending, the data packet stored in the storage area corresponding to the current time window is packaged, and the packaged data packet is sent to another network.
2、 如权利要求 1 所述的方法, 其特征在于, 所述根据所述数据包的应 用层数据属性和 /或延时要求, 确定所述数据包所属的时间窗口, 包括: 根据所述数据包的应用层数据属性和 /或延时要求,确定所述数据包的延 时值;  The method according to claim 1, wherein the determining, according to the application layer data attribute and/or the delay requirement of the data packet, the time window to which the data packet belongs, comprises: according to the data Determining the delay value of the data packet by the application layer data attribute and/or delay requirement of the packet;
根据所述数据包的延时值和时间窗口的单位时间之间的比值,确定所述 数据包所属的时间窗口。  A time window to which the data packet belongs is determined according to a ratio between a delay value of the data packet and a unit time of the time window.
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述在所确定的时间 窗口所对应的存储区域中存储所述数据包, 包括:  The method of claim 1 or 2, wherein the storing the data packet in a storage area corresponding to the determined time window comprises:
判断所述数据包的长度是否大于所确定的时间窗口所对应的存储区域 的剩余空间;  Determining whether the length of the data packet is greater than a remaining space of a storage area corresponding to the determined time window;
在所述数据包的长度小于或等于所确定的时间窗口所对应的存储区域 的剩余空间时, 在所确定的时间窗口所对应的存储区域中存储所述数据包; 在所述数据包的长度大于所确定的时间窗口所对应的存储区域的剩余 空间时,在所确定的时间窗口的下一时间窗口所对应的存储区域中存储所述 数据包。  When the length of the data packet is less than or equal to the remaining space of the storage area corresponding to the determined time window, storing the data packet in a storage area corresponding to the determined time window; at the length of the data packet When the remaining space of the storage area corresponding to the determined time window is larger, the data packet is stored in a storage area corresponding to the next time window of the determined time window.
4、 如权利要求 1-3任一项所述的方法, 其特征在于, 还包括: 启动定时器, 所述定时器的长度等于时间窗口的单位时间;  The method according to any one of claims 1 to 3, further comprising: starting a timer, the length of the timer being equal to a unit time of the time window;
在所述定时器到期时,将当前时间窗口变为所述当前时间窗口的下一时 间窗口, 并重新启动所述定时器,  When the timer expires, the current time window is changed to the next time window of the current time window, and the timer is restarted.
其中,所述当前时间窗口的发送时刻是所述当前时间窗口的定时器到期 的时刻。  The sending time of the current time window is the time when the timer of the current time window expires.
5、 如权利要求 1-4任一项所述的方法, 其特征在于, 在所述数据包的 应用层数据属性和 /或延时要求指示所述数据包为需要尽快转发的紧急数据 包的情况下, 还包括: The method according to any one of claims 1 to 4, characterized in that in the data packet If the application layer data attribute and/or the delay requirement indicates that the data packet is an urgent data packet that needs to be forwarded as soon as possible, the method further includes:
立即转发所述紧急数据包至所述另一网络; 或者,  Forwarding the emergency data packet to the other network immediately; or
在所述紧急数据包的长度大于所述当前时间窗口所对应的存储区域的 剩余空间时, 立即转发所述紧急数据包至所述另一网络; 或者,  When the length of the emergency data packet is greater than the remaining space of the storage area corresponding to the current time window, the emergency data packet is immediately forwarded to the another network; or
在所述紧急数据包的长度小于或等于所述当前时间窗口所对应的存储 区域的剩余空间的情况下, 立即将所述紧急数据包和所述当前时间窗口所对 应的存储区域中存储的数据包一起进行打包。  And in the case that the length of the emergency data packet is less than or equal to the remaining space of the storage area corresponding to the current time window, immediately storing the data stored in the emergency data packet and the storage area corresponding to the current time window Packages are packaged together.
6、 如权利要求 1-4任一项所述的方法, 其特征在于, 在所述数据包的 应用层数据属性和 /或延时要求指示所述数据包为需要尽快转发的紧急数据 包,且所述紧急数据包的长度大于当前时间窗口所对应的存储区域的剩余空 间的情况下, 还包括:  The method according to any one of claims 1 to 4, wherein an application layer data attribute and/or a delay requirement of the data packet indicates that the data packet is an urgent data packet that needs to be forwarded as soon as possible, And if the length of the emergency data packet is greater than the remaining space of the storage area corresponding to the current time window, the method further includes:
将所述当前时间窗口所对应的存储区域中存储的全部或部分数据包转 移存储到后续时间窗口中, 以使得所述当前时间窗口所对应的存储区域的剩 余空间大于或等于所述紧急数据包的长度;  All or part of the data packets stored in the storage area corresponding to the current time window are transferred to the subsequent time window, so that the remaining space of the storage area corresponding to the current time window is greater than or equal to the emergency data packet. length;
在所述当前时间窗口所对应的存储区域中存储所述紧急数据包。  The emergency data packet is stored in a storage area corresponding to the current time window.
7、 如权利要求 1-6任一项所述的方法, 其特征在于, 所述在到达当前 时间窗口的发送时刻时,将所述当前时间窗口所对应的存储区域中存储的数 据包进行打包, 包括:  The method according to any one of claims 1-6, wherein, when the sending time of the current time window is reached, the data packet stored in the storage area corresponding to the current time window is packaged. , including:
在所述当前时间窗口所对应的存储区域还有剩余空间的情况下,从后续 时间窗口所对应的存储区域中取出数据包;  If there is remaining space in the storage area corresponding to the current time window, the data packet is taken out from the storage area corresponding to the subsequent time window;
将所述当前时间窗口所对应的存储区域中存储的数据包和取出的数据 包一起进行打包。  The data packet stored in the storage area corresponding to the current time window is packaged together with the extracted data packet.
8、 一种网关设备, 其特征在于, 包括:  8. A gateway device, comprising:
第一确定单元, 用于接收来自传感器网络的数据包, 并确定所述数据包 的应用层数据属性和 /或延时要求;  a first determining unit, configured to receive a data packet from the sensor network, and determine an application layer data attribute and/or a delay requirement of the data packet;
第二确定单元, 用于根据所述第一确定单元所确定的数据包的应用层数 据属性和 /或延时要求,确定所述数据包所属的时间窗口,在所确定的时间窗 口所对应的存储区域中存储所述数据包;  a second determining unit, configured to determine, according to an application layer data attribute and/or a delay requirement of the data packet determined by the first determining unit, a time window to which the data packet belongs, corresponding to the determined time window Storing the data packet in a storage area;
发送单元, 用于在到达当前时间窗口的发送时刻时, 将所述当前时间窗 口所对应的存储区域中存储的数据包进行打包, 并将打包后的数据包发送至 另一网络。 a sending unit, configured to: when the sending time of the current time window is reached, package the data packet stored in the storage area corresponding to the current time window, and send the packaged data packet to the Another network.
9、 如权利要求 8所述的网关设备, 其特征在于, 所述第二确定单元, 用于根据所述数据包的应用层数据属性和 /或延时要求,确定所述数据包的延 时值, 并根据所述数据包的延时值和时间窗口的单位时间之间的比值, 确定 所述数据包所属的时间窗口。  The gateway device according to claim 8, wherein the second determining unit is configured to determine a delay of the data packet according to an application layer data attribute and/or a delay requirement of the data packet. And determining a time window to which the data packet belongs according to a ratio between a delay value of the data packet and a unit time of the time window.
10、 如权利要求 8或 9所述的网关设备, 其特征在于, 所述第二确定单 元判断所述数据包的长度是否大于所确定的时间窗口所对应的存储区域的 剩余空间,在所述数据包的长度小于或等于所确定的时间窗口所对应的存储 区域的剩余空间时,在所确定的时间窗口所对应的存储区域中存储所述数据 包, 并且在所述数据包的长度大于所确定的时间窗口所对应的存储区域的剩 余空间时,在所确定的时间窗口的下一时间窗口所对应的存储区域中存储所 述数据包。  The gateway device according to claim 8 or 9, wherein the second determining unit determines whether the length of the data packet is greater than a remaining space of a storage area corresponding to the determined time window, When the length of the data packet is less than or equal to the remaining space of the storage area corresponding to the determined time window, the data packet is stored in the storage area corresponding to the determined time window, and the length of the data packet is greater than When the remaining space of the storage area corresponding to the determined time window is determined, the data packet is stored in a storage area corresponding to the next time window of the determined time window.
11、 如权利要求 8-10任一项所述的网关设备, 其特征在于, 还包括: 定 时器, 所述定时器的长度等于时间窗口的单位时间, 在所述定时器到期时, 将当前时间窗口变为所述当前时间窗口的下一时间窗口, 并重新启动所述定 时器,  The gateway device according to any one of claims 8 to 10, further comprising: a timer, the length of the timer being equal to a unit time of a time window, when the timer expires, The current time window becomes the next time window of the current time window, and the timer is restarted,
其中, 所述当前时间窗口的发送时刻是所述当前时间窗口的定时器到期 的时刻。  The sending time of the current time window is the time when the timer of the current time window expires.
12、如权利要求 8-11任一项所述的网关设备, 其特征在于, 还包括紧急 处理单元,在所述数据包的应用层数据属性和 /或延时要求指示所述数据包为 需要尽快转发的紧急数据包的情况下,  The gateway device according to any one of claims 8 to 11, further comprising an emergency processing unit, wherein an application layer data attribute and/or a delay requirement of the data packet indicates that the data packet is needed In the case of urgent data packets forwarded as soon as possible,
所述紧急处理单元用于立即转发所述紧急数据包至所述另一网络, 或 者,  The emergency processing unit is configured to immediately forward the emergency data packet to the another network, or
所述紧急处理单元用于在所述紧急数据包的长度大于所述当前时间窗 口所对应的存储区域的剩余空间时,立即转发所述紧急数据包至所述另一网 络, 或者,  The emergency processing unit is configured to immediately forward the emergency data packet to the other network when the length of the emergency data packet is greater than the remaining space of the storage area corresponding to the current time window, or
所述紧急处理单元在所述紧急数据包的长度小于或等于所述当前时间 窗口所对应的存储区域的剩余空间的情况下,立即将所述紧急数据包和所述 当前时间窗口所对应的存储区域中存储的数据包一起进行打包。  The emergency processing unit immediately stores the emergency data packet and the current time window in a case where the length of the emergency data packet is less than or equal to the remaining space of the storage area corresponding to the current time window. The packets stored in the zone are packaged together.
13、如权利要求 8-11任一项所述的网关设备, 其特征在于,还包括紧急 处理单元,在所述数据包的应用层数据属性和 /或延时要求指示所述数据包为 需要尽快转发的紧急数据包,且所述紧急数据包的长度大于当前时间窗口所 对应的存储区域的剩余空间的情况下, The gateway device according to any one of claims 8 to 11, further comprising an emergency processing unit, wherein an application layer data attribute and/or a delay requirement of the data packet indicates that the data packet is If an urgent data packet needs to be forwarded as soon as possible, and the length of the emergency data packet is greater than the remaining space of the storage area corresponding to the current time window,
所述紧急处理单元用于将所述当前时间窗口所对应的存储区域中存储 的全部或部分数据包转移存储到后续时间窗口中, 以使得所述当前时间窗口 所对应的存储区域的剩余空间大于或等于所述紧急数据包的长度, 并在所述 当前时间窗口所对应的存储区域中存储所述紧急数据包。  The emergency processing unit is configured to transfer all or part of the data packets stored in the storage area corresponding to the current time window into a subsequent time window, so that the remaining space of the storage area corresponding to the current time window is greater than Or equal to the length of the emergency data packet, and storing the emergency data packet in a storage area corresponding to the current time window.
14、 如权利要求 8-13 任一项所述的网关设备, 其特征在于, 所述发送 单元还用于在所述当前时间窗口所对应的存储区域还有剩余空间的情况下, 从后续时间窗口所对应的存储区域中取出数据包, 并将所述当前时间窗口所 对应的存储区域中存储的数据包和取出的数据包一起进行打包。  The gateway device according to any one of claims 8 to 13, wherein the sending unit is further configured to: when the storage area corresponding to the current time window has a remaining space, from a subsequent time The data packet is taken out from the storage area corresponding to the window, and the data packet stored in the storage area corresponding to the current time window is packaged together with the extracted data packet.
PCT/CN2011/076190 2011-06-23 2011-06-23 Method and gateway device for sending data WO2012103701A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/076190 WO2012103701A1 (en) 2011-06-23 2011-06-23 Method and gateway device for sending data
CN201180001275.1A CN102754396B (en) 2011-06-23 2011-06-23 Send method and the gateway device of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/076190 WO2012103701A1 (en) 2011-06-23 2011-06-23 Method and gateway device for sending data

Publications (1)

Publication Number Publication Date
WO2012103701A1 true WO2012103701A1 (en) 2012-08-09

Family

ID=46602068

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/076190 WO2012103701A1 (en) 2011-06-23 2011-06-23 Method and gateway device for sending data

Country Status (2)

Country Link
CN (1) CN102754396B (en)
WO (1) WO2012103701A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022006725A1 (en) * 2020-07-06 2022-01-13 华为技术有限公司 Communication method and apparatus

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103001737A (en) * 2012-11-23 2013-03-27 山东电力集团公司 Method for preventing general packet radio service (GPRS) communication module data from being blocked
CN103857052A (en) * 2012-11-28 2014-06-11 华为技术有限公司 Wireless scheduling method, device and base station guaranteeing time delay service quality
DE112013006756T5 (en) * 2013-03-01 2015-11-12 Mitsubishi Electric Corporation Communication, control device and program
CN103297430B (en) * 2013-05-24 2017-04-26 华为技术有限公司 Data transmission equipment and data transmission method
CN103441953B (en) * 2013-07-08 2016-12-28 京信通信***(中国)有限公司 A kind of data stream scheduling method, equipment and system
CN106060119B (en) * 2016-05-17 2019-03-19 自连电子科技(上海)有限公司 Retain the data convergence package system and method for original time stamp
WO2020082218A1 (en) * 2018-10-22 2020-04-30 Oppo广东移动通信有限公司 Wireless communication method and network device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1479536A (en) * 2003-04-11 2004-03-03 大唐移动通信设备有限公司 Method and device dfor realizing synchronization of interface business between base stution controller and base stations in radio commumnication system
WO2005004337A2 (en) * 2003-06-25 2005-01-13 Interdigital Technology Corporation Method for downlink transmission synchronization
CN101795182A (en) * 2008-10-02 2010-08-04 英飞凌科技股份有限公司 Systems and methods for regulating delay between network interfaces
CN102036195A (en) * 2010-12-08 2011-04-27 北京神州泰岳软件股份有限公司 Method and system for sending message at fixed time

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100558143C (en) * 2006-04-17 2009-11-04 华为技术有限公司 Mobile broadcast network system and realize the method for this Network Synchronization
DE102007023657B4 (en) * 2007-05-22 2014-03-20 Siemens Aktiengesellschaft Method for data acquisition in a functional brain examination with a combined magnetic resonance PET device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1479536A (en) * 2003-04-11 2004-03-03 大唐移动通信设备有限公司 Method and device dfor realizing synchronization of interface business between base stution controller and base stations in radio commumnication system
WO2005004337A2 (en) * 2003-06-25 2005-01-13 Interdigital Technology Corporation Method for downlink transmission synchronization
CN101795182A (en) * 2008-10-02 2010-08-04 英飞凌科技股份有限公司 Systems and methods for regulating delay between network interfaces
CN102036195A (en) * 2010-12-08 2011-04-27 北京神州泰岳软件股份有限公司 Method and system for sending message at fixed time

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022006725A1 (en) * 2020-07-06 2022-01-13 华为技术有限公司 Communication method and apparatus

Also Published As

Publication number Publication date
CN102754396B (en) 2015-11-25
CN102754396A (en) 2012-10-24

Similar Documents

Publication Publication Date Title
WO2012103701A1 (en) Method and gateway device for sending data
US11064330B2 (en) Methods for enabling delay-awareness in the constrained application protocol (CoAP)
EP3528409B1 (en) Method and system for improving wireless link efficiency
CN100407698C (en) Data transmission method for wireless link control layer
TWI542239B (en) Dynamic power management in a communications device
JP5069332B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, CONVERSION METHOD, AND PROGRAM THEREOF
Alves et al. Real-time communications over hybrid wired/wireless PROFIBUS-based networks
EP2248309B1 (en) Buffer control for multi-transport architectures
WO2021063191A1 (en) Packet forwarding method, device and system
US10439940B2 (en) Latency correction between transport layer host and deterministic interface circuit
WO2022001175A1 (en) Data packet sending method and apparatus
WO2023273385A1 (en) 5g and tsn joint scheduling method based on wireless channel information
KR20140048815A (en) Distributed measurement arrangement for an embedded automotive acquisition device with tcp acceleration
Zhao et al. ON/OFF traffic shaping in the Internet: Motivation, challenges, and solutions
US20150263948A1 (en) Device and method for retransmitting data in a network switch
WO2022143468A1 (en) Data transmission method, apparatus and system, and storage medium
JP5121738B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, PROGRAM, AND INTEGRATED CIRCUIT
WO2012119414A1 (en) Method and device for controlling traffic of switching network
CN102014058A (en) Method and device for dispatching uplink flow rate
JP2008160557A (en) Receiver, transmitter and repeater
US11937279B2 (en) Systems, devices, and methods related to configuring a multi-stream network with a messaging schedule
WO2022027311A1 (en) Communication method and apparatus
Vitturi et al. Hybrid Ethernet/IEEE 802.11 networks for real-time industrial communications
WO2013097611A1 (en) Data processing method, device and system
JP6824027B2 (en) Communication equipment, its control method, and programs

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180001275.1

Country of ref document: CN

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

Ref document number: 11857757

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: 11857757

Country of ref document: EP

Kind code of ref document: A1