WO2019100794A1 - 报文处理方法及装置 - Google Patents

报文处理方法及装置 Download PDF

Info

Publication number
WO2019100794A1
WO2019100794A1 PCT/CN2018/102850 CN2018102850W WO2019100794A1 WO 2019100794 A1 WO2019100794 A1 WO 2019100794A1 CN 2018102850 W CN2018102850 W CN 2018102850W WO 2019100794 A1 WO2019100794 A1 WO 2019100794A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
node
rta
destination address
message
Prior art date
Application number
PCT/CN2018/102850
Other languages
English (en)
French (fr)
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 EP18880781.2A priority Critical patent/EP3678337B1/en
Publication of WO2019100794A1 publication Critical patent/WO2019100794A1/zh
Priority to US16/828,228 priority patent/US11140245B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/44Star or tree networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/742Route cache; Operation thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/12Wireless traffic scheduling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a packet processing method and apparatus.
  • WPAN Wireless Personal Area Network
  • Ad Hoc mobile ad hoc networks
  • a tree structure usually occurs, that is, one node in the network connects multiple child nodes, and some of the child nodes are connected to multiple child nodes.
  • nodes have explicit uplink and downlink communication directions.
  • the uplink the child nodes send data to their common parent node, and in the downlink, the parent node sends data to one of its child nodes. For example, as shown in the tree structure in FIG. 1, when any one or more of the nodes 2 to 11 transmit data to the node 1, it is uplink communication, and vice versa.
  • the present invention provides a packet processing method and device, which are configured to aggregate the packets with the same service type and the final destination address to solve the problem that the uplink packet occupies a large amount of network bandwidth and affects the normal operation of the service.
  • a message processing method includes: the first node generates a first packet according to the first data of the first node, where the first packet includes a packet header, where the packet header includes a service type, a final destination address, and a remaining aggregation number RTA.
  • RTA remaining aggregation number
  • the first node determines the remaining capacity in the first cache corresponding to the service type and the final destination address, where the second packet stores the second packet, and the second packet has The first packet has the same service type and the final destination address, and the second packet may be a packet received by the first node from its child node, or the second packet may be a packet generated by the first packet according to the second data.
  • the first packet includes a packet header, where the packet header includes a service type, a final destination address, and a remaining aggregation number RTA.
  • the first node determines the remaining capacity in the first cache corresponding to the service type and the final destination address, where the second packet stores the second packet, and the second packet has The first
  • the first node aggregates the first packet and the second packet into a third packet, where the packet header includes the service type and the final destination address.
  • the RTA of the third message is the value of the RTA minus 1 of the first message and the minimum value of the RTA of the second message.
  • the first node generates a first packet according to the data of the first node, and sets a final destination address, a service type, and a remaining aggregation number RTA, and determines a combination with the final destination address and the service type.
  • the first packet and the second packet in the first buffer are aggregated into a third packet.
  • the method further includes: when the RTA of the third packet is 0, after the preset aggregation time is exceeded, the first node sends the third packet to the node corresponding to the final destination address.
  • the RTA of the third packet is not 0, after the preset aggregation time is exceeded, the first node sends the third packet to the parent node of the first node. In this way, when the RTA of the third packet is 0, the third packet cannot be further aggregated, and the third packet is sent to the node corresponding to the final destination address in time to use the packet.
  • the polymerization delay is controlled within a reasonable range.
  • the third packet is sent to the parent node of the first node to provide a possibility for further aggregation to the third packet.
  • the method further includes: when the RTA of the first packet is 0, the first node sends the first packet to the node corresponding to the final destination address within a predetermined time. In this way, by setting the RTA of the packet of the service that is sensitive to the delay to 0, the packet can be sent to the node corresponding to the final destination address in time to ensure the normal operation of the service.
  • the method further includes: when the data length of the first packet is greater than the remaining capacity, the first node sends the first packet to the parent node of the first node within a predetermined time. In this manner, when the data length of the first packet is greater than the remaining capacity of the first cache in the first node, the first packet is forwarded to the parent node of the first node in time, so that the first packet can be timely The packets in other nodes are aggregated.
  • a message processing method includes: receiving, by the first node, a fourth packet sent by the first child node of the first node, where the fourth packet includes a packet header and a network layer encapsulation header, where the packet header includes a service type and a final destination address. And the number of remaining aggregations RTA, the network layer encapsulation header includes the network destination address.
  • the destination address of the network is the address of the first node
  • the first node determines the remaining capacity of the fourth cache corresponding to the service type and the final destination address
  • the fifth packet stores the fifth packet, and the fifth packet has the same
  • the fourth packet has the same service type and the final destination address.
  • the fifth packet may be the packet received by the first node, or the fifth packet may be the packet generated by the first node according to the data of the first node.
  • the first node aggregates the fourth packet and the fifth packet into a sixth packet, where the packet header includes the service type and the final destination address.
  • the RTA of the sixth message the RTA of the sixth message is the value of the RTA minus 1 of the fourth message and the minimum value of the RTA of the fifth message.
  • the first node receives the fourth packet, and determines the remaining capacity of the fourth cache corresponding to the combination of the final destination address and the service type of the fourth packet, and the fourth cache stores the first packet. Five messages. When the data length of the fourth packet is not greater than the remaining capacity, the fourth packet and the fifth packet are aggregated into a sixth packet.
  • the transmission delay of the packets is effectively limited to a reasonable range, and the bandwidth pressure of the transmission paths between the nodes is alleviated to ensure normal operation of the services.
  • the method further includes: when the network destination address is not the address of the first node, the first node sends the fourth packet to the node corresponding to the network destination address within a predetermined time. In this manner, when the first node determines that the network destination address of the fourth packet is not the address of the first node, the network does not extract the fourth packet to the application layer, but directly performs the fourth packet. Forwarding to control the aggregation delay of the packet within a reasonable range.
  • the method further includes: when the RTA of the sixth packet is 0, after the preset aggregation time is exceeded, the first node sends the sixth packet to the node corresponding to the final destination address.
  • the RTA of the sixth packet is not 0, after the preset aggregation time is exceeded, the first node sends the sixth packet to the parent node of the first node.
  • the sixth packet cannot be further aggregated, and the sixth packet is sent to the node corresponding to the final destination address in time to use the packet.
  • the polymerization delay is controlled within a reasonable range.
  • the sixth message is sent to the parent node of the first node to provide a possibility for further aggregation to the sixth message.
  • the method further includes: when the data length of the fourth packet is greater than the remaining capacity, the first node sends the fourth packet to the parent node of the first node within a predetermined time. In this manner, when the data length of the fourth packet is greater than the remaining capacity of the first cache in the first node, the fourth packet is forwarded to the parent node of the first node in time, so that the first packet can be timely
  • the packets in other nodes are aggregated.
  • a message processing apparatus for use in a first node.
  • the apparatus is for implementing the method provided by any one of the above first aspects.
  • the device includes: a generating unit, configured to generate a first packet according to data of the first node, where the first packet includes a packet header, where the packet header includes a service type, a final destination address, and a remaining aggregation number RTA.
  • a determining unit configured to determine, when the RTA of the first packet is not 0, the remaining capacity in the first cache corresponding to the service type and the final destination address, where the second packet stores the second packet, and the second packet Has the same service type and final destination address as the first message.
  • the processing unit is configured to aggregate the first packet and the second packet into a third packet when the data length of the first packet is not greater than the remaining capacity, where the packet header of the third packet includes the service type and finally The destination address and the RTA of the third packet.
  • the RTA of the third packet is the value of the RTA minus 1 of the first packet and the minimum value of the RTA of the second packet.
  • the apparatus further includes: a sending unit, configured to: when the RTA of the third packet is 0, send the third packet to the final destination address after the preset aggregation time is exceeded. Corresponding node; when the RTA of the third packet is not 0, after the preset aggregation time is exceeded, the third packet is sent to the parent node of the first node.
  • the apparatus further includes: a sending unit, configured to: when the RTA of the first packet is 0, send the first packet to the final destination address within a predetermined time Corresponding node.
  • the apparatus further includes: a sending unit, configured to: when the data length of the first packet is greater than the remaining capacity, send the first packet to the first node within a predetermined time The parent node.
  • a message processing apparatus for use in a first node.
  • the apparatus is for implementing the method provided by any one of the above second aspects.
  • the device includes: a receiving unit, configured to receive a fourth packet sent by a child node of the first node, where the fourth packet includes a packet header and a network layer encapsulation header, where the packet header includes a service type and a final destination address. And the number of remaining aggregations RTA, the network layer encapsulation header includes the network destination address.
  • a determining unit configured to determine, when the network destination address is the address of the first node, a remaining capacity of the fourth cache corresponding to the service type and the final destination address, where the fifth packet stores the fifth packet, where the fifth packet has The same service type and final destination address as the fourth message.
  • a processing unit configured to: when the data length of the fourth packet is not greater than the remaining capacity, the fourth packet and the fifth packet are aggregated into a sixth packet, where the packet header of the sixth packet includes a service type, and finally The destination address and the RTA of the sixth packet.
  • the RTA of the sixth packet is the value of the RTA minus 1 of the fourth packet and the minimum value of the RTA of the fifth packet.
  • the apparatus further includes: a sending unit, configured to: when the network destination address is not the address of the first node, send the fourth packet to the node corresponding to the network destination address within a predetermined time .
  • the apparatus further includes: a sending unit, configured to: when the RTA of the sixth packet is 0, send the sixth packet to the final destination address after the preset aggregation time is exceeded. Corresponding node; when the RTA of the sixth packet is not 0, after the preset aggregation time is exceeded, the sixth packet is sent to the parent node of the first node.
  • the apparatus further includes: a sending unit, configured to: when the data length of the fourth packet is greater than the remaining capacity, send the fourth packet to the first node within a predetermined time The parent node.
  • a computer readable storage medium having a computer program stored thereon When the computer program is executed in a computer, causing the computer to perform the method provided by any one of the above first aspects; or when the computer program is executed in the computer, causing the computer to perform any of the above second aspects The method provided by the embodiments.
  • a computing device in which an executable code is stored.
  • the processor executes the executable code, implementing the method provided by any one of the foregoing first aspects; or implementing the executable code to implement any one of the foregoing second aspects The method provided by the way.
  • FIG. 1 is a topological structure diagram of a tree network in the prior art
  • FIG. 2 is a schematic diagram of an application scenario of a packet processing method according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a packet structure according to an embodiment of the present disclosure.
  • FIG. 4 is a flowchart of a packet processing method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an aggregation state of a packet according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of another aggregation state of a packet according to an embodiment of the present disclosure.
  • FIG. 7 is a flowchart of another packet processing method according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a message sending apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of another packet sending apparatus according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of still another packet sending apparatus according to an embodiment of the present invention.
  • the node involved in the embodiment of the present invention may be any device with computing and storage capabilities, such as a mobile phone, a tablet computer, a personal computer (PC), a notebook, a server, a workstation, a printer, a gateway, and a router.
  • a mobile phone such as a mobile phone, a tablet computer, a personal computer (PC), a notebook, a server, a workstation, a printer, a gateway, and a router.
  • Such devices multiple nodes can access each other through the network, and each node has a unique network address.
  • the functions of the nodes mentioned in the embodiments of the present invention may also be implemented by logical nodes running on at least one device.
  • the network involved in the embodiments of the present invention may be any network having a tree structure, including a wireless network and a wired network.
  • the wireless network may be a wireless mesh network or a mobile ad hoc network.
  • a wired network can be a tree-structured network of multiple routers and multiple switches.
  • the packets involved in the embodiment of the present invention may be multiple types of packets, such as a heartbeat packet, a sensor real-time packet, or a sensor history packet.
  • FIG. 2 is a schematic diagram of an application scenario of a packet processing method according to an embodiment of the present invention.
  • node A is the root node of node B to node K
  • node B is the parent node of node E (also referred to as the upper level node)
  • nodes D and E are child nodes of node B (also referred to as Next level node).
  • each node has a timer. During the set timer period, a node can receive messages from its child nodes, and can also construct messages based on its own data. After the timer expires, the received message and/or the constructed message are sent to the parent node (or the upper node).
  • node E receives messages from node G and node H and constructs a message based on its own data.
  • the packet received from the node G and the node H and the packet constructed according to the self data are sent to the parent node, that is, the node B or the node C.
  • the dotted line between the node E and the node B indicates that the path is the actual path
  • the dotted line between the node E and the node C indicates that the path is an alternative path.
  • the packet processing method provided by the embodiment of the present invention may be used, where the first node constructs a first packet according to the data of the first node, and sets a service type, a final destination address, and a remaining aggregation number RTA. And determining a remaining capacity of the first cache corresponding to the combination of the service type and the final destination address, where the second packet is stored in the first cache.
  • the first node aggregates the first packet and the second packet into a third packet.
  • FIG. 3 shows a packet structure that can be aggregated by using the packet processing method provided by the embodiment of the present invention.
  • the packet may include an Aggregation Header and a Data Segment.
  • the aggregated packet header may include an Aggregation Control, a Final Destination Address, a Residual Times to Aggregation (RTA), a Data Length, and an Aggregation Number (Aggregation). Counts), the number of bytes (Bytes) they occupy can be 1, 2/6/8, 1, 2, and 1, respectively.
  • the final destination address of the message may be a 16-bit address (Short) defined in the Institute of Electrical and Electronics Engineers (IEEE) 802.15.4, which requires 2 bytes, 6 bytes, and 8 bytes, respectively. Address), one of the 48-bit Extended Unique Identifier (EUI-48) and the 64-bit Extended Unique Identifier (EUI-64).
  • the length of the aggregated data is used to describe the length of the aggregated data segment, which can be counted from any field before the "Attribute Mapping Table" of data segment 1.
  • the aggregation control part of the aggregation packet header may include a reserved field, a version format (Version) reserved for compatibility, a final destination address mode, and a service type (Service Type).
  • the number of bits (Bits) they occupy can be 1, 2, 2, and 3, respectively.
  • the final destination address mode is used to describe the address length of the final destination address of the packet header.
  • the service type can be used as the basis for setting the RTA.
  • the aggregated data segment in the message may include at least one data segment.
  • the aggregated data segment may include N data segments, namely Data Segment 1 (Data of Node 1), ..., Data Segment N, where N ⁇ 1.
  • Each data segment may include an attribute map, a node identifier, an attribute 1 and an attribute 2, and the number of bytes they occupy may be 1, 2/6/8, 1 and 1, respectively.
  • Attribute 1 and Attribute 2 may represent a certain attribute parameter. For example, when the service type of the message is a heartbeat message, attribute 1 and attribute 2 may respectively represent Received Signal Strength Indication (RSSI) and transmission. power.
  • RSSI Received Signal Strength Indication
  • the attribute mapping table in each data segment may include multiple fields, such as reserved fields, whether there is a second attribute (Attribute 2 Existing), whether there is an attribute 1 (Attribute 1 Existing), and a node identification mode (Node Identity Mode).
  • the number of occupied bits can be 4, 1, 1, and 2, respectively.
  • the presence or absence of the second attribute and the presence or absence of the first attribute are respectively used to indicate whether the second attribute exists in the data segment and whether the first attribute exists.
  • the node identification mode is used to describe the address length of the aforementioned node identification.
  • the attribute parameter may not be included in each data segment, or only one attribute parameter may be included, or more than three attribute parameters may be included. It is not limited here.
  • the number of the field "whether the nth attribute exists" in the attribute mapping table also changes, and the number of bits or bytes occupied by the related field also changes.
  • the method involves constructing a message having the structure shown in FIG. 3 and/or processing a message having the structure shown in FIG.
  • FIG. 4 is a flowchart of a packet processing method according to an embodiment of the present invention. As shown in FIG. 4, this embodiment may include:
  • Step S410 The first node generates a first packet according to the first data of the first node, where the first packet includes a packet header and a packet payload, where the packet header includes a service type, a final destination address, and RTA.
  • the first data of the first node may include data from the node as the originating sender.
  • the first data can include a heartbeat signal generated by the node.
  • the first data may include real-time sensor data detected in real time, or sensor history data detected in a previous period of time.
  • the first data may include voice data or text data input by the user.
  • the first node constructs the first packet according to the first data
  • the method includes: determining, by the first node, the service type, the final destination address, and the RTA of the first packet according to the first data.
  • the RTA may be determined according to parameters such as a service type and/or a device running state of the first node.
  • the RTA of the first packet is set to control the aggregation times of the packets, so that the aggregation delay of each packet is controlled within a reasonable range, and the normal operation of the service is ensured.
  • the first node determines the RTA of the first packet according to the service type of the first packet.
  • the first node is a sensor device, and the root node of the first node is a computer.
  • the sensor device can generate a first packet according to real-time data generated in the device, where the service type of the first packet is a real-time message of the sensor, and the final destination address can be a Media Access Control (MAC) address of the computer.
  • the RTA value of the first packet can be set to 1 according to the type of service (sensor real-time message).
  • the sensor device may generate a first packet whose service type is a sensor history packet according to the sensor historical data generated in the device.
  • the RTA value of the first packet can be set to 5 according to the service type (sensor history message).
  • the first node generates a heartbeat signal that needs to be sent to the root node of the first node, such as a Border Router (BR).
  • the service type of the first packet is determined to be a heartbeat packet, and the final destination address is a BR address.
  • the RTA value of the first packet can be set to 3 according to the service type (heartbeat message).
  • the first node determines the RTA of the first packet according to the device operating state of the node. For example, when the running state of the device is the startup state, the running state, and the power-off state, the corresponding RTA of the first packet may be set to 1, 3, and 0.
  • step S420 the first node determines whether the RTA of the first message is 0.
  • step S430 when the RTA of the first packet is not 0, step S430 is performed, and when the RTA of the first packet is 0, step S421 is performed.
  • Step S430 the first node determines a remaining capacity in the first cache corresponding to the service type and the final destination address of the first packet, and determines whether the data length of the first packet is greater than the remaining capacity.
  • the second packet is stored in the first packet cache, and the second packet has the same service type and final destination address as the first packet.
  • the first node may reserve some caches and divide the caches into multiple cache areas. Different cache areas correspond to different combinations of destination addresses and service types. A cache area stores packets with the same final destination address and service type. The cache capacity of any two cache areas can be the same or different.
  • the combination of the final destination address and the type of service may include any of the following:
  • Gateway address and sensor real-time message
  • the first node can reserve three buffer areas with a buffer capacity of 1 KB, which are used to store the packets corresponding to the three combinations.
  • the first node acquires a remaining capacity of the first cache corresponding to the combination of the final destination address and the service type according to the final destination address and the service type of the first packet.
  • the remaining capacity may be calculated by the first node according to the total capacity of the first cache and the data length of the second packet stored in the first cache.
  • the first node may first "in the second packet"
  • the sum of the length of the aggregated data and the data length occupied by the entire packet header is used as the data length of the second packet, and then the difference between the total capacity of the first buffer and the data length of the second packet is used as the first buffer. Remaining capacity.
  • the length of the field "aggregated data" in the second packet is 0.5 KB
  • the length of the data occupied by the header of the second packet is 0.1 KB
  • the data length of the second packet is 0.6 KB.
  • the total capacity of the first cache is 2 KB
  • the remaining capacity of the first cache is 1.4 KB.
  • the second packet may be a packet received by the first node from the child node, and the packet may be a packet that has not been aggregated, or a packet that has been aggregated.
  • the second packet may be a packet generated after the aggregation process is performed on a plurality of packets having the same destination address and service type from the plurality of child nodes of the first node.
  • the second packet may be a packet generated by the first node according to the second data of the first node before the first packet is generated.
  • the first node when the first node determines that the data length of the first packet is not greater than the remaining capacity in the first cache, and the first buffer does not store the packet, the first node may store the first packet in the first packet. In the first cache, wait for possible further aggregation. In an example, the first node, when storing the first message, updates the RTA of the first message to a value after the initial RTA is decremented by one.
  • step S440 and step S450 are performed.
  • step S431 is performed.
  • Step S440 the first node aggregates the first packet and the second packet into a third packet.
  • the data length of the first packet is 0.3 KB, and the remaining capacity in the first buffer is 0.8 KB.
  • the first node can aggregate the first packet with the second packet in the first cache. Third message.
  • the data length of the first packet is 0.5 KB
  • the remaining buffer capacity in the first buffer is 0.5 KB
  • the first node can accordingly use the first packet and the second packet in the first buffer. Aggregate into a third message.
  • the first node aggregates the first packet and the second packet into the third packet
  • the method includes: the first node splicing the data segment of the first packet after the data segment of the second packet, and The first node sets the RTA of the third packet to a value after the RTA of the first packet is decremented by 1 and a minimum value of the RTA of the second packet.
  • the data segment of the first packet includes one data segment of the first node
  • the data segment of the second packet includes two data segments from the two nodes after aggregation
  • the RTA of a message and a second message are 3 and 2, respectively.
  • the first node splices one data segment of the first packet after two data segments of the second packet, and sets the RTA of the third packet to 2 (RTA minus 1 of the first packet) and 2 ( The minimum value 2 in the RTA of the second message.
  • the data segment of the first packet includes one data segment of the first node
  • the data segment of the second packet includes two data segments of one node
  • the RTA of the second message and the second message are 1 and 1, respectively.
  • the first node splices one data segment of the first packet after two data segments of the second packet, and sets the RTA of the third packet to 0 (RTA minus 1 of the first packet) and 1 ( The minimum value of 0 in the RTA of the second message.
  • the first node aggregates the first packet and the second packet into the third packet, and may further include: determining, according to the “length of the aggregated data” in the first packet and the second packet, The length of the aggregated data in the three messages. And determining, according to the “node identifier” in the first packet and the second packet, the “number of nodes for aggregating data” in the third packet.
  • the "length of aggregated data" of the first packet and the second packet are 5 bytes and 10 bytes, respectively, thereby determining "aggregating data in the third packet"
  • the length" is 15 bytes.
  • a total of two different "node identifiers" are included in the first packet and the second packet, so that the number of nodes of the aggregated data in the third packet is determined to be 2.
  • the first node constructs a first packet according to the first data of the first node, and aggregates the first packet and the second packet into a third packet.
  • the first node continues to wait for possible further aggregation until the preset aggregation time is exceeded.
  • step S450 the first node determines whether the RTA of the third packet is 0.
  • step S451 when the RTA of the third message is not 0, step S451 is performed, and when the RTA of the third message is 0, step S452 is performed.
  • Step S451 after the preset aggregation time is exceeded, the first node sends the third packet to the parent node of the node.
  • the preset aggregation time is an aggregation waiting period set by the first node, such as 10 ms, 5 ms, and the like.
  • the aggregation delay of the packet is controlled within a reasonable range.
  • the network model where the first node is located includes a network layer and an application layer, and steps S410 to S440 are implemented at the application layer, and transmission of packets between multiple nodes (eg, step S451) is in the network. Layer implemented.
  • the first node uses the address of the parent node of the first node as the network destination address of the third packet at the network layer.
  • the encapsulation is in the network layer encapsulation header of the third packet.
  • the parent node extracts the third packet to the application layer according to the network destination address (the address of the parent node) of the packet, and further determines whether the third packet can be further aggregated.
  • Step S452 after the preset aggregation time is exceeded, the first node sends the third packet to the node corresponding to the final destination address in the third packet.
  • step S450 When the first node determines, in step S450, that the RTA of the third packet is 0, the method S452 is executed, and after the preset aggregation time is exceeded, the third packet is sent to correspond to the final destination address in the third packet. node.
  • the first node uses the final destination address included in the packet header of the third packet as the third packet at the network layer.
  • the network destination address of the text is encapsulated in the network layer encapsulation header of the third packet.
  • the parent of the first node can be made by setting the network destination address of the third packet to the final destination address.
  • the node does not extract the third packet to the application layer, but directly forwards the third packet according to the network destination address (the final destination address) of the third packet.
  • Step S431 the first node sends the first message to the parent node of the first node within a predetermined time.
  • step S430 When the node determines in step S430 that the data length of the first packet is greater than the remaining buffer capacity, the present S431 is executed, and the first packet is sent to the parent node of the first node within a predetermined time.
  • the first node does not need to aggregate the first packet and the second packet in the first packet cache, but within a predetermined time. Sending the first message to the parent node of the first node.
  • the predetermined time may be a smaller time interval set by the network system where the node or the node is located, such as 0.1 ms or 0.5 ms, and the predetermined time in this S430 is smaller than the preset aggregation time mentioned in step S451 and step S452. .
  • the data length of the first message is 0.6 KB greater than the remaining buffer capacity of the first message buffer by 0.5 KB.
  • the first node sends the first message to the parent node of the first node within 0.5 ms of the predetermined time.
  • the first node in the network layer uses the address of the parent node of the first node as the network destination address of the first packet, and is encapsulated in the network layer encapsulation header of the first packet. After the first node receives the first packet, the first node can extract the first packet to the application layer, and further determine whether the first packet can be aggregated.
  • Step S421 the first node sends the first message to the parent node of the first node within a predetermined time.
  • the present S421 is executed, and the first packet is sent to the parent node of the first node within a predetermined time.
  • a description of the predetermined time in this S421 can be referred to the description of the predetermined time in step S431.
  • the first node at the network layer uses the final destination address of the first packet as the network destination address of the first packet, and is encapsulated in the network layer encapsulation header of the first packet. After the first node receives the first packet, the first node may not extract the first packet to the application layer, but directly report the first packet according to the network destination address (the final destination address) of the first packet. The text is forwarded.
  • the first node generates a first packet according to the data of the first node, and sets a final destination address, a service type, and a remaining aggregation number RTA, and determines the final destination.
  • the remaining capacity in the first cache corresponding to the combination of the address and the service type, and the second message stored in the first cache.
  • the first packet and the second packet in the first buffer are aggregated into a third packet.
  • FIG. 7 is a flowchart of another packet processing method according to an embodiment of the present invention. As shown in FIG. 7, this embodiment may include:
  • Step S710 The first node receives the fourth packet sent by the first child node of the first node.
  • the fourth packet includes a packet header and a network layer encapsulation header, where the packet header includes a service type, a final destination address, and a remaining aggregation number RTA, and the network layer encapsulation header includes a network destination address.
  • the packet header of the fourth packet in step S710 reference may be made to the packet structure in FIG. 3 and the description of the packet header in step S410 in FIG.
  • Step S720 The first node determines whether the network destination address of the fourth packet is an address of the first node.
  • step S721 When the first node determines that the network destination address of the fourth packet is not the destination address of the first node, step S721 is performed. When the first node determines that the network destination address of the fourth packet is the destination address of the first node, step S730 is performed.
  • Step S721 the first node sends the fourth packet to the node corresponding to the network destination address within a predetermined time.
  • step S72 For the description of step S721, reference may also be made to the above description of step S421.
  • Step S730 the first node determines a remaining capacity in the fourth cache corresponding to the combination of the service type and the final destination address of the fourth packet, and determines whether the data length of the fourth packet is greater than the remaining capacity.
  • step S720 When the first node determines in step S720 that the network destination address of the fourth packet is the destination address of the first node, the present S730 is executed to determine the fourth corresponding to the combination of the service type and the final destination address of the fourth packet. The remaining capacity in the cache, and determine whether the data length of the fourth packet is greater than the remaining capacity.
  • the fifth packet stores a fifth packet, where the fifth packet includes the same service type and final destination address as the fourth packet.
  • the fifth packet may be a fifth packet generated by the first node according to the data of the first node, or may be a fifth packet received by the first node from the second child node of the first node.
  • the first child node and the second child node of the first node may be the same node or different nodes.
  • step S730 For the description of step S730, reference may also be made to the above description of step S430.
  • step S740 When the first node determines that the data length of the fourth packet is not greater than the remaining capacity, step S740 is performed. When the first node determines that the data length of the fourth packet is greater than the remaining capacity, step S731 is performed.
  • Step S731 the first node sends the fourth message to the parent node of the first node within a predetermined time.
  • step S73 For the description of step S731, reference may be made to the above description of step S431.
  • Step S740 the first node aggregates the fourth packet and the fifth packet into a sixth packet.
  • step S740 is executed to aggregate the fourth packet and the fifth packet into the sixth packet.
  • step S740 reference may be made to the above description of step S440.
  • step S750 the first node determines whether the RTA of the sixth packet is 0. .
  • step S751 when the RTA of the sixth message is not 0, step S751 is performed, and when the RTA of the sixth message is 0, step S752 is performed.
  • step S750 For the description of step S750, reference may be made to the above description of step S450.
  • Step S751 after the preset aggregation time is exceeded, the first node sends the sixth message to the parent node of the node.
  • step S75 For the description of step S751, reference may be made to the above description of step S451.
  • Step S752 after the preset aggregation time is exceeded, the first node sends the sixth packet to the node corresponding to the final destination address in the sixth packet.
  • step S750 When the first node determines in step S750 that the RTA of the sixth packet is 0, the S752 is executed, and after the preset aggregation time is exceeded, the sixth packet is sent to the final destination address corresponding to the sixth packet. node.
  • step S75 For the description of step S752, reference may be made to the above description of step S452.
  • the first node may report the fourth packet.
  • the text is stored in the fourth cache, waiting for possible further aggregation until the preset aggregation time is exceeded.
  • the first node updates the RTA of the fourth packet to a value after the original RTA is decremented by one.
  • the first node receives the fourth packet, and determines the remaining capacity of the fourth cache corresponding to the combination of the destination address and the service type of the fourth packet, and the packet processing method provided by the foregoing embodiment.
  • the fifth message is stored in the fourth cache.
  • the fourth packet and the fifth packet are aggregated into a sixth packet.
  • FIG. 8 is a schematic structural diagram of a message sending apparatus according to an embodiment of the present invention. As shown in FIG. 8, the apparatus 800 includes:
  • the generating unit 810 is configured to generate a first packet according to the data of the first node, where the first packet includes a packet header, where the packet header includes a service type, a final destination address, and a remaining aggregation number RTA;
  • the determining unit 820 is configured to determine, when the RTA of the first packet is not 0, the remaining capacity in the first cache corresponding to the service type and the final destination address, where the second packet stores the second packet, the second packet The text has the same service type and final destination address as the first message;
  • the processing unit 830 is configured to: when the data length of the first packet is not greater than the remaining capacity, the first packet and the second packet are aggregated into a third packet, where the packet header of the third packet includes a service type, The final destination address and the RTA of the third message, the RTA of the third message is the value of the RTA minus 1 of the first message and the minimum value of the RTA of the second message.
  • the apparatus further includes: a sending unit 840, configured to: when the RTA of the third packet is 0, send the third packet to the final destination after the preset aggregation time is exceeded.
  • the apparatus further includes: a sending unit 840, configured to: when the RTA of the first packet is 0, send the first packet to the node corresponding to the final destination address within a predetermined time .
  • the device further includes: a sending unit 840, configured to: when the data length of the first packet is greater than the remaining capacity, send the first packet to the parent of the first node within a predetermined time node.
  • a sending unit 840 configured to: when the data length of the first packet is greater than the remaining capacity, send the first packet to the parent of the first node within a predetermined time node.
  • the generating unit 810 constructs the first packet according to the data of the first node, and sets a final destination address, a service type, and a remaining aggregation number RTA, and the determining unit 820 determines the final destination.
  • the remaining capacity in the first cache corresponding to the combination of the address and the service type, and the second message stored in the first cache.
  • the processing unit 830 aggregates the first packet with the second packet in the first buffer into a third packet.
  • FIG. 9 is a schematic structural diagram of another packet sending apparatus according to an embodiment of the present invention. As shown in FIG. 9, the apparatus 900 can include:
  • the receiving unit 910 is configured to receive a fourth packet sent by the child node of the first node, where the fourth packet includes a packet header and a network layer encapsulation header, where the packet header includes a service type, a final destination address, and a remaining aggregation.
  • the determining unit 920 is configured to determine, when the network destination address is the address of the first node, the remaining capacity of the fourth cache corresponding to the service type and the final destination address, where the fifth packet stores the fifth packet, and the fifth packet Has the same service type and final destination address as the fourth message;
  • the processing unit 930 is configured to: when the data length of the fourth packet is not greater than the remaining capacity, the fourth packet and the fifth packet are aggregated into a sixth packet, where the packet header of the sixth packet includes a service type, The final destination address and the RTA of the sixth message, the RTA of the sixth message is the value of the RTA minus 1 of the fourth message and the minimum value of the RTA of the fifth message.
  • the device further includes: a sending unit 940, configured to: when the network destination address is not the address of the first node, send the fourth packet to the network destination address within a predetermined time node.
  • the receiving unit 910 receives the fourth packet
  • the determining unit 920 determines the remaining capacity of the fourth buffer corresponding to the combination of the destination address and the service type of the fourth packet, and The fifth message is stored in the fourth cache.
  • the processing unit 930 aggregates the fourth packet and the fifth packet into a sixth packet.
  • FIG. 10 is a schematic structural diagram of still another packet sending apparatus according to an embodiment of the present invention.
  • the apparatus 1000 includes a processor 1010, a memory 1020, and a communication interface 1030.
  • the processor 1010, the memory 1020, and the communication interface 1030 may be mutually connected by a bus 1040; the bus 1040 may be divided into an address bus 1040, a data bus 1040, a control bus 1040, and the like.
  • the figure is shown by only one thick line, but does not mean that there is only one bus 1040 or one type of bus 1040.
  • the memory 1020 is configured to store a message and neighbor information, and may include a volatile memory 1020, such as a random access memory (RAM).
  • RAM random access memory
  • the communication interface 1030 is used by the node device to communicate with other nodes, and may be one or more.
  • the communication interface 1030 includes a wired or wireless interface.
  • a typical wireless interface is a radio frequency (RF) transceiver, which may be an 802.11 interface, an 802.15.4 interface, a cellular network communication interface, a ZigBee interface, or a combination thereof.
  • the processor 1010 may be a Central Processing Unit (CPU), a Network Processor (NP), a Microcontroller Unit (MCU), or a combination thereof.
  • the processor 1010 may further include a hardware chip.
  • the hardware chip may be an Application Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof.
  • the PLD may be a Complex Programmable Logic Device (CPLD), a Field-Programmable Gate Array (FPGA), a Generic Array Logic (GAL), or any combination thereof.
  • CPLD Complex Programmable Logic Device
  • FPGA Field-
  • processor 1010 executes the executable code stored in the memory 1020, it can be used to implement the message processing method in any of the embodiments of FIG. 4 or FIG.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例提供一种报文处理方法及装置。该方法包括:第一节点根据第一节点的第一数据生成第一报文,第一报文包括报文头部,其报文头部包括业务类型、最终目的地址和剩余聚合次数RTA。当第一报文的RTA不为0时,第一节点确定与业务类型和最终目的地址对应的第一缓存中的剩余容量,第一缓存中存储有第二报文。当第一报文的数据长度不大于剩余容量时,第一节点将第一报文与第二报文聚合成第三报文,第三报文的报文头部包括第三报文的RTA,第三报文的RTA为第一报文的RTA减1后的数值与第二报文的RTA中的最小值。通过将业务类型和目的地址相同的报文聚合,以解决上行报文占用大量网络带宽,影响业务正常运行的问题。

Description

报文处理方法及装置 技术领域
本申请涉及通信技术领域,尤其涉及一种报文处理方法及装置。
背景技术
随着无线个域网(Wireless Personal Area Network,WPAN)技术的发展,基于该类技术进行多跳扩展的无线网状(mesh)网络和移动自组织网络(Ad Hoc)被广泛应用。在这两种网络形成的拓扑结构中,通常会出现树形结构,即网络中的一个节点连接多个子节点,而其中某些子节点又连接多个子节点。在树形网络中,节点有明确的上行和下行通信方向,上行是由子节点向其共同的父节点发送数据,下行则是由父节点向其某个子节点发送数据。例如,如图1中的树形结构所示,当节点2至节点11中任何一个或多个节点向节点1发送数据时,为上行通信,反之为下行通信。
目前,有多种类型的数据(如,心跳报文或传感器报文等)采用单播方式,进行端到端的传输。当这些数据通过上述无线多跳网络进行上行传输时,越靠近根节点的传输路径中,上行报文的流量越大。且网络规模越大,节点的带宽瓶颈越为突出,很可能会影响业务的正常运行。
发明内容
本申请提供了一种报文处理方法及装置,通过将具有相同的业务类型和最终目的地址的报文聚合在一起发送,以解决上行报文占用大量网络带宽,影响业务正常运行的问题。
第一方面,提供了的一种报文处理方法。该方法包括:第一节点根据第一节点的第一数据生成第一报文,第一报文包括报文头部,报文头部包括业务类型、最终目的地址和剩余聚合次数RTA。当第一报文的RTA不为0时,第一节点确定与业务类型和最终目的地址对应的第一缓存中的剩余容量,第一缓存中存储有第二报文,第二报文具有与第一报文相同的业务类型和最终目的地址,第二报文可以为第一节点从其子节点接收的报文,或者第二报文可以为第一报文根据其第二数据生成的报文。当第一报文的数据长度不大于剩余容量时,第一节点将第一报文与第二报文聚合成第三报文,第三报文的报文头部包括业务类型、最终目的地址和第三报文的RTA,第三报文的RTA为第一报文的RTA减1后的数值与第二报文的RTA中的最小值。
采用上述报文处理方法,第一节点根据第一节点的数据生成第一报文,为其设置最终目的地址、业务类型和剩余聚合次数RTA,并确定与最终目的地址和业务类型的组合相对应的第一缓存中的剩余容量,以及第一缓存中存储的第二报文。当第一报文的数据长度不大于剩余容量时,将第一报文与第一缓存中的第二报文聚合成第三报文。通过控制报文的聚合次数和聚合数据长度,从而有效地将报文的传输延迟和聚合深度限制在合理范围内,缓解节点之间传输路径的带宽压力,以保证业务的正常运行。
在一种可能的实施方式中,该方法还包括:当第三报文的RTA为0时,在超出预设聚合时间后,第一节点将第三报文发送至与最终目的地址对应的节点;当第三报文的RTA不为0时,在超出预设聚合时间后,第一节点将第三报文发送至第一节点的父 节点。采用这种方式,当第三报文的RTA为0时,已无法对第三报文进行进一步聚合处理,通过及时将第三报文发送至与最终目的地址对应的节点,以将该报文的聚合时延控制在合理范围内。当第三报文的RTA不为0时,通过将第三报文发送至第一节点的父节点,以向第三报文提供进一步聚合的可能性。
在一种可能的实施方式中,该方法还包括:当第一报文的RTA为0时,在预定时间内,第一节点将第一报文发送至与最终目的地址对应的节点。采用这种方式,通过将对时延敏感的业务的报文的RTA设置为0,使该报文可以被及时发送至与最终目的地址对应的节点,以保证该业务的正常运行。
在一种可能的实施方式中,方法还包括:当第一报文的数据长度大于剩余容量时,在预定时间内,第一节点将第一报文发送至第一节点的父节点。采用这种方式,在第一报文的数据长度大于第一节点中第一缓存的剩余容量时,及时将第一报文转发至第一节点的父节点,以使第一报文可以及时与其他节点中的报文进行聚合。
第二方面,提供了的一种报文处理方法。该方法包括:第一节点接收第一节点的第一子节点发送的第四报文,第四报文包括报文头部和网络层封装头部,报文头部包括业务类型、最终目的地址和剩余聚合次数RTA,网络层封装头部包括网络目的地址。当网络目的地址为第一节点的地址时,第一节点确定与业务类型和最终目的地址对应的第四缓存的剩余容量,第四缓存中存储有第五报文,第五报文具有与第四报文相同的业务类型和最终目的地址,第五报文可以为第一节点接收的报文,或者第五报文可以为第一节点根据第一节点的数据生成的报文。当第四报文的数据长度不大于剩余容量时,第一节点将第四报文与第五报文聚合成第六报文,第六报文的报文头部包括业务类型、最终目的地址和第六报文的RTA,第六报文的RTA为第四报文的RTA减1后的数值与第五报文的RTA的最小值。
采用上述报文处理方法,第一节点接收第四报文,并确定与第四报文的最终目的地址和业务类型的组合相对应的第四缓存的剩余容量,以及第四缓存中存储有第五报文。当第四报文的数据长度不大于剩余容量时,将第四报文与第五报文聚合成第六报文。通过控制报文的聚合次数和聚合数据长度,从而有效地将报文的传输延迟限制在合理范围内,缓解节点之间传输路径的带宽压力,以保证业务的正常运行。
在一种可能的实施方式中,该方法还包括:当网络目的地址不是第一节点的地址时,在预定时间内,第一节点将第四报文发送至与网络目的地址对应的节点。采用这种方式,当第一节点在网络层判断出第四报文的网络目的地址不是第一节点的地址时,不将第四报文提取至应用层,而是直接对第四报文进行转发,以将该报文的聚合时延控制在合理范围内。
在一种可能的实施方式中,该方法还包括:当第六报文的RTA为0时,在超出预设聚合时间后,第一节点将第六报文发送至与最终目的地址对应的节点;当第六报文的RTA不为0时,在超出预设聚合时间后,第一节点将第六报文发送至第一节点的父节点。采用这种方式,当第六报文的RTA为0时,已无法对第六报文进行进一步聚合处理,通过及时将第六报文发送至与最终目的地址对应的节点,以将该报文的聚合时延控制在合理范围内。当第六报文的RTA不为0时,通过将第六报文发送至第一节点 的父节点,以向第六报文提供进一步聚合的可能性。
在一种可能的实施方式中,该方法还包括:当第四报文的数据长度大于剩余容量时,在预定时间内,第一节点将第四报文发送至第一节点的父节点。采用这种方式,在第四报文的数据长度大于第一节点中第一缓存的剩余容量时,及时将第四报文转发至第一节点的父节点,以使第一报文可以及时与其他节点中的报文进行聚合。
第三方面,提供了的一种报文处理装置,应用于第一节点。该装置用于实现上述第一方面中任一种实施方式提供的方法。该装置包括:生成单元,用于根据第一节点的数据生成第一报文,第一报文包括报文头部,报文头部包括业务类型、最终目的地址和剩余聚合次数RTA。确定单元,用于当第一报文的RTA不为0时,确定与业务类型和最终目的地址对应的第一缓存中的剩余容量,第一缓存中存储有第二报文,第二报文具有与第一报文相同的业务类型和最终目的地址。处理单元,用于当第一报文的数据长度不大于剩余容量时,将第一报文与第二报文聚合成第三报文,第三报文的报文头部包括业务类型、最终目的地址和第三报文的RTA,第三报文的RTA为第一报文的RTA减1后的数值与第二报文的RTA中的最小值。
在一种可能的实施方式中,该装置还包括:发送单元,用于:当第三报文的RTA为0时,在超出预设聚合时间后,将第三报文发送至与最终目的地址对应的节点;当第三报文的RTA不为0时,在超出预设聚合时间后,将第三报文发送至第一节点的父节点。
在一种可能的实施方式中,该装置还包括:还包括:发送单元,用于当第一报文的RTA为0时,在预定时间内,该将第一报文发送至与最终目的地址对应的节点。
在一种可能的实施方式中,该装置还包括:还包括:发送单元,用于当第一报文的数据长度大于剩余容量时,在预定时间内,将第一报文发送至第一节点的父节点。
第四方面,提供了的一种报文处理装置,应用于第一节点。该装置用于实现上述第二方面中任一种实施方式提供的方法。该装置包括:接收单元,用于接收第一节点的子节点发送的第四报文,第四报文包括报文头部和网络层封装头部,报文头部包括业务类型、最终目的地址和剩余聚合次数RTA,网络层封装头部包括网络目的地址。确定单元,用于当网络目的地址为第一节点的地址时,确定与业务类型和最终目的地址对应的第四缓存的剩余容量,第四缓存中存储有第五报文,第五报文具有与第四报文相同的业务类型和最终目的地址。处理单元,用于当第四报文的数据长度不大于剩余容量时,将第四报文与第五报文聚合成第六报文,第六报文的报文头部包括业务类型、最终目的地址和第六报文的RTA,第六报文的RTA为第四报文的RTA减1后的数值与第五报文的RTA的最小值。
在一种可能的实施方式中,该装置还包括:发送单元,用于当网络目的地址不是第一节点的地址时,在预定时间内,将第四报文发送至与网络目的地址对应的节点。
在一种可能的实施方式中,该装置还包括:发送单元,用于:当第六报文的RTA为0时,在超出预设聚合时间后,将第六报文发送至与最终目的地址对应的节点;当第六报文的RTA不为0时,在超出预设聚合时间后,将第六报文发送至第一节点的父 节点。
在一种可能的实施方式中,该装置还包括:还包括:发送单元,用于当第四报文的数据长度大于剩余容量时,在预定时间内,将第四报文发送至第一节点的父节点。
第五方面,提供了一种计算机可读存储介质,其上存储有计算机程序。当所述计算机程序在计算机中执行时,令计算机执行上述第一方面中任一种实施方式提供的方法;或者当所述计算机程序在计算机中执行时,令计算机执行上述第二方面中任一种实施方式提供的方法。
第六方面,提供了一种计算设备,所述存储器中存储有可执行代码。所述处理器执行所述可执行代码时,实现上述第一方面中任一种实施方式提供的方法;或者所述处理器执行所述可执行代码时,实现上述第二方面中任一种实施方式提供的方法。
附图说明
图1为现有技术中树形网络拓扑结构图;
图2为本发明实施例提供的一种报文处理方法的应用场景示意图;
图3为本发明实施例提供的一种报文结构的示意图;
图4为本发明实施例提供的一种报文处理方法的流程图;
图5为本发明实施例提供的一种报文的聚合状态示意图;
图6为本发明实施例提供的另一种报文的聚合状态示意图;
图7为本发明实施例提供的另一种报文处理方法的流程图;
图8为本发明实施例提供的一种报文发送装置的结构示意图;
图9为本发明实施例提供的另一种报文发送装置的结构示意图;
图10为本发明实施例提供的还一种报文发送装置的结构示意图。
具体实施方式
下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。
需要说明的是,本发明实施例中涉及的节点可以为任何具有计算和存储能力的设备,如手机、平板电脑、个人电脑(Personal Computer,PC)、笔记本、服务器、工作站、打印机、网关、路由器等设备,多个节点之间可以通过网络实现相互访问,且每个节点都具有唯一的网络地址。此外,本发明实施例中提及的节点的各项功能还可以由运行在至少一个设备上的逻辑节点来实现。
本发明实施例中涉及的网络可以为任何具有树形结构的网络,包括无线网络和有线网络。其中,无线网络可以为无线网状网络或移动自组织网络。有线网络可以为由多个路由器和多个交换机组成的具有树形结构的网络。
本发明实施例中涉及的报文,可以为多种类型的报文,如心跳报文、传感器实时报文或传感器历史报文等。
图2为本发明实施例提供的一种报文处理方法的应用场景示意图。图2中,节点A是节点B至节点K的根节点,节点B是节点E的父节点(也可称为上一级节点), 节点D和E是节点B的子节点(也可以称为下一级节点)。在通常情况下,每个节点都有一个定时器,在设定的定时器周期内,某个节点可以从其子节点接收报文,也可以根据自身数据构建报文。在定时器超时后,再将其接收的报文和/或构建的报文发送给父节点(或称为上一级节点)。例如,图2中,在设定的单个周期内,节点E从节点G和节点H接收报文,并根据自身数据构建报文。在定时器超时后,再将其从节点G和节点H接收的报文以及根据自身数据构建的报文发送给其父节点,即节点B或节点C。其中,节点E和节点B之间的虚线表示此条路径为实际路径,而节点E和节点C之间的虚线表示此条路径为备选路径。
在上述上行通信过程中,可以采用本发明实施例提供的报文处理方法,第一节点根据第一节点的数据构建第一报文,为其设置业务类型、最终目的地址和剩余聚合次数RTA,并确定与业务类型和最终目的地址的组合相对应的第一缓存的剩余容量,第一缓存中存储有第二报文。当第一报文的数据长度不大于剩余容量时,第一节点将第一报文与第二报文聚合成第三报文。通过控制报文的聚合次数和聚合数据长度,从而有效地将报文的传输延迟限制在合理范围内,缓解节点之间传输路径的带宽压力,以保证业务的正常运行。
下面,首先对本发明实施例提供的报文结构进行介绍。图3所示为可以采用本发明实施例提供的报文处理方法进行聚合的报文结构,该报文可以包括聚合报文头部(Aggregation Header)和聚合数据段(Data Segment)。
聚合报文头部可以包括聚合控制部(Aggregation Control)、最终目的地址(Final Destination Address)、剩余聚合次数(Residual Times to Aggregation,RTA)、聚合数据的长度(Data length)和聚合节点数(Aggregation Counts),它们占用的字节数(Bytes)可以分别为1、2/6/8、1、2和1。其中报文最终的目的地址可以为分别需要占用2字节、6字节和8字节的电气和电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)802.15.4中定义的16位地址(Short Address),48位扩展唯一标识符(48-bit Extended Unique Identifier,EUI-48)和64位扩展唯一标识符(64-bit Extended Unique Identifier,EUI-64)中的一种。聚合数据的长度用于描述聚合数据段的长度,可以从数据段1的“属性映射表”之前的任何字段开始算起。
聚合报文头部的聚合控制部中可以包括保留字段(Reserved)、为兼容性预留的报文格式版本号(Version)、最终目的地址模式(Final Destination Address Mode)和业务类型(Service Type),它们占用的位数(Bits)可以分别为1、2、2和3。其中最终目的地址模式用于描述报文头部的最终目的地址的地址长度,业务类型可以作为设置RTA的依据。
报文中聚合数据段可以包括至少一个数据段。例如,聚合的数据段可以包括N个数据段,即数据段1(Data of Node 1),…,数据段N(Data of Node N),其中N≥1。各个数据段中可以包括属性映射表(Attribute Map),节点标识(Node Identity),属性1和属性2,且它们占用的字节数可以分别1、2/6/8、1和1。属性1和属性2可以为表示某种属性参数,例如,如当该报文的业务类型为心跳报文时,属性1和属 性2可以分别表示接受信号强度(Received Signal Strength Indication,RSSI)和发射功率。
各个数据段中的属性映射表可以包括多个字段,如保留字段、是否存在第2个属性(Attribute 2 Existing)、是否存在第1个属性(Attribute 1 Existing)和节点标识模式(Node Identity Mode),相应的,占用的位数可以分别为4、1、1和2。其中,是否存在第2个属性和是否存在第1个属性分别用于表示该数据段中是否存在第2个属性和是否存在第1个属性。节点标识模式用于描述前述节点标识的地址长度。
需要说明的是,对节点标识和节点标识模式的描述,可以分别参见上述对报文的最终目的地址和最终目的地址模式的描述。除了上述描述的各个数据段中包括两个属性参数,即属性1和属性2的情况外,各个数据段中可以不包括属性参数,或者只包括1个属性参数,或者包括3个以上的属性参数,在此不作限定。相应的,属性映射表中的字段“是否存在第n个属性”的个数也随之发生改变,相关字段占用的位数或字节数也随之发生改变。
接下来,对本发明实施例提供的报文处理方法进行介绍。该方法涉及到构建具有如图3所示的结构的报文和/或对具有如图3所示的结构的报文进行处理。
图4为本发明实施例提供的一种报文处理方法的流程图。如图4所示,该实施例可以包括:
步骤S410,第一节点根据第一节点的第一数据生成第一报文,所述第一报文包括报文头部和报文载荷,所述报文头部包括业务类型、最终目的地址和RTA。
示例性的,第一节点的第一数据可以包括由该节点作为起始发送方的数据。例如,第一数据可以包括该节点产生的心跳信号。又例如,当该节点为传感器设备时,第一数据可以包括实时检测到的传感器实时数据,或者在之前的一段时间内检测到的传感器历史数据。再例如,当该节点为一台电脑时,第一数据可以包括用户输入的语音数据或文本数据。
示例性的,第一节点根据第一数据构建第一报文,可以包括:第一节点根据第一数据确定第一报文的业务类型、最终目的地址和RTA。其中,RTA可以根据业务类型和/或第一节点的设备运行状态等参数确定。通过设置第一报文的RTA,从而控制该报文的聚合次数,以将各个报文的聚合时延控制在合理范围内,并保证业务的正常运行。
在一个例子中,第一节点根据第一报文的业务类型确定第一报文的RTA。
例如,第一节点为传感器设备,第一节点的根节点为一台电脑。该传感器设备可以根据设备中产生的实时数据生成第一报文,其中第一报文的业务类型为传感器实时报文,最终目的地址可以为该电脑的媒体访问控制(Media Access Control,MAC)地址。相应的,可以根据业务类型(传感器实时报文)将第一报文的RTA值设置为1。
或者,该传感器设备可以根据设备中产生的传感器历史数据,生成业务类型为传感器历史报文的第一报文。相应的,可以根据业务类型(传感器历史报文)将第一报文的RTA值设置为5。
又例如,第一节点产生一个心跳信号,该心跳信号需要发送至第一节点的根节点,如边缘路由器(Border Router,BR)。根据该心跳信号,可以确定第一报文的业务类 型为心跳报文,最终目的地址为BR地址。相应的,可以根据业务类型(心跳报文)将第一报文的RTA值设置为3。
在另一例子中,第一节点根据该节点的设备运行状态确定第一报文的RTA。例如,当设备运行状态为启动状态、运行状态和断电状态时,相应的可以将第一报文的RTA设置为1、3、0。
接着,步骤S420,第一节点判断第一报文的RTA是否为0。
示例性的,当第一报文的RTA不为0时,执行步骤S430,当第一报文的RTA为0时,执行步骤S421。
步骤S430,第一节点确定与第一报文的业务类型和最终目的地址对应的第一缓存中的剩余容量,并判断第一报文的数据长度是否大于所述剩余容量。其中,第一报文缓存中存储有第二报文,第二报文具有与第一报文相同的业务类型和最终目的地址。
示例性的,第一节点可以预留一些缓存,并将这些缓存划分为多个缓存区域。不同的缓存区域分别与不同的目的地址和业务类型的组合相对应,一个缓存区域存储具有相同的最终目的地址和业务类型的报文。任意两个缓存区域的缓存容量可以相同,也可以不同。
例如,最终目的地址和业务类型的组合可以包括如下任一种:
网关地址和心跳报文;
BR地址和心跳报文;
网关地址和传感器实时报文。
相应地,第一节点可以预留出缓存容量均为1KB的3个缓存区域,分别用于存储这3种组合对应的报文。
示例性的,第一节点根据第一报文的最终目的地址和业务类型,获取与该最终目的地址和业务类型的组合相对应的第一缓存的剩余容量。所述剩余容量可以由第一节点根据第一缓存的总容量和第一缓存中存储的第二报文的数据长度计算得出。
在一个例子中,当第二报文中字段“聚合数据的长度”是指图3中字段“聚合节点数”之后的字段的数据长度时,第一节点可以先将第二报文中的“聚合数据的长度”和整个报文头部占用的数据长度的和值作为第二报文的数据长度,然后将第一缓存的总容量和第二报文的数据长度的差值作为第一缓存的剩余容量。
例如,第二报文中字段“聚合数据的长度”为0.5KB,第二报文的报文头部占用的数据长度为0.1KB,那么第二报文的数据长度为0.6KB。第一缓存的总容量为2KB,则第一缓存的剩余容量为1.4KB。
示例性的,第二报文可以为第一节点从其子节点接收的一个报文,且该报文可以为未进行过聚合处理的报文,也可以为已进行聚合处理的报文。或者,第二报文可以为来自所述第一节点的多个子节点的多个具有相同的目的地址和业务类型的报文,进行聚合处理后产生的报文。又或者,第二报文可以为,在生成第一报文之前,第一节点根据第一节点的第二数据生成的报文。
需要说明的是,当第一节点判断出第一报文的数据长度不大于第一缓存中的剩余容量,且第一缓存中没有存储报文时,第一节点可以将第一报文存储在第一缓存中,等待可能的进一步聚合。在一个例子中,第一节点在存储该第一报文时,将第一报文 的RTA更新为初始的RTA减1后的数值。
示例性的,当第一节点判断出第一报文的数据长度不大于第一缓存中的剩余容量时,执行步骤S440和步骤S450。当第一节点判断出第一报文的数据长度大于第一缓存中的剩余容量时,执行步骤S431。
步骤S440,第一节点将第一报文与第二报文聚合成第三报文。
在一个例子中,第一报文的数据长度为0.3KB,第一缓存中的剩余容量为0.8KB,第一节点可以据此将第一报文与第一缓存中的第二报文聚合成第三报文。
在另一个例子中,第一报文的数据长度为0.5KB,第一缓存中的剩余缓存容量为0.5KB,第一节点可以据此将第一报文与第一缓存中的第二报文聚合成第三报文。
示例性的,第一节点将第一报文与第二报文聚合成第三报文,可以包括:第一节点将第一报文的数据段拼接在第二报文的数据段之后,以及第一节点将第三报文的RTA设置为第一报文的RTA减1后的数值与第二报文的RTA中的最小值。
在一个例子中,如图5所示,第一报文的数据段包括第一节点的1个数据段,第二报文的数据段包括聚合后的来自2个节点的2个数据段,第一报文和第二报文的RTA分别为3和2。第一节点将第一报文的1个数据段拼接在第二报文的2个数据段之后,并将第三报文的RTA设置为2(第一报文的RTA减1)和2(第二报文的RTA)中的最小值2。
在另一个例子中,如图6所示,第一报文的数据段包括第一节点的1个数据段,第二报文的数据段包括1个节点的2个数据段,第一报文和第二报文的RTA分别为1和1。第一节点将第一报文的1个数据段拼接在第二报文的2个数据段之后,并将第三报文的RTA设置为0(第一报文的RTA减1)和1(第二报文的RTA)中的最小值0。
示例性的,第一节点将第一报文与第二报文聚合成第三报文,还可以包括:根据第一报文中和第二报文中的“聚合数据的长度”,确定第三报文中“聚合数据的长度”。以及根据第一报文中和第二报文中的“节点标识”,确定第三报文中“聚合数据的节点数量”。
在一个例子中,如图6所示,第一报文和第二报文的“聚合数据的长度”分别为5字节和10字节,由此可以确定第三报文中“聚合数据的长度”为15字节。第一报文中和第二报文中总共包括2个不同的“节点标识”,由此可以确定第三报文中“聚合数据的节点数量”为2。
通过前述步骤,第一节点根据第一节点的第一数据构建第一报文,并将第一报文和第二报文聚合成第三报文。
在一个例子中,第一节点在将第一报文和第二报文聚合为第三报文后,继续等待可能的进一步聚合,直到超出预设聚合时间。
步骤S450,第一节点判断第三报文的RTA是否为0。
示例性的,当第三报文的RTA不为0时,执行步骤S451,当第三报文的RTA为0时,执行步骤S452。
步骤S451,在超出预设聚合时间后,第一节点将第三报文发送至该节点的父节点。
示例性的,预设聚合时间为第一节点设置的聚合等待周期,如10ms、5ms等。通过设置预设聚合时间,以及报文的RTA,从而将报文的聚合时延控制在合理的范围内。
示例性的,第一节点所在的网络模型包括网络层和应用层,步骤S410至步骤S440是在应用层实现的,而多个节点之间报文的传输(如,步骤S451)则是在网络层实现的。
示例性的,第一节点在应用层将第一报文和第二报文聚合成第三报文后,在网络层将第一节点的父节点的地址作为第三报文的网络目的地址、封装在第三报文的网络层封装头部中。采用此种方式,当第三报文的RTA不为0时,也就是第三报文可以继续聚合时,通过将第三报文的网络目的地址设置为第一节点的父节点的地址,可以使父节点在接收到第三报文后,根据该报文的网络目的地址(父节点的地址),将第三报文提取到应用层中,进一步判断是否可以对第三报文进行进一步聚合。
步骤S452,在超出预设聚合时间后,第一节点将第三报文发送至与第三报文中的最终目的地址对应的节点。
当步骤S450中第一节点判断出第三报文的RTA为0时,执行本S452,在超出预设聚合时间后,将第三报文发送至与第三报文中的最终目的地址对应的节点。
示例性的,第一节点在应用层将第一报文和第二报文聚合成第三报文后,在网络层将第三报文的报文头部包括的最终目的地址作为第三报文的网络目的地址、封装在第三报文的网络层封装头部中。采用此种方式,当第三报文的RTA为0时,也就是第三报文不能继续聚合时,通过将第三报文的网络目的地址设置为最终目的地址,可以使第一节点的父节点在接收到第三报文后,不将第三报文提取至应用层,而是根据第三报文的网络目的地址(最终目的地址)直接对第三报文进行转发。
步骤S431,在预定时间内,第一节点将第一报文发送至第一节点的父节点。
当步骤S430中节点判断出第一报文的数据长度大于剩余缓存容量时,执行本S431,在预定时间内,将第一报文发送至所述第一节点的父节点。
示例性的,如果第一报文的数据长度大于剩余容量,此时,第一节点无需对第一报文和第一报文缓存中的第二报文进行聚合,而是在预定时间内,将第一报文发送至所述第一节点的父节点。
示例性的,预定时间可以为节点或节点所在的网络系统设置的较小的时间间隔,如0.1ms或0.5ms,本S430中的预定时间小于步骤S451和步骤S452中提及的预设聚合时间。
在一个例子中,第一报文的数据长度0.6KB大于第一报文缓存的剩余缓存容量0.5KB。此时,在预定时间0.5ms内,第一节点将第一报文发送至所述第一节点的父节点。
示例性的,第一节点在网络层将第一节点的父节点的地址作为第一报文的网络目的地址、封装在第一报文的网络层封装头部中。以使第一节点的父节点在接收到第一报文后可以将第一报文提取至应用层,进一步判断是否可以对第一报文进行聚合。
步骤S421,在预定时间内,第一节点将第一报文发送至第一节点的父节点。
当步骤S420中第一节点判断出第一报文的RTA为0时,执行本S421,在预定时间内,将第一报文发送至所述第一节点的父节点。
示例性的,对本S421中预定时间的描述可以参见步骤S431中对预定时间的描述。
示例性的,第一节点在网络层将第一报文的最终目的地址作为第一报文的网络目的地址、封装在第一报文的网络层封装头部中。以使第一节点的父节点在接收到第一报文后, 可以不将第一报文提取至应用层,而是根据第一报文的网络目的地址(最终目的地址)直接对第一报文进行转发。
由此可知,采用上述实施例提供的报文处理方法,第一节点根据第一节点的数据构建第一报文,为其设置最终目的地址、业务类型和剩余聚合次数RTA,并确定与最终目的地址和业务类型的组合相对应的第一缓存中的剩余容量,以及第一缓存中存储的第二报文。当第一报文的数据长度不大于剩余容量时,将第一报文与第一缓存中的第二报文聚合成第三报文。通过控制报文的聚合次数和聚合数据长度,从而有效地将报文的传输延迟限制在合理范围内,缓解节点之间传输路径的带宽压力,以保证业务的正常运行。
图7为本发明实施例提供的另一种报文处理方法的流程图。如图7所示,该实施例可以包括:
步骤S710,第一节点接收第一节点的第一子节点发送的第四报文。所述第四报文包括报文头部和网络层封装头部,所述报文头部包括业务类型、最终目的地址和剩余聚合次数RTA,所述网络层封装头部包括网络目的地址。对步骤S710中第四报文的报文头部的描述,可以参考对图3中的报文结构和图4中步骤S410中对报文头部的描述。
步骤S720,第一节点判断第四报文的网络目的地址是否为第一节点的地址。
当第一节点判断出第四报文的网络目的地址不是第一节点的目的地址时,执行步骤S721。当第一节点判断出第四报文的网络目的地址是第一节点的目的地址时,执行步骤S730。
步骤S721,在预定时间内,第一节点将第四报文发送至于网络目的地址对应的节点。
对步骤S721的描述,还可以参见上述对步骤S421的描述。
步骤S730,第一节点确定与第四报文的业务类型和最终目的地址的组合相对应的第四缓存中的剩余容量,并判断第四报文的数据长度是否大于剩余容量。
当步骤S720中第一节点判断出第四报文的网络目的地址是第一节点的目的地址时,执行本S730,确定与第四报文的业务类型和最终目的地址的组合相对应的第四缓存中的剩余容量,并判断第四报文的数据长度是否大于剩余容量。
其中,第四缓存中存储有第五报文,第五报文包括与第四报文相同的业务类型和最终目的地址。第五报文可以为第一节点根据第一节点的数据生成的第五报文,或者,可以为第一节点从第一节点的第二子节点接收的第五报文。第一节点的第一子节点和第二子节点可以为同一节点也可以为不同节点。
对步骤S730的描述,还可以参见上述对步骤S430的描述。
当第一节点判断出第四报文的数据长度不大于该剩余容量时,执行步骤S740。当第一节点判断出第四报文的数据长度大于该剩余容量时,执行步骤S731。
步骤S731,在预定的时间内,第一节点将第四报文发送至第一节点的父节点。
对步骤S731的描述可以参见上述对步骤S431的描述。
步骤S740,第一节点将第四报文与第五报文聚合成第六报文。
当步骤S730中第一节点判断出第四报文的数据长度不大于该剩余容量时,执行本步骤S740,将第四报文与第五报文聚合成第六报文。对步骤S740的描述,可以参见 上述对步骤S440的描述。
步骤S750,第一节点判断第六报文的RTA是否为0。。
示例性的,当第六报文的RTA不为0时,执行步骤S751,当第六报文的RTA为0时,执行步骤S752。
对步骤S750的描述,可以参见上述对步骤S450的描述。
步骤S751,在超出预设聚合时间后,第一节点将第六报文发送至该节点的父节点。
对步骤S751的描述,可以参见上述对步骤S451的描述。
步骤S752,在超出预设聚合时间后,第一节点将第六报文发送至与第六报文中的最终目的地址对应的节点。
当步骤S750中第一节点判断出第六报文的RTA为0时,执行本S752,在超出预设聚合时间后,将第六报文发送至与第六报文中的最终目的地址对应的节点。
对步骤S752的描述,可以参见上述对步骤S452的描述。
需要说明的是,当步骤S720中第一节点判断出第四报文的数据长度不大于第四缓存中的剩余容量,且第四缓存中没有存储报文时,第一节点可以将第四报文存储在第四缓存中,等待可能的进一步聚合,直到超出预设聚合时间。在一个例子中,第一节点在存储所述第四节点时,将第四报文的RTA更新为原有的RTA减1后的数值。
由此可知,采用上述实施例提供的报文处理方法,第一节点接收第四报文,并确定与第四报文的目的地址和业务类型的组合相对应的第四缓存的剩余容量,以及第四缓存中存储有第五报文。当第四报文的数据长度不大于剩余容量时,将第四报文与第五报文聚合成第六报文。通过控制报文的聚合次数和聚合数据长度,从而有效地将报文的传输延迟限制在合理范围内,缓解节点之间传输路径的带宽压力,以保证业务的正常运行。
与上述报文处理方法对应地,本发明的多个实施例还提供一种报文处理装置,该装置可以应用于第一节点。图8为本发明实施例提供的一种报文发送装置的结构示意图。如图8所示,该装置800包括:
生成单元810,用于根据第一节点的数据生成第一报文,第一报文包括报文头部,报文头部包括业务类型、最终目的地址和剩余聚合次数RTA;
确定单元820,用于当第一报文的RTA不为0时,确定与业务类型和最终目的地址对应的第一缓存中的剩余容量,第一缓存中存储有第二报文,第二报文具有与第一报文相同的业务类型和最终目的地址;
处理单元830,用于当第一报文的数据长度不大于剩余容量时,将第一报文与第二报文聚合成第三报文,第三报文的报文头部包括业务类型、最终目的地址和第三报文的RTA,第三报文的RTA为第一报文的RTA减1后的数值与第二报文的RTA中的最小值。
在一种可能的实施方式中,该装置还包括:发送单元840,用于:当第三报文的RTA为0时,在超出预设聚合时间后,将第三报文发送至与最终目的地址对应的节点;当第三报文的RTA不为0时,在超出预设聚合时间后,将第三报文发送至第一节点的父节点。
在一种可能的实施方式中,该装置还包括:发送单元840,用于当第一报文的RTA为0时,在预定时间内,将第一报文发送至与最终目的地址对应的节点。
在一种可能的实施方式中,该装置还包括:发送单元840,用于当第一报文的数据长度大于剩余容量时,在预定时间内,将第一报文发送至第一节点的父节点。
本发明实施例提供的一种报文处理装置,生成单元810根据第一节点的数据构建第一报文,为其设置最终目的地址、业务类型和剩余聚合次数RTA,确定单元820确定与最终目的地址和业务类型的组合相对应的第一缓存中的剩余容量,以及第一缓存中存储的第二报文。当第一报文的数据长度不大于剩余容量时,处理单元830将第一报文与第一缓存中的第二报文聚合成第三报文。通过控制报文的聚合次数和聚合数据长度,从而有效地将报文的传输延迟限制在合理范围内,缓解节点之间传输路径的带宽压力,以保证业务的正常运行。
图9为本发明实施例提供的另一种报文发送装置的结构示意图。如图9所示,该装置900可以包括:
接收单元910,用于接收第一节点的子节点发送的第四报文,第四报文包括报文头部和网络层封装头部,报文头部包括业务类型、最终目的地址和剩余聚合次数RTA,网络层封装头部包括网络目的地址;
确定单元920,用于当网络目的地址为第一节点的地址时,确定与业务类型和最终目的地址对应的第四缓存的剩余容量,第四缓存中存储有第五报文,第五报文具有与第四报文相同的业务类型和最终目的地址;
处理单元930,用于当第四报文的数据长度不大于剩余容量时,将第四报文与第五报文聚合成第六报文,第六报文的报文头部包括业务类型、最终目的地址和第六报文的RTA,第六报文的RTA为第四报文的RTA减1后的数值与第五报文的RTA的最小值。
在一种可能的实施方式中,该装置还包括:发送单元940,用于当网络目的地址不是第一节点的地址时,在预定时间内,将第四报文发送至与网络目的地址对应的节点。
本发明实施例提供的一种报文处理装置,接收单元910接收第四报文,确定单元920确定与第四报文的目的地址和业务类型的组合相对应的第四缓存的剩余容量,以及第四缓存中存储有第五报文。当第四报文的数据长度不大于剩余容量时,处理单元930将第四报文与第五报文聚合成第六报文。通过控制报文的聚合次数和聚合数据长度,从而有效地将报文的传输延迟限制在合理范围内,缓解节点之间传输路径的带宽压力,以保证业务的正常运行。
图10为本发明实施例提供的还一种报文发送装置的结构示意图。如图10所示,该装置1000包括:处理器1010、存储器1020和通信接口1030。处理器1010、存储器1020和通信接口1030之间可以通过总线1040相互连接;总线1040可以分为地址总线1040、数据总线1040、控制总线1040等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线1040或一种类型的总线1040。所述存储器1020,用于存储报文和邻 居信息,可以包括易失性存储器(volatile memory)1020,例如随机存取存储器1020(Random Access Memory,RAM)。所述通信接口1030用于所述节点设备与其他节点通信,可以是一个或多个。通信接口1030包含有线或无线接口,典型的无线接口为射频(Radio Frequency,RF)收发器,可以为802.11接口,802.15.4接口,蜂窝网络通信接口,ZigBee接口或其组合等。处理器1010可以是中央处理器(Central Processing Unit,CPU),网络处理器(Network Processor,NP),微控制器(Microcontroller Unit,MCU)或其组合。处理器1010还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(Application Specific Integrated Circuit,ASIC),可编程逻辑器件(Programmable Logic Device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD),现场可编程逻辑门阵列(Field-Programmable Gate Array,FPGA),通用阵列逻辑(Generic Array Logic,GAL)或其任意组合。
处理器1010执行存储器1020中存储的可执行代码时,可以用于实现图4或图7中任一实施例中的报文处理方法。
以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请的具体实施方式而已,并不用于限定本申请的保护范围,凡在本申请的原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (12)

  1. 一种报文处理方法,其特征在于,包括:
    第一节点根据所述第一节点的数据生成第一报文,所述第一报文包括报文头部,所述报文头部包括业务类型、最终目的地址和剩余聚合次数RTA;
    当所述第一报文的RTA不为0时,所述第一节点确定与所述业务类型和最终目的地址对应的第一缓存中的剩余容量,所述第一缓存中存储有第二报文,所述第二报文具有与所述第一报文相同的业务类型和最终目的地址;
    当所述第一报文的数据长度不大于所述剩余容量时,所述第一节点将所述第一报文与所述第二报文聚合成第三报文,所述第三报文的报文头部包括所述业务类型、所述最终目的地址和所述第三报文的RTA,所述第三报文的RTA为所述第一报文的RTA减1后的数值与所述第二报文的RTA中的最小值。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    当所述第三报文的RTA为0时,在超出预设聚合时间后,所述第一节点将所述第三报文发送至与所述最终目的地址对应的节点;
    当所述第三报文的RTA不为0时,在超出所述预设聚合时间后,所述第一节点将所述第三报文发送至所述第一节点的父节点。
  3. 根据权利要求1所述的方法,其特征在于,还包括:
    当所述第一报文的RTA为0时,在预定时间内,所述第一节点将所述第一报文发送至与所述最终目的地址对应的节点。
  4. 根据权利要求1所述的方法,其特征在于,还包括:
    当所述第一报文的数据长度大于所述剩余容量时,在预定时间内,所述第一节点将所述第一报文发送至所述第一节点的父节点。
  5. 一种报文处理方法,其特征在于,包括:
    第一节点接收所述第一节点的第一子节点发送的第四报文,所述第四报文包括报文头部和网络层封装头部,所述报文头部包括业务类型、最终目的地址和剩余聚合次数RTA,所述网络层封装头部包括网络目的地址;
    当所述网络目的地址为所述第一节点的地址时,所述第一节点确定与所述业务类型和最终目的地址对应的第四缓存的剩余容量,所述第四缓存中存储有第五报文,所述第五报文具有与所述第四报文相同的业务类型和最终目的地址;
    当所述第四报文的数据长度不大于所述剩余容量时,所述第一节点将所述第四报文与所述第五报文聚合成第六报文,所述第六报文的报文头部包括所述业务类型、所述最终目的地址和所述第六报文的RTA,所述第六报文的RTA为所述第四报文的RTA减1后的数值与所述第五报文的RTA的最小值。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    当所述网络目的地址不是所述第一节点的地址时,在预定时间内,所述第一节点将所述第四报文发送至与所述网络目的地址对应的节点。
  7. 一种报文处理装置,应用于第一节点,其特征在于,包括:
    生成单元,用于根据所述第一节点的数据生成第一报文,所述第一报文包括报文头部,所述报文头部包括业务类型、最终目的地址和剩余聚合次数RTA;
    确定单元,用于当所述第一报文的RTA不为0时,确定与所述业务类型和最终目的地址对应的第一缓存中的剩余容量,所述第一缓存中存储有第二报文,所述第二报文具有与所述第一报文相同的业务类型和最终目的地址;
    处理单元,用于当所述第一报文的数据长度不大于所述剩余容量时,将所述第一报文与所述第二报文聚合成第三报文,所述第三报文的报文头部包括所述业务类型、所述最终目的地址和所述第三报文的RTA,所述第三报文的RTA为所述第一报文的RTA减1后的数值与所述第二报文的RTA中的最小值。
  8. 根据权利要求7所述的装置,其特征在于,还包括:发送单元,用于:
    当所述第三报文的RTA为0时,在超出预设聚合时间后,将所述第三报文发送至与所述最终目的地址对应的节点;
    当所述第三报文的RTA不为0时,在超出所述预设聚合时间后,将所述第三报文发送至所述第一节点的父节点。
  9. 根据权利要求7所述的装置,其特征在于,还包括:
    发送单元,用于当所述第一报文的RTA为0时,在预定时间内,将所述第一报文发送至与所述最终目的地址对应的节点。
  10. 根据权利要求7所述的装置,其特征在于,还包括:
    发送单元,用于当所述第一报文的数据长度大于所述剩余容量时,在预定时间内,将所述第一报文发送至所述第一节点的父节点。
  11. 一种报文处理装置,应用于第一节点,其特征在于,包括:
    接收单元,用于接收所述第一节点的子节点发送的第四报文,所述第四报文包括报文头部和网络层封装头部,所述报文头部包括业务类型、最终目的地址和剩余聚合次数RTA,所述网络层封装头部包括网络目的地址;
    确定单元,用于当所述网络目的地址为所述第一节点的地址时,确定与所述业务类型和最终目的地址对应的第四缓存的剩余容量,所述第四缓存中存储有第五报文,所述第五报文具有与所述第四报文相同的业务类型和最终目的地址;
    处理单元,用于当所述第四报文的数据长度不大于所述剩余容量时,将所述第四报文与所述第五报文聚合成第六报文,所述第六报文的报文头部包括所述业务类型、所述最终目的地址和所述第六报文的RTA,所述第六报文的RTA为所述第四报文的RTA减1后的数值与所述第五报文的RTA的最小值。
  12. 根据权利要求11所述的装置,其特征在于,还包括:
    发送单元,用于当所述网络目的地址不是所述第一节点的地址时,在预定时间内,将所述第四报文发送至与所述网络目的地址对应的节点。
PCT/CN2018/102850 2017-11-22 2018-08-29 报文处理方法及装置 WO2019100794A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18880781.2A EP3678337B1 (en) 2017-11-22 2018-08-29 Message processing method and apparatus
US16/828,228 US11140245B2 (en) 2017-11-22 2020-03-24 Packet processing method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711175324.9A CN109819524B (zh) 2017-11-22 2017-11-22 报文处理方法及装置
CN201711175324.9 2017-11-22

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/828,228 Continuation US11140245B2 (en) 2017-11-22 2020-03-24 Packet processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2019100794A1 true WO2019100794A1 (zh) 2019-05-31

Family

ID=66599825

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102850 WO2019100794A1 (zh) 2017-11-22 2018-08-29 报文处理方法及装置

Country Status (4)

Country Link
US (1) US11140245B2 (zh)
EP (1) EP3678337B1 (zh)
CN (1) CN109819524B (zh)
WO (1) WO2019100794A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4044558A4 (en) * 2019-12-03 2022-10-19 Huawei Technologies Co., Ltd. NETWORK STRUCTURE, METHOD OF TRANSMITTING PACKETS BETWEEN NETWORK ELEMENTS IN A NETWORK, AND METHOD OF RECEIVING

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111181825B (zh) * 2019-12-31 2021-12-21 智车优行科技(北京)有限公司 信息处理方法和装置、电子设备和存储介质
CN113141330A (zh) * 2020-01-17 2021-07-20 华为技术有限公司 通信方法及装置
CN114338556A (zh) * 2022-01-07 2022-04-12 南昌济铃新能源科技有限责任公司 一种can网络和车载以太网间的报文转发方法及网关系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030943A (zh) * 2007-04-03 2007-09-05 华为技术有限公司 一种发送报文的方法和路由器
US20080279219A1 (en) * 2007-05-09 2008-11-13 Entropic Communications, Inc. Aggregating network packets for transmission to a destination node
US20090201898A1 (en) * 2008-02-13 2009-08-13 Cisco Technology, Inc. End-to-End Packet Aggregation in Mesh Networks
CN103179613A (zh) * 2011-12-26 2013-06-26 中国科学院沈阳自动化研究所 一种面向工厂自动化tdma无线网络的包聚合方法
CN103281726A (zh) * 2013-06-13 2013-09-04 湖南大学 基于6LoWPAN协议栈的数据聚合方法
WO2016160040A1 (en) * 2015-03-27 2016-10-06 Entropic Communications, Inc. Efficient packet aggregation using channel characteristics in a communication network

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101998503B (zh) * 2009-08-12 2013-03-13 中国科学院沈阳自动化研究所 面向混合拓扑结构无线传感器网络的两级包聚合方法
GB2483057B (en) * 2010-08-20 2012-11-28 Wireless Tech Solutions Llc Apparatus, method and system for managing data transmission
CN101990238B (zh) * 2010-11-05 2013-06-26 中国科学院声学研究所 一种传感器网络数据聚合的实现方法
US9462040B2 (en) * 2011-12-07 2016-10-04 Cisco Technology, Inc. Network-based dynamic data management
CN102984709B (zh) * 2012-12-05 2015-08-26 上海交通大学 一种无线mesh网络信道带宽动态调节的方法
US20150295841A1 (en) * 2014-04-14 2015-10-15 Qualcomm Incorporated Efficient packet aggregation using dynamic wait time
US9954778B2 (en) * 2015-09-15 2018-04-24 At&T Mobility Ii Llc Gateways for sensor data packets in cellular networks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030943A (zh) * 2007-04-03 2007-09-05 华为技术有限公司 一种发送报文的方法和路由器
US20080279219A1 (en) * 2007-05-09 2008-11-13 Entropic Communications, Inc. Aggregating network packets for transmission to a destination node
US20090201898A1 (en) * 2008-02-13 2009-08-13 Cisco Technology, Inc. End-to-End Packet Aggregation in Mesh Networks
CN103179613A (zh) * 2011-12-26 2013-06-26 中国科学院沈阳自动化研究所 一种面向工厂自动化tdma无线网络的包聚合方法
CN103281726A (zh) * 2013-06-13 2013-09-04 湖南大学 基于6LoWPAN协议栈的数据聚合方法
WO2016160040A1 (en) * 2015-03-27 2016-10-06 Entropic Communications, Inc. Efficient packet aggregation using channel characteristics in a communication network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3678337A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4044558A4 (en) * 2019-12-03 2022-10-19 Huawei Technologies Co., Ltd. NETWORK STRUCTURE, METHOD OF TRANSMITTING PACKETS BETWEEN NETWORK ELEMENTS IN A NETWORK, AND METHOD OF RECEIVING

Also Published As

Publication number Publication date
CN109819524A (zh) 2019-05-28
EP3678337A1 (en) 2020-07-08
EP3678337B1 (en) 2023-04-26
US20200220953A1 (en) 2020-07-09
EP3678337A4 (en) 2020-10-28
US11140245B2 (en) 2021-10-05
CN109819524B (zh) 2021-04-09

Similar Documents

Publication Publication Date Title
US11909652B2 (en) Method, device and storage medium for quality of service (QoS) flow management of time sensitive data for transmission of ethernet packet filter sets
WO2019100794A1 (zh) 报文处理方法及装置
US11937119B2 (en) Method and terminal for initiating time sensitive communication service, and storage medium
US9407507B2 (en) Topology discovery in a hybrid network
US11109269B2 (en) Packet forwarding method and apparatus
WO2019011140A1 (zh) 物联网、及其路由、分配标识的方法、装置及设备、介质
US20220209996A1 (en) Interface Extension Method, Apparatus, and System
WO2021036925A1 (zh) 通信方法及装置
CN104618980B (zh) 无线多跳链状网的路由实现方法
US11722883B2 (en) Transmission method and apparatus
US11444874B2 (en) Packet transmission method, and communications apparatus and system
JP6480452B2 (ja) パケット処理方法および装置
US20240008113A1 (en) Direct link addressing method and apparatus
WO2020169039A1 (zh) 一种策略管理的方法及装置
AU2020246484B2 (en) Terminal management and control method, apparatus, and system
JP6356239B2 (ja) 最大離脱期間
WO2023273957A1 (zh) 算力发布方法、算力更新方法及装置
CN112532540A (zh) 接口管理方法、装置和系统
CN104363172B (zh) 一种数据收发方法及装置
EP4304144A1 (en) Communication method and apparatus
US12003417B2 (en) Communication method and apparatus
FI127540B (en) Network resource management of communication resources
WO2022228293A1 (zh) 一种发送报文的方法、处理报文的方法及设备
US20220103519A1 (en) Method for Sending Packet Traffic and Apparatus
WO2023011006A1 (zh) 一种通信方法、装置及设备

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018880781

Country of ref document: EP

Effective date: 20200330

NENP Non-entry into the national phase

Ref country code: DE