WO2015027474A1 - 数据报头封装方法、解封装方法、装置及设备 - Google Patents

数据报头封装方法、解封装方法、装置及设备 Download PDF

Info

Publication number
WO2015027474A1
WO2015027474A1 PCT/CN2013/082700 CN2013082700W WO2015027474A1 WO 2015027474 A1 WO2015027474 A1 WO 2015027474A1 CN 2013082700 W CN2013082700 W CN 2013082700W WO 2015027474 A1 WO2015027474 A1 WO 2015027474A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
identifier
index
sending
receiving device
Prior art date
Application number
PCT/CN2013/082700
Other languages
English (en)
French (fr)
Other versions
WO2015027474A9 (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 CN201380079253.6A priority Critical patent/CN105493563A/zh
Priority to PCT/CN2013/082700 priority patent/WO2015027474A1/zh
Publication of WO2015027474A1 publication Critical patent/WO2015027474A1/zh
Publication of WO2015027474A9 publication Critical patent/WO2015027474A9/zh

Links

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/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/672Short addresses

Definitions

  • the present application relates to the field of data processing technologies, and in particular, to a data header encapsulation method, decapsulation method, apparatus, and device. Background technique
  • WLAN Wireless Local Area Networks
  • the basic network architecture of the WLAN mainly includes the physical layer, the MAC (Media Access Control) layer, and the logical link control layer.
  • the WLAN (Internet Protocol)-based WLAN may also include a network layer, a transport layer, and an application layer, and each network layer uses different communication protocols for communication.
  • the devices in the WLAN mainly include wireless access point devices and site devices.
  • One wireless access point device can connect several site devices to form a wireless subnet, and multiple wireless subnets form a distributed system, and the distributed system can also access the Internet.
  • Site devices within the same wireless subnet can communicate directly, or communicate with devices in other wireless subnets or wireless LANs through wireless access point devices.
  • the data to be transmitted sent by the sending device needs to be encapsulated by each network layer, and the data headers of the corresponding network layer are added respectively, and then transmitted to the receiving device.
  • the data header of each network layer includes different field contents.
  • the MAC layer data header mainly includes an address field, a frame control domain, a QoS control domain, and a duration identification field, where the address domain mainly carries a sending address, a receiving address, a source address, and a destination address of data to be transmitted. .
  • the embodiment of the present invention provides a data header encapsulation generation method, a decapsulation method, a device, and a device, which are used to solve the technical problem of high data header overhead and high power consumption.
  • the embodiment of the present application provides the following technical solutions:
  • a data header encapsulation method including:
  • a communication associated device of the MAC layer Determining, by the media access control, a communication associated device of the MAC layer to transmit data, the communication associated device comprising a transmitting device and a receiving device;
  • the first index identifier of the sending device and the first index identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field, and header encapsulation is performed according to the corresponding address to form the MAC layer data header.
  • the first index identifier is preset and allocated by a wireless access point device of a wireless subnet where the sending device and the receiving device are located.
  • the first index identifier is a site identifier for a device whose index device type is a site, or a wireless access point identifier of a device whose index device type is a wireless access point.
  • the first index identifier of the sending device is a site identifier, where the site devices located in the same wireless subnet respectively have unique site identifiers; or, when the sending device is wirelessly connected
  • the first index identifier of the sending device is a wireless access point identifier, where the wireless access point devices located in different distributed systems respectively have unique wireless access point identifiers; or
  • the first index identifier of the receiving device is a site identifier
  • the first index identifier of the receiving device is a wireless access point identifier.
  • the first index identifier of the sending device and the first index identifier of the receiving device are included as corresponding addresses in a MAC layer data header address field.
  • the first index identifier of the sending device is used as the sending address and the source address in the MAC layer data header address field. Determining, by using the first index identifier of the receiving device, a destination address and a receiving address in a MAC layer data header address field; or
  • the first index identifier of the sending device is used as a sending address and a source address in a MAC layer data header address field.
  • the first index identifier of the receiving device and the MAC address of the destination device are respectively used as a receiving address and a destination address in a MAC layer data address field; or, when the source device of the data to be transmitted and When the sending device is different, the destination device, and the receiving device are the same, the first index identifier of the sending device and the MAC address of the source device are respectively used as a sending address and a source address in a MAC layer data header address field.
  • the first index identifier of the receiving device is used as a destination address and a receiving address in a MAC layer data header address field.
  • a fourth possible implementation manner of the first aspect is further provided, where the sending device and the receiving device are located in different wireless subnets, the method Also includes:
  • a fifth possible implementation manner of the first aspect is further provided, where the wireless access point identifier is Includes distributed system index information and wireless access point index information.
  • the method further includes:
  • Determining information to be transmitted in the header information according to a data header compression rule Encapsulating the network layer data header according to the to-be-transmitted information, and adding to the data to-be-transmitted data header, and transmitting to the logical link control layer;
  • the information to be transmitted includes information that changes in a communication connection process in the header information, Logical link control layer information that is not known, or information that is not predictable.
  • a data header decapsulation method including:
  • a data header encapsulation method including:
  • the sending device or the receiving device is a wireless access point device, determining a second index identifier of the sending device or a second index identifier of the receiving device, where the sending device and the receiving device respectively have a unique second index identifier, where the number of bytes of the second index identifier is less than the number of bytes of the MAC address;
  • the second index identifier of the sending device or the second index identifier of the receiving device is used as a corresponding address in a MAC layer data header address field, and is encapsulated according to the corresponding address to form the MAC layer data header.
  • the sending device and the receiving device are wireless access point devices, determining a second index identifier of the sending device and a second index identifier of the receiving device;
  • the MAC layer data header is formed.
  • the second index identifier is a wireless access point identifier of the index wireless access point device, and the wireless access point devices located in different distributed systems are respectively unique Wireless access point identification.
  • the method is applied to a sending device, where the sending device is a site device, the method further includes:
  • the associated wireless access point device Detecting that the wireless access point identifier of the associated wireless access point device is the same as the wireless access point identifier included in the received broadcast information, and the associated wireless access point device's cornerstone out service set identifier BSSID or service set identifier SSID Sending address conflict information to the associated wireless access point device when the BSSID or SSID included in the received broadcast information is different; or
  • the method further includes:
  • the wireless network access point identifier included in the received broadcast information is the same as the wireless access point identifier of the sending device, or the wireless access point identifier is reset when the address conflict message sent by the associated station device is received.
  • a data header decapsulation method including:
  • a data header encapsulation apparatus including:
  • a device determining module configured to determine a communication association of a media access control MAC layer to be transmitted data
  • the communication associated device includes a sending device and a receiving device;
  • a first identifier obtaining module configured to: when the sending device and the receiving device are located in a same wireless subnet, determine a first index identifier of the sending device, and a first index identifier of the receiving device, where the sending device is The receiving device has a unique first index identifier, and the number of the first index identifier bytes is smaller than the number of MAC address bytes;
  • a first address generating module configured to use a first index identifier of the sending device and a first index identifier of the receiving device as a corresponding address in a MAC layer data header address field;
  • the first header encapsulating module is configured to perform header encapsulation according to an address obtained by the first address generating module to form the MAC layer data header.
  • the first index identifier is preset and allocated by the sending device and the wireless access point device of the wireless subnet where the receiving device is located.
  • the first index identifier is a site identifier for a device whose index device type is a site, or a wireless access point of a device whose index device type is a wireless access point.
  • the first index identifier of the sending device is a site identifier, where the site devices located in the same wireless subnet respectively have unique site identifiers; or, when the sending device is wirelessly connected
  • the first index identifier of the sending device is a wireless access point identifier, where the wireless access point devices located in different distributed systems respectively have unique wireless access point identifiers; or
  • the first index identifier of the receiving device is a site identifier
  • the first index of the receiving device is identified as a wireless access point identifier.
  • the first address generating module includes: a first address generating submodule, configured to: when the source device of the data to be transmitted and the sending device are the same, When the device is the same as the receiving device, the first index identifier of the sending device is used as the sending address and the source address in the MAC layer data header address field, and the first index identifier of the receiving device is used as the MAC layer data header address. Destination address and receiving address in the domain; or, a second address generating submodule, configured to use the first index identifier of the sending device as a MAC layer data header when the source device of the data to be transmitted and the sending device are the same, and the destination device and the receiving device are different. The first address identifier of the receiving device and the MAC address of the destination device are respectively used as the receiving address and the destination address in the MAC layer data header address field; or
  • a third address generation submodule configured to: when the source device of the data to be transmitted is different from the sending device, and the destination device and the receiving device are the same, respectively, the first index identifier of the sending device and the source
  • the MAC address of the device is used as the sending address and the source address in the MAC layer data header address field
  • the first index identifier of the receiving device is used as the destination address and the receiving address in the MAC layer data header address field.
  • a second identifier obtaining module configured to acquire, when the sending device and the receiving device are located in different wireless subnets, a wireless access point identifier of the sending device and a wireless access point identifier of the receiving device,
  • a second address generating module configured to use a wireless access point identifier of the sending device and a wireless access point identifier of the receiving device as a sending address and a receiving address in a MAC layer data header address field; And performing header encapsulation according to the address obtained by the second address generation module to form the MAC layer data header.
  • the method further includes:
  • a header information determining module configured to determine header information of a network layer header of the data to be transmitted
  • a transmission information determining module configured to determine, according to a data header compression rule, information to be transmitted in the header information
  • a first data transmission module configured to encapsulate the network layer data header according to the to-be-transmitted information, and add the data header to the to-be-transmitted data header, and then transmit the data to the logical link control layer;
  • a second data transmission module configured to add the link layer data header of the to-be-transmitted data received by the logical link control layer to the MAC layer.
  • the transmission information determining module is specifically configured to: use, as the to-be-transmitted, the information in the header information that does not include a change in the communication connection process, which is learned by the logical link control layer, or is predictable. Information.
  • a data header decapsulation apparatus including:
  • a decapsulation module configured to acquire a MAC layer to receive data, and decapsulate a data header of the MAC layer to receive data
  • a first header information acquiring module configured to: when the MAC layer receives data, the sending device and the receiving device are located in the same wireless a first index identifier of the sending device in the address domain and a first index identifier of the receiving device, where the first index identifier byte number is smaller than the MAC address byte number; the first address determining module, And determining, according to the correspondence between each first index identifier and a MAC address of each device, a MAC address of the sending device and the receiving device.
  • a data header encapsulating apparatus including:
  • a device determining module configured to determine a communication associated device of a MAC layer to be transmitted, where the communication associated device includes a sending device and a receiving device;
  • a third identifier obtaining module configured to determine, when the sending device or the receiving device is a wireless access point device, a second index identifier of the sending device or a second index identifier of the receiving device, where the sending The device and the receiving device respectively have a unique second index identifier, where the second index identifier byte number is smaller than the MAC address byte number; or, when the sending device and the receiving device are wireless access point devices, Determining a second index identifier of the sending device and a second index identifier of the receiving device;
  • a third address generating module configured to use a second index identifier of the sending device and/or a second index identifier of the receiving device as a corresponding address in a MAC layer data header address field;
  • the third header encapsulating module is configured to perform header encapsulation according to the address obtained by the third address generating module to form the MAC layer data header.
  • the second index identifier is a wireless access point identifier of the index wireless access point device, and the wireless access point devices located in different distributed systems are respectively unique Wireless access point identification.
  • the device is applied to a sending device,
  • the sending device is a site device
  • the device further includes:
  • a first detecting module configured to detect that the wireless access point identifier of the associated wireless access point device is the same as the wireless access point identifier included in the received broadcast information, and the basic service set identifier of the associated wireless access point device When the BSSID or the service set identifier SSID is different from the BSSID or SSID included in the received broadcast information, the address conflict information is sent to the associated wireless access point device; or
  • the device When the sending device is a wireless access point device, the device further includes:
  • a second detecting module configured to detect that the received broadcast information includes a wireless access point identifier that is the same as the wireless access point identifier of the sending device, or resets the wireless when receiving an address conflict message sent by the associated site device Access point identification.
  • a data header decapsulation apparatus including:
  • a data acquiring module configured to acquire MAC layer receiving data, and decapsulate the MAC layer to receive data
  • a second header information obtaining module configured to: when the sending device or the receiving device that receives the data by the MAC layer is a wireless access point device, acquire a second index identifier of the sending device in the address domain or the receiving device a second index identifier, where the number of bytes of the second index identifier is less than the number of bytes of the MAC address; or, when the sending device and the receiving device that receive data by the MAC layer are wireless access point devices, obtain the data header address a second index identifier of the sending device in the domain and a second index identifier of the receiving device;
  • the second address determining module is configured to determine a MAC address of the sending device and/or the receiving device according to a correspondence between each second index identifier and a MAC address of each device.
  • a data header encapsulating device including at least a memory and a processor, where the memory is used to store a set of first data header encapsulation programs;
  • the processor is configured to invoke the set of first data header encapsulation programs stored in the memory, and perform the following operations;
  • a communication associated device of the MAC layer Determining, by the media access control, a communication associated device of the MAC layer to transmit data, the communication associated device comprising a transmitting device and a receiving device;
  • the first index identifier of the sending device and the first index identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field, and header encapsulation is performed according to the corresponding address to form the MAC layer data header.
  • a data header decapsulation apparatus including at least a memory and a processor, where the memory is used to store a set of first data header decapsulation programs;
  • the processor is configured to invoke the set of first data header decapsulation programs stored in the memory, and perform the following operations:
  • a data header encapsulating device characterized in that it comprises at least a memory and a processor
  • the memory is configured to store a set of second data header encapsulation programs
  • the processor is configured to invoke all the second data header encapsulation programs stored in the memory, and perform the following operations:
  • the sending device or the receiving device is a wireless access point device, determining a second index identifier of the sending device or a second index identifier of the receiving device, where the sending device and the receiving device respectively have a unique second index identifier, where the number of bytes of the second index identifier is less than the number of bytes of the MAC address;
  • the sending device and the receiving device are wireless access point devices, determining a second index identifier of the sending device and a second index identifier of the receiving device;
  • the second index identifier of the sending device and the second index identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field, and header encapsulation is performed according to the corresponding address to form the MAC layer data header.
  • a data header decapsulation apparatus including at least a memory and a processor, where the memory is used to store a set of second data header decapsulation programs;
  • the processor is configured to invoke a set of the second data header decapsulation programs stored in the memory, and perform the following operations:
  • the present application provides a data header encapsulation method, a decapsulation method, a device, and a device, and the data to be transmitted in a MAC (Media Access Control) layer is compared with the prior art.
  • the first index identifier or the second index identifier of each of the sending device and the receiving device is obtained as an address carried by the MAC layer data header address field. Since the number of bytes of the first index identifier or the second index identifier is smaller than the MAC address of the device, the number of bytes occupied by the MAC layer data header is reduced, and the header overhead is reduced, thereby reducing power consumption.
  • FIG. 1 is a flowchart of an embodiment of a data header encapsulation method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of a wireless local area network system according to an embodiment of the present disclosure
  • FIG. 2 is a flow chart of another embodiment of a data header encapsulation method according to an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a method for encapsulating a network layer data header in a data header encapsulation method according to an embodiment of the present application
  • FIG. 4 is a flow chart of an embodiment of a data header decapsulation method according to an embodiment of the present application.
  • FIG. 5 is a flow chart of still another embodiment of a data header encapsulation method according to an embodiment of the present disclosure
  • FIG. 6 is a flow chart of another embodiment of a data header decapsulation method according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an embodiment of a data header encapsulating apparatus according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of still another embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of an embodiment of a data header encapsulating device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of still another embodiment of a data header decapsulation apparatus according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of an embodiment of a data header decapsulation apparatus according to an embodiment of the present disclosure Schematic diagram
  • FIG. 13 is a schematic structural diagram of still another embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of another embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic structural diagram of another embodiment of a data header decapsulation apparatus according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic structural diagram of another embodiment of a data header decapsulation apparatus according to an embodiment of the present disclosure.
  • the technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without the creative work are all within the scope of the present application.
  • FIG. 1 is a flowchart of an embodiment of a data header encapsulation method according to an embodiment of the present application, where the method may include the following steps:
  • Step 101 Determine a media association control device associated with the MAC layer to transmit data.
  • the communication associated device includes a sending device and a receiving device.
  • the communication associated device is a device corresponding to the address in the MAC layer data header address field, that is, the device is to be The device involved in the transmission of data during the data transmission process.
  • the technical solution of the present application is mainly applicable to a WLAN (Wireless Local Area Networks).
  • the address carried by the MAC layer header address field mainly includes four address elements of the MAC layer to be transmitted data: source address, destination address, sending address, and receiving address.
  • the source address is the source device address, which is the address of the device that originally sent the data to be transmitted;
  • the destination address is the destination device address, which is the address of the device that finally receives the data to be transmitted;
  • the sending address is the sending device address, which is the current actual transmission to be transmitted.
  • the address of the device of the data where the sending device may be the source device or the forwarding device during data transmission;
  • the receiving address is the receiving device address, which is the address of the device that actually receives the data to be transmitted, and the receiving device may be the destination device. It may also be a forwarding device for data transmission.
  • the MAC layer data header address field usually includes four address fields, which can be used to carry different addresses, respectively.
  • address fields which can be used to carry different addresses, respectively.
  • the WLAN mainly includes a wireless access point device, that is, an Access Point, which is hereinafter referred to as an AP, and a site device, that is, a Station, which is hereinafter referred to as STA.
  • FIG. 1a is a schematic structural diagram of a wireless local area network system. As shown in FIG. 1a, an AP device can associate multiple STA devices to form a wireless subnet, and multiple AP devices form a wireless subnet, that is, a distributed system, a distributed system. Internet access is available.
  • the STA devices in the same wireless subnet can communicate directly, or through the AP device to communicate with devices in other wireless subnets or wireless LANs. Therefore, both the AP device and the STA device may act as a transmitting device or a receiving device.
  • the data communication mode mainly has the following situations:
  • Ad-Hoc peer-to-peer
  • Different STA devices in the same wireless subnet can communicate directly without forwarding devices.
  • the sending device is the source device
  • the receiving device is the destination device.
  • the sending address is the same as the source address
  • the receiving address is the same as the destination address.
  • the MAC layer data 4 header address field may use two address segments to respectively carry the addresses of the two STA devices to represent four address elements.
  • the address field can also carry the subnet identifier of the wireless subnet where the two STA devices are located, that is, the BSSID (Basic Service Set ID), which is used to distinguish different wireless subnets.
  • BSSID Basic Service Set ID
  • the address field requires up to three address segments to carry the address, and the fourth address segment is empty.
  • the STA device between the two wireless subnets needs to communicate with the AP devices of the two wireless subnets. That is, for example, when the STA1 device in the first wireless subnet sends data to the STA2 device of the second wireless subnet, the data needs to be first sent by the STA1 device to the API device of the first wireless subnet, and then sent to the second by the API.
  • the AP2 device of the wireless subnet is sent by the AP2 device to the STA2 device.
  • data transmission mainly includes the following processes:
  • the data is sent by the STA1 device to the API device.
  • the sending address is the address of the STA1 device
  • the receiving address is the address of the API device
  • the source address is the same as the sending address
  • the destination address is the address of the STA2 device.
  • MAC layer data header address field The address of the three devices can be carried by three address segments to represent four address elements, and the fourth address segment is empty.
  • the data is sent by the API device to the AP2 device.
  • the API device and the AP2 device act as a bridge to transmit data on the wireless bridge.
  • the sending address is the address of the API device
  • the receiving address is the address of the AP2 device
  • the source address is the address of the STA1 device
  • the destination address is the STA2 device.
  • the MAC layer data header address field uses four address segments to carry the addresses of the four devices to represent four address elements.
  • the data is sent by the AP2 device to the STA2 device.
  • the sending address is the AP2 device address.
  • the receiving address is the STA2 device address
  • the source address is the STA1 device address
  • the destination address is the same as the receiving address.
  • the MAC layer data header address field can use three address segments to respectively carry the addresses of the three devices to represent four address elements, the fourth place. The address segment is empty.
  • the data to be transmitted in the MAC layer has directivity.
  • a frame control field is included in the MAC layer data header to indicate a data transmission direction, and the frame control field includes two DS (distribution system) fields "To Ds" and "From Ds". To DS indicates that the data is sent by the STA device to the AP device, and From DS indicates that the data is sent by the AP device to the STA device.
  • the two DS domain field values of the frame control domain may have the following conditions:
  • From DS 0: indicates that the data is sent by the STA1 device to the API device.
  • the send address and source address are the same at this time.
  • the technical solution of the present application is specifically applied to a transmitting device that transmits the data to be transmitted.
  • the communication associated device is first determined, and at least includes a transmitting device and a receiving device.
  • Step 102 Determine, when the sending device and the receiving device are located in the same wireless subnet, a first index identifier of the sending device and a first index identifier of the receiving device.
  • the sending device and the receiving device respectively have a unique first index identifier, and the number of the first index identifier bytes is smaller than the number of MAC address bytes.
  • the address in the MAC layer data header address field is usually represented by the MAC address of the device.
  • the MAC address is 6 bytes, a 48-bit physical address, and is globally unique.
  • the four address fields of the address field will occupy up to 24 bytes, and the header overhead is large.
  • the transmitting device and the receiving device of the data to be transmitted are located in the same wireless subnet, the first index identifier of each of the transmitting device and the receiving device is obtained.
  • Each device located on the same wireless subnet has a unique first index identifier, which may be pre-set for each device.
  • the first index identifier is preset and allocated by the sending device and the AP device of the wireless subnet where the receiving device is located.
  • the transmitting device and the receiving device may be an AP device or a STA device.
  • the AP device is responsible for managing the STA device.
  • the STA device needs to be associated with the same AP device, that is, the AP device is connected to the AP device. Therefore, in this embodiment, the AP device in the wireless subnet can set different first index identifiers in advance, and assign the first index identifier to the STA device that is associated with the wireless subnet, and the first identifier, and save the first identifier. Allocation Table.
  • the number of bytes in the first index identifier is smaller than the number of bytes in the MAC address. According to the actual application, combined with the number of possible devices in a wireless subnet, the first index identifier of 2 bytes and 16 bits can be used to distinguish different devices. .
  • the transmitting device and the receiving device are located on the same wireless subnet, they have a unique first index.
  • the sending device and the receiving device may be an AP device or a STA device
  • different first index identifiers may be set according to different device types.
  • the first index identifier may be a STA identifier of a device for indexing a device of the STA type or an AP identifier of a device whose index device type is an AP.
  • the STA identifier is that the AP device is preset and allocated for each STA device in the same wireless subnet; the AP identifier is preset for each AP device in different distributed systems.
  • Site devices located in the same wireless subnet each have a unique site identity; wireless access point devices located in different distributed systems each have a unique wireless access point identity.
  • the AP device in the wireless subnet can preset different STA identifiers and join the wireless device.
  • the subnet the STA device associated with it, allocates a STA index.
  • the 48-bit MAC address is not required for identification, and the identifier with a small number of bits can be used. Therefore, a unique AP identifier can be set in advance for each AP device of a different distributed system.
  • the AP identifier may include: distributed system index information and AP index information, which may further include unicast indication index information.
  • the distributed system index information in the AP identifier of the AP device in the same distributed system is the same.
  • the distributed system index information can be divided into different distributed systems by using a 6-bit bit string, and the AP index information can be used to distinguish different APs in the same distributed system by using a 9-bit bit string.
  • the unicast indication index information is used to indicate the data transmission mode, and can be represented by a 1-bit bit string. When the value is 1, it indicates that the current unicast transmission mode is used.
  • the technical solution of the present application is mainly applicable to the unicast transmission mode. The distinction can be achieved by using 2-byte, 16-bit identification symbols.
  • the number of STA identifiers and AP identifier bytes can be different, but they are all smaller than the number of MAC address bytes.
  • the first index identifier of the sending device is an STA identifier, where STA devices located in the same wireless subnet respectively have unique site identifiers; or, when the sending device is an AP device
  • the first index identifier of the sending device is an AP identifier, where the AP devices located in different distributed systems respectively have a unique AP identifier; or
  • the first index identifier of the receiving device is a STA identifier
  • the first index identifier of the receiving device is an AP identifier.
  • Step 103 The first index identifier of the sending device and the first index identifier of the receiving device are used as corresponding addresses in a MAC layer data header address field, and header encapsulation is performed according to the corresponding address to form the MAC layer. Data header.
  • the obtained first index identifier of the sending device and the first index identifier of the receiving device are unique, so the MAC address can be replaced as the index address of the transmitting device and the receiving device.
  • the first index identifier of the sending device and the first index identifier of the receiving device may be corresponding addresses corresponding to the MAC layer data address field, including at least a sending address and a receiving address.
  • the source address and the destination address can be determined.
  • the MAC address of the device can still be used. Otherwise, other implementation manners may be used. In the following embodiments, Will be introduced in detail.
  • the data header encapsulated according to the address determined by the first index identifier is assumed to be represented by 2 bytes. At this time, at least the sending address and the receiving address in the address domain bearer address may be represented by 2 bytes, then With a 6-byte MAC address, the MAC layer data header can save at least 8 bytes of space, greatly reducing header overhead. .
  • the sending device and the receiving device of the MAC layer to be transmitted are determined, and the first index identifier of the sending device and the first index identifier of the receiving device are obtained, as the corresponding address in the MAC layer header address field.
  • the corresponding address is encapsulated into the MAC layer data header. Since the first index identifier replaces the MAC address of the device, the number of occupied bytes of the address is reduced, and the header overhead is reduced, thereby reducing power consumption.
  • the format of the MAC layer data header is as shown in Table 1, which mainly includes an address field, a frame control domain, a quality of service control, and a duration identifier ID.
  • This application mainly describes the determination of the address carried by the address domain.
  • Other domain information in the MAC layer data header except the address field may be determined according to the prior art, which is not limited in this application.
  • the frame control field includes two DS fields, "To Ds" and “From Ds”, which respectively take a value of 0 or 1 to indicate the data transmission direction.
  • the address field mainly includes four address fields for carrying different addresses. For example, address 1 carries the receiving address, and address 2 7
  • the source device and the sending device may be the same, the destination device and the receiving device may be the same, such that the source address and the sending address are the same, and the destination address and the receiving address are the same.
  • the source address and the sending address may be represented by the same address, the destination address and the receiving address. Can be represented by the same address and carried in the same address segment.
  • the first index identifier of the sending device and the first index identifier of the receiving device, as the corresponding address in the MAC layer data header address field, may include the following happening:
  • the first index identifier of the sending device is used as the sending address and the source address in the MAC layer data header address field. Determining, by using the first index identifier of the receiving device, a destination address and a receiving address in a MAC layer data header address field; or
  • the first index identifier of the sending device is used as a sending address and a source address in a MAC layer data header address field.
  • the first index identifier of the receiving device and the MAC address of the destination device are respectively used as a receiving address and a destination address in a MAC layer data address field; or, when the source device of the data to be transmitted and When the sending device is different, the destination device, and the receiving device are the same, respectively, the first index identifier of the sending device and the MAC address of the source device are respectively used as a sending address and a source address in a MAC layer data header address field, The first index identifier of the receiving device is used as a destination address and a receiving address in a MAC layer data header address field.
  • the frame control domain, the QoS control domain, and the duration identifier respectively occupy 2 bytes, and when the address domain includes four address fields, the MAC address needs to occupy 6 bytes, and the MAC address is required to occupy the most overhead. 32 bytes.
  • the first index identifier may be represented by 2 bytes
  • the data header encapsulated in the address field in the embodiment of the present application is at least The sending address and the receiving address can be expressed in 2 bytes.
  • the MAC layer data header can save at least 8 bytes of space, which greatly reduces the header overhead.
  • the address domain needs three address segments.
  • the fourth address segment can be omitted. This saves 12 bytes of space.
  • To Ds" and “From Ds” are "00"
  • the transmitting device is the source device
  • the receiving device is the destination device
  • the address field is Only two address segments are required.
  • the MAC layer data header can save up to 20 bytes, as shown in Table 2 below.
  • FIG. 2 is a flowchart of another embodiment of a data header encapsulation method according to an embodiment of the present application, and the method may include the following steps:
  • Step 201 Determine a medium associated with the communication access control device of the MAC layer to be transmitted.
  • the communication associated device includes a sending device and a receiving device
  • Step 202 Determine whether the sending device and the receiving device are located in the same wireless subnet. If yes, go to step 203. If no, go to step 204.
  • Step 203 Determine a first index identifier of the sending device and a first index identifier of the receiving device.
  • the sending device may be a STA device or an AP device
  • the receiving device may be a STA device or an AP device.
  • the sending device is a STA device
  • the first index identifier of the sending device is a STA identifier
  • the first index identifier of the sending device is an AP identifier
  • the first index identifier of the receiving device is a STA identifier
  • the first index identifier of the receiving device is an AP identifier.
  • Each STA device in the same wireless subnet has a unique STA identifier.
  • AP devices located in different distributed systems have unique AP identities.
  • the STA identifier is that the AP device is preset and allocated for each STA device in the same wireless subnet; the AP identifier is preset for each AP device in different distributed systems.
  • Step 204 The STA identifier or the AP identifier of the sending device, and the STA identifier or the AP identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field, and the header encapsulation is performed according to the corresponding address.
  • the MAC layer data header is used as corresponding addresses in the MAC layer data header address field, and the header encapsulation is performed according to the corresponding address.
  • At least the sending address and the connection in the MAC layer data header address field may be determined.
  • the STA identifier or the AP identifier of the sending device is used as the sending address and the source address in the MAC layer data header address field.
  • the sending address and the source address can occupy the address.
  • the STA identifier or the AP identifier of the receiving device is used as the receiving address and the destination address in the MAC layer data header address field.
  • the receiving address and the destination address may occupy an address field in the address field.
  • the STA identifier or AP identifier of the receiving device is carried.
  • the source device's MAC address can be used as the source address in the MAC layer data header address field, occupying an address field and carrying the source device's MAC address.
  • the MAC address of the destination device can be used as the destination address in the MAC layer data header address field, occupying a field and carrying the MAC address of the destination device.
  • Step 205 Obtain an AP identifier of the sending device and an AP identifier of the receiving device.
  • the MAC layer data header is used as a sending address and a receiving address in a MAC layer data header address field, and are encapsulated according to the sending address and the receiving address to form a header encapsulation.
  • both the sending device and the receiving device are AP devices.
  • AP devices in different distributed systems can be distinguished by the AP identifier. Therefore, the AP identifier of the sending device and the AP identifier of the receiving device can be used as the sending address and receiving address in the MAC layer data header address field instead of the MAC address as the index address, which can save the byte space occupied by the address field.
  • the source device and the destination device can respectively use the MAC address as the source address and destination address in the address domain.
  • the MAC layer data header address field needs four address segments respectively. The index address of the transmitting device, the receiving device, the source device, and the destination device.
  • both address segments of the address field of the MAC layer data header are 2 bytes.
  • Third address segment If the fourth address segment is omitted, 20 bytes can be saved.
  • the third address segment carries the wireless subnet identifier of the wireless subnet where the sending device and the receiving device are located.
  • the wireless subnet identifier is the address of the AP device. Therefore, the AP identifier can be used as the wireless address instead of the MAC address in this embodiment.
  • Subnet ID in which case the address field can save up to 18 bytes.
  • both the sending address and the receiving address in the address field of the MAC layer data header are 2 bytes, the source address is 6 bytes, and the fourth address segment is omitted, which saves 14 bytes.
  • both the sending address and the receiving address in the address field of the MAC layer data header are 2 bytes, the destination address is 6 bytes, and the fourth address segment is omitted, which saves 14 bytes.
  • both the send address and the receive address in the address field of the MAC layer data header are 2 bytes, and the destination address and source address are 6 bytes, which can save 8 bytes.
  • the address that is required to be carried in the MAC layer data header address field is determined according to whether the sending device and the receiving device are located in the same wireless subnet, and the sending device and the receiving device.
  • the address carried in the data header address field because the number of bytes in the first index identifier is smaller than the number of bytes in the MAC address, the space occupied by the MAC layer data header address field is reduced, so that the MAC layer data header overhead is reduced, thereby finally forming the wireless local area network data.
  • the header overhead of the header is reduced, which helps to reduce power consumption.
  • the foregoing embodiment of the data header encapsulation method shown in FIG. 1 and FIG. 2 mainly describes the encapsulation of the MAC layer data header, which is applied to a transmitting device in a WLAN, and the sending device may be a STA device or an AP device.
  • the network layered data headers of the transmitting device and the receiving device for transmitting data are sequentially encapsulated and generated from the upper layer to the lower layer of the network layer, so the data to be transmitted of the MAC layer is the received data from the logical link control layer, when the wireless When the local area network is connected to the Internet, the data of the logical link control layer is the received data from the network layer.
  • the data header of the corresponding network layer is added. Therefore, in the present application, before determining the data to be transmitted of the media access control MAC layer, as shown in FIG. 3, the following steps may also be included:
  • Step 301 Determine header information of a network layer header of the to-be-transmitted data.
  • the WLAN accesses the Internet, from top to bottom.
  • the network architecture includes an application layer, a transport layer, a network layer, a logical link control layer, a MAC layer, and a physical layer.
  • the data to be transmitted at the network layer is the received data from the transport layer.
  • the data to be transmitted at the network layer needs to be added to the logical link control layer after adding the network layer header, and the logical link control layer adds the link layer data header to the MAC layer.
  • HLIM Hop Limit hop limit
  • SAM Source Address Mode source address mode
  • DAM Destination Address Mode destination address mode
  • Step 302 Determine, according to a data header compression rule, information to be transmitted in the header information.
  • the header compression rules specify what information can be transmitted in the network layer header and which information can be omitted.
  • the header compression rule can include:
  • the information to be transmitted determined in step 302 is information including changes in the communication connection process in the header information, information that cannot be learned by the logical link control layer, or a message that cannot be predicted.
  • the source IP address and the destination IP address in the network layer can be represented by a local link address, which is represented by a prefix and an interface identifier.
  • the prefixes are the same; interface identifiers can be used to distinguish the IP addresses of different devices.
  • IPv6 address Take the IP address as the IPv6 address as an example:
  • IPv6 local link address FE80::/64 (interface identifier).
  • the interface identifier is 64 bits, so the interface identifier can be determined to determine the Ipv6 address.
  • A It is formed by the 64-bit extended MAC address of the 802.15.4 standard.
  • the short address refers to the first index identifier of the device determined by the MAC layer.
  • the short address refers to the first index identifier of the source device.
  • the short address refers to the first index identifier of the destination device. A description of the first index identification can be found in the above embodiment.
  • the source address and the destination address in the network layer header information can be learned according to the address generation manner. Therefore, the information to be transmitted may not include the address information.
  • the IP address is an IPv6 address
  • the network layer header may be at least compressed. It is 2 bytes, saving 38 bytes of space and greatly reducing header overhead.
  • Step 303 Encapsulate the network layer data header according to the to-be-transmitted information, and add to the data to-be-transmitted header before transmitting to the logical link control layer.
  • Step 304 Add the link layer data header received by the logical link control layer to the MAC layer.
  • the MAC layer receives the data to be transmitted of the logical link control layer to generate header information of the MAC layer according to the method described in the above embodiments.
  • the embodiment of the present application further provides a flowchart of an embodiment of a data header decapsulation method.
  • the receiving device can acquire the MAC address of the communication-related device corresponding to the data.
  • the method can include the following steps:
  • Step 401 Acquire a MAC layer to receive data, and decapsulate a data header of the MAC layer to receive data.
  • Step 402 The first index identifier of the sending device in the address domain and the first index identifier of the receiving device are obtained when the sending device that receives the data in the MAC layer and the receiving device are located in the same wireless subnet.
  • the first index identifier byte number is smaller than the MAC address byte number.
  • the first index identifier of the sending device is also the sending address carried by the address domain
  • the first index identifier of the receiving device is the receiving address carried by the address domain.
  • the sending address and the receiving address carried by the address domain can be determined first, and the sending address is the first index identifier of the sending device, and the receiving address is the first index identifier of the receiving device.
  • Step 403 Determine a MAC address of the sending device and the receiving device according to the correspondence between each first index identifier and a MAC address of each device.
  • the transmitting device can store and manage a one-to-one correspondence between the respective first index identifiers and the MAC addresses of the respective devices.
  • the correspondence between the first index identifier and the MAC address of each device may be carried.
  • the correspondence can also be sent separately.
  • the MAC addresses of the sending device and the receiving device can be obtained.
  • the MAC address of the source device and the MAC address of the destination device are obtained.
  • the receiving device determines the MAC address of the device, and then performs subsequent data transmission according to the MAC address.
  • FIG. 5 is a flowchart of still another embodiment of a data header encapsulation method according to an embodiment of the present application, where the method may include the following steps:
  • Step 501 Determine a communication associated device of a MAC layer to be transmitted data, where the communication associated device includes a sending device and a receiving device.
  • Step 502 When the sending device and/or the receiving device are AP devices, obtain a second index identifier of the sending device and/or a second index identifier of the receiving device. At least one of the sending device and the receiving device may be an AP device or an AP device at the same time. Therefore, step 502 is to determine, when the sending device or the receiving device is an AP device, a second index identifier of the sending device or a second index identifier of the receiving device, the sending device and the receiving The devices respectively have a unique second index identifier, and the number of the second index identifier bytes is smaller than the number of MAC address bytes; or
  • the transmitting device and the receiving device respectively have a unique second index identifier, and the second index identifier byte number is smaller than the MAC address byte number.
  • Step 503 The second index identifier of the sending device and/or the second index identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field, and the header encapsulation is performed according to the corresponding address to form the MAC layer. Data header.
  • the second index identifier of the sending device or the second index identifier of the receiving device is used as a corresponding address in a MAC layer data header address field, and according to The corresponding address is encapsulated by the header to form the MAC layer data header; or, when the sending device and the receiving device are AP devices, the second index identifier of the sending device and the second identifier of the receiving device are The index identifier is used as a corresponding address in the MAC layer data header address field, and is encapsulated according to the corresponding address to form the MAC layer data header.
  • the second index identifier of the AP device may be substituted for the MAC address, as the index address of the sending device and/or the receiving device, and the bearer and the MAC layer data header address.
  • the domain is used as the sending address and receiving address respectively.
  • Different AP devices in the same distributed system or in different distributed systems respectively have a unique second index identifier, so that the transmitting device and/or the receiving device respectively have a unique second index identifier.
  • the second index identifier may be specifically configured by using the AP identifiers in the foregoing embodiments, and is preset for each AP device in different distributed systems.
  • the AP identity may include distributed system index information, AP index information, and unicast indication index information.
  • the distributed system index information in the AP identifier of the AP device in the same distributed system is the same.
  • MAC address Since the number of APs in a distributed system is also limited, a 48-bit MAC address is not required for identification, and a small number of bits can be used for identification. So it can be pre-defined for different distributed systems Each AP device of the system sets a unique AP identifier.
  • the distributed system index information can be divided into different distributed systems by using a 6-bit bit string, and the AP index information can be used to distinguish different APs in the same distributed system by using a 9-bit bit string.
  • the unicast indication index information is used to indicate the data transmission mode, and can be represented by a 1-bit bit string. When the value is 1, it indicates that the current unicast transmission mode is used.
  • the technical solution of the present application is mainly applicable to the unicast transmission mode. The distinction can be achieved by using 2-byte, 16-bit identification symbols.
  • the address to be carried in the MAC layer data header address field may be separately obtained according to whether the sending device and/or the receiving device of the data to be transmitted are AP devices.
  • the second index identifier of the sending device and/or the second index identifier of the receiving device may be used to replace the MAC address with the second index identifier as the corresponding address carried by the MAC layer data header address field, that is, the sending address and the receiving address.
  • the space occupied by the MAC layer data header address field is reduced, so that the MAC layer data header overhead is reduced, and thus the header overhead of the finally formed WLAN data header is reduced. Conducive to reducing power consumption.
  • the sending device and/or the receiving device may also send when the same wireless subnet is located.
  • the STA device in the device and/or the receiving device uses the STA identifier instead of its MAC address as the corresponding address in the MAC layer data header address field, thereby further reducing the header overhead.
  • the AP device periodically broadcasts a beacon frame to notify the presence of the AP.
  • the STA device obtains a beacon frame by scanning to know the existence of the AP device to determine whether it is associated with it.
  • the beacon frame includes a wireless subnet identifier, that is, a BSSID or an SSID (Service Set Identifier).
  • the AP device is preset with a second index identifier.
  • the AP device can broadcast its second index identifier through the beacon frame to notify the STA device and other AP devices.
  • the AP device that can be allocated is limited, so After the second index identifier is set for the AP device, it is also detected whether the second index identifier is available. specific:
  • the sending device of the data to be transmitted is a STA device:
  • the AP identifier of the associated AP device is detected to be the same as the AP identifier included in the received broadcast information, and the associated AP device's cornerstone out service set identifier BSSID or service set identifier SSID and the received BSSID or SSID included in the broadcast information are detected. At the same time, the address conflict information is sent to the associated AP device.
  • the sending device is the STA device
  • the second index of the AP and the BSSID or the SSID are obtained, and the STA device can also scan and obtain the second index identifier of the device and the BSSID or SSID of the other AP. If the second index of the AP device is the same as the device ID of the associated AP, and the BSSID or the SSID is different, the APs that are scanned are not the same as the APs. If the second index identifier setting conflicts, the address conflict information is fed back to the associated AP.
  • the sending device of the data to be transmitted is an AP device:
  • the AP identifier of the received broadcast information is the same as the AP identifier of the sending device, or the address conflict message sent by the associated STA device is received, indicating that the address conflicts, the AP identifier is reset.
  • the operation of the address detection can be performed in real time or periodically to ensure the correctness of data transmission.
  • the data header encapsulation method described in the embodiment shown in FIG. 5 is mainly the encapsulation of the data header of the MAC layer. Since the data needs to be layered through each network when it is sent, the data header of the corresponding network layer is added. Therefore, in the present application, before determining the data to be transmitted of the medium access control MAC layer, the encapsulation of the network layer data header of the embodiment shown in FIG. 3 may also be included.
  • the receiving device may decapsulate the address in the MAC layer data header address field from the received data, because the MAC layer data header address field The address in the address is at least partially the second index identifier. Therefore, referring to FIG. 6, the embodiment of the present application further provides a flowchart of another embodiment of the data header decapsulation method, so that the receiving device can acquire the data corresponding to the communication associated device. MAC address.
  • the method can include the following steps:
  • Step 601 Acquire a MAC layer to receive data, and decapsulate a data header of the MAC layer to receive data.
  • Step 602 When the MAC layer receives the data sending device and/or the receiving device is an AP device, obtain a second index identifier of the sending device in the address domain and/or a second index identifier of the receiving device.
  • At least one of the sending device and the receiving device may be an AP device or an AP device at the same time.
  • the step 602 is to determine, when the sending device or the receiving device is an AP device, a second index identifier of the sending device or a second index identifier of the receiving device, or
  • the transmitting device and the receiving device respectively have a unique second index identifier, and the second index identifier byte number is smaller than the MAC address byte number.
  • the second index identifier of the sending device is the sending address carried by the address domain
  • the second index identifier of the receiving device is the receiving address in the bearer address of the address domain.
  • the sending address and the receiving address carried by the address domain can be determined first, and the sending address is the second index identifier of the sending device, and the receiving address is the second index identifier of the receiving device.
  • Step 603 Determine a MAC address of the sending device and/or the receiving device according to a correspondence between each second index identifier and a MAC address of each device.
  • the sending device can store and manage a one-to-one correspondence between different second index identifiers and MAC addresses of different devices.
  • the correspondence between the respective second index identifiers and the MAC addresses of the respective devices may be carried.
  • the correspondence can also be sent separately.
  • the MAC address of the sending device and/or the receiving device can be obtained according to the correspondence between the respective second index identifiers and the MAC addresses of the respective devices.
  • the sending device or the receiving device is an AP device, that is, determining a MAC address of the sending device or the receiving device according to a correspondence between each second index identifier and a MAC address of each device;
  • the sending device and the receiving device are AP devices, that is, according to each second index identifier
  • the MAC address of the sending device and/or the receiving device is determined corresponding to the MAC address of each device.
  • the receiving device determines the MAC address of the different device, and then performs subsequent data transmission according to the MAC address of the different device.
  • FIG. 7 is a schematic structural diagram of an embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure, where the apparatus may include:
  • the device determining module 701 is configured to determine, by the media access control MAC layer, a communication related device that is to transmit data, where the communication associated device includes a sending device and a receiving device.
  • the first identifier obtaining module 702 is configured to determine, when the sending device and the receiving device are located in the same wireless subnet, a first index identifier of the sending device and a first index identifier of the receiving device.
  • the sending device and the receiving device have a unique first index identifier, and the number of the first index identifier bytes is smaller than the number of MAC address bytes.
  • both the transmitting device and the receiving device are in the same wireless subnet, and the number of devices in the same wireless subnet is limited, and it is not necessary to use a 48-bit MAC address for identification. It can be identified by using an index of fewer bits. For example, when there are 8 devices, the distinction between 8 devices can be achieved by using a bit string of at least 3 bits.
  • the transmitting device and the receiving device of the data to be transmitted are located in the same wireless subnet, the first index identifier of each of the transmitting device and the receiving device is obtained.
  • the first index identifier is preset and allocated by the sending device and the AP device of the wireless subnet where the receiving device is located.
  • Different devices in the same wireless subnet include STA devices and AP devices. Therefore, the AP device can pre-equalize and assign different first index identifiers to itself and its associated STA device.
  • the first index identifier may be used to index a device type.
  • Each AP device in the system is preset.
  • the AP identity may include distributed system index information and AP index information, which may also include unicast indication index information.
  • the sending device is a STA device
  • the first index identifier of the sending device is a STA identifier
  • the first index identifier of the sending device is an AP identifier
  • the first index identifier of the receiving device is a STA identifier
  • the first index identifier of the receiving device is an AP identifier.
  • Each STA device in the same wireless subnet has a unique STA identifier.
  • AP devices located in different distributed systems have unique AP identities.
  • the first address generating module 703 is configured to use the first index identifier of the sending device and the first index identifier of the receiving device as a corresponding address in a MAC layer data header address field.
  • the MAC address can be replaced, and at least the sending address and the receiving address carried by the MAC layer data header address field can be used.
  • the first address generating module 703 may include: a first address generating submodule 7031, when the source device of the data to be transmitted and the sending device are the same, the destination device, and the receiving When the device is the same, the first index identifier of the sending device is used as the sending address and the source address in the MAC layer data header address field, and the first index identifier of the receiving device is used as the destination address in the MAC layer data header address field. And receiving address;
  • the second address generation sub-module 7032 is configured to use the first index identifier of the sending device as the MAC layer data when the source device of the data to be transmitted and the sending device are the same, and the destination device and the receiving device are different. a sending address and a source address in the header address field, a first index identifier of the receiving device, and a MAC address of the destination device, respectively, as a receiving address and a destination address in a MAC layer data header address field; a third address generation sub-module 7033, configured to: when the source device of the data to be transmitted is different from the sending device, and the destination device and the receiving device are the same, respectively, the first index identifier of the sending device and the The MAC address of the source device is used as the sending address and the source address in the MAC layer data address field, and the first index identifier of the receiving device is used as the destination address and the receiving address in the MAC layer data header address field.
  • the first header encapsulating module 704 is configured to perform header encapsulation according to an address obtained by the first address generating module to form the MAC layer data header.
  • the first index identifier of the sending device and the first index identifier of the receiving device are obtained by determining the sending device and the receiving device of the MAC layer to be transmitted, as the corresponding address in the MAC layer header address field.
  • the packet is encapsulated into the MAC layer data header according to the corresponding address. Since the first index identifier replaces the MAC address, the number of occupied bytes of the address is reduced, and the header overhead is reduced, thereby reducing power consumption.
  • FIG. 8 is a schematic structural diagram of another embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure, where the apparatus may include:
  • the device determining module 801 is configured to determine a communication association device for media access control MAC layer to be transmitted data, where the communication associated device includes a sending device and a receiving device.
  • the first identifier obtaining module 802 is configured to determine, when the sending device and the receiving device are located in the same wireless subnet, a first index identifier of the sending device and a first index identifier of the receiving device.
  • the first index identifier may be used to index the STA identifier of the device whose device type is the STA or the AP identifier of the device whose index device type is the AP.
  • the STA identifier is that the AP device is the STA device in the same wireless subnet. Pre-set and assigned; the AP identifier is preset by each AP device in a different distributed system.
  • the AP identifier includes distributed system index information, AP index information, and may also include unicast indication index information.
  • the sending device is a STA device
  • the first index identifier of the sending device is a STA identifier
  • the first index identifier of the sending device is an AP identifier
  • the first index identifier of the receiving device is an STA identifier
  • the first index identifier of the receiving device is an AP identifier.
  • Each STA device in the same wireless subnet has a unique STA identifier.
  • AP devices located in different distributed systems have unique AP identities.
  • the first address generating module 803 is configured to use the first index identifier of the sending device and the first index identifier of the receiving device as a corresponding address in a MAC layer data header address field.
  • the first address generating module 803 may include: a first address generating submodule 8031, when the source device of the data to be transmitted and the sending device are the same, the destination device, and the receiving When the device is the same, the first index identifier of the sending device is used as the sending address and the source address in the MAC layer data header address field, and the first index identifier of the receiving device is used as the destination address in the MAC layer data header address field. And receiving address; or,
  • a second address generating submodule configured to use the first index identifier of the sending device as a MAC layer data header when the source device of the data to be transmitted and the sending device are the same, and the destination device and the receiving device are different.
  • a sending address and a source address in the address domain, a first index identifier of the receiving device, and a MAC address of the destination device respectively, as a receiving address and a destination address 8032 in a MAC layer data header address field; or
  • a third address generation sub-module 8033 configured to: when the source device of the data to be transmitted is different from the sending device, and the destination device and the receiving device are the same, respectively, the first index identifier of the sending device and the The MAC address of the source device is used as the sending address and the source address in the MAC layer data address field, and the first index identifier of the receiving device is used as the destination address and the receiving address in the MAC layer data header address field.
  • the first header encapsulating module 804 is configured to perform header encapsulation according to the address obtained by the first address generating module to form the MAC layer data header.
  • the second identifier obtaining module 805 is configured to acquire an AP identifier of the sending device and an AP identifier of the receiving device when the sending device and the receiving device are located in different wireless subnets,
  • the second address generating module 806 is configured to use an AP identifier of the sending device and an AP identifier of the receiving device as a sending address and a receiving address in a MAC layer data header address field;
  • a second header encapsulating module 807 configured to perform, according to the address obtained by the second address generating module
  • the header encapsulation forms the MAC layer data header.
  • both the sending device and the receiving device are AP devices.
  • AP devices in different distributed systems can be distinguished by the AP identifier. Therefore, the AP identifier of the sending device and the AP identifier of the receiving device can be used as the sending address and receiving address in the MAC layer data header address field instead of the MAC address as the index address, which can save space occupied by the address field.
  • the address that is required to be carried in the MAC layer data header address field is determined according to whether the sending device and the receiving device are located in the same wireless subnet, and the sending device and the receiving device.
  • the address carried in the data header address field because the number of bytes in the first index identifier is smaller than the number of bytes in the MAC address, the space occupied by the MAC layer data header address field is reduced, so that the MAC layer data header overhead is reduced, thereby finally forming the wireless local area network data.
  • the header overhead of the header is reduced, which helps to reduce power consumption.
  • FIG. 9 is a schematic structural diagram of still another embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure, where the apparatus may include:
  • the header information determining module 901 is configured to determine header information of a network layer header of the data to be transmitted.
  • the transmission information determining module 902 is configured to determine information to be transmitted in the header information according to a data header compression rule.
  • the header compression rule can include:
  • the transmission information determining module 903 determines that the information to be transmitted includes information that changes in the communication connection process in the header information, information that is not known by the logical link control layer, or information that cannot be predicted.
  • the first data transmission module 903 is configured to encapsulate the network layer data header according to the to-be-transmitted information, and add to the data to-be-transmitted header before transmitting to the logical link control layer.
  • a second data transmission module 904 configured to add the data to be transmitted received by the logical link control layer After adding the link layer data header, it is transmitted to the MAC layer.
  • the network layered data headers of the transmitting device and the receiving device for transmitting data are sequentially encapsulated and generated from the upper layer to the lower layer of the network layer, so the data to be transmitted of the MAC layer is the received data from the logical link control layer, when the wireless When the local area network is connected to the Internet, the data of the logical link control layer is the received data from the network layer.
  • the data to be transmitted can be encapsulated by the network layer data header and the link layer data header by using the scheme in this embodiment, so that the network layer data header and the link are added.
  • the data to be transmitted of the layer data header is transmitted to the MAC layer.
  • the device determining module 905 is configured to determine a communication associated device that is sent by the second data transmission module 904 to the MAC layer to be transmitted, where the communication associated device includes a sending device and a receiving device.
  • the sending device and the receiving device are located in the same wireless subnet, acquiring a first index identifier of the sending device and a first index identifier of the receiving device, where the sending device and the receiving device have a unique An index identifier, where the number of bytes of the first index identifier is less than the number of bytes of the MAC address;
  • the first address generating module 907 is configured to use the first index identifier of the sending device and the first index identifier of the receiving device as a corresponding address in a MAC layer data header address field.
  • the first header encapsulating module 908 is configured to perform header encapsulation according to the address obtained by the first address generating module to form the MAC layer data header.
  • the device may further comprise:
  • a second identifier obtaining module configured to acquire an AP identifier of the sending device and an AP identifier of the receiving device when the sending device and the receiving device are located in different wireless subnets
  • a second address generating module configured to use an AP identifier of the sending device and an AP identifier of the receiving device as a sending address and a receiving address in a MAC layer data header field;
  • a second header encapsulating module configured to perform header encapsulation according to an address obtained by the second address generating module, to form the MAC layer data header.
  • the data to be transmitted may be encapsulated in the network layer data header only according to the header compression rule at the network layer, thereby reducing the space occupied by the network layer data header, and the data to be transmitted is at the MAC layer.
  • the first index identifier is used instead of the MAC address as the address carried by the MAC layer data header address field, and the first index identifier byte number is smaller than the MAC address byte number, thereby reducing the space occupied by the MAC layer data header, thereby enabling the transmission to be transmitted.
  • Data-encapsulated WLAN data header overhead is reduced, which reduces power consumption.
  • the data header encapsulating apparatus of the foregoing embodiment shown in FIG. 7 to FIG. 9 can be applied to a sending device in an actual application, and the sending device can be a STA device or an AP device, and the device of the data packet encapsulating device of the present application can be deployed.
  • the overhead of the data header of the data to be transmitted is reduced, and the power consumption of the device can be reduced.
  • the present application further provides an implementation of a data header encapsulation device.
  • the data header encapsulating device includes at least a memory
  • the memory 1001 is configured to store a set of first data header encapsulation programs; the memory may be a high speed RAM memory, or may be a non-volatile memory, such as at least one disk memory.
  • the processor 1002 is configured to invoke the set of first data header encapsulation programs stored in the memory, and perform the following operations;
  • a communication associated device of the MAC layer Determining, by the media access control, a communication associated device of the MAC layer to transmit data, the communication associated device comprising a transmitting device and a receiving device;
  • the first index identifier of the sending device and the first index identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field, and header encapsulation is performed according to the corresponding address to form the MAC layer data header.
  • the processor may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or configured to implement an embodiment of the present invention.
  • ASIC application specific integrated circuit
  • FIG. 11 is an embodiment of a data header decapsulation apparatus according to an embodiment of the present application.
  • the data obtaining module 1101 is configured to acquire MAC layer receiving data, and decapsulate the MAC layer to receive data.
  • the first header information obtaining module 1102 is configured to: when the sending device and the receiving device that receive the data in the MAC layer are located in the same wireless subnet, acquire the first index identifier of the sending device in the address domain, and the first identifier of the receiving device An index identifier.
  • the first index identifier byte number is smaller than the MAC address byte number.
  • the first index identifier of the sending device is the sending address carried by the address domain
  • the first index identifier of the receiving device is the receiving address in the bearer address of the address domain.
  • the sending address and the receiving address carried by the address domain can be determined first, and the sending address is the first index identifier of the sending device, and the receiving address is the first index identifier of the receiving device.
  • the first address determining module 1103 is configured to determine a MAC address of the sending device and the receiving device according to a correspondence between each first index identifier and a MAC address of each device.
  • the sending device can store and manage a one-to-one correspondence between different first index identifiers and MAC addresses of different devices.
  • the correspondence between the first index identifier and the MAC address of each device may be carried.
  • the correspondence can also be sent separately.
  • the MAC addresses of the sending device and the receiving device can be obtained.
  • the MAC address of the source device and the MAC address of the destination device are obtained.
  • the receiving device determines the MAC address of the different device, and then performs subsequent data transmission according to the MAC address of the different device.
  • the header decapsulation apparatus of the embodiment shown in FIG. 11 is specifically applied to a receiving device in a data transmission process, and the receiving device may be a STA device or an AP device.
  • the device deploying the header decapsulation apparatus of the embodiment shown in FIG. 10 can restore the address in the MAC layer data header address field to the MAC address of the device. Therefore, referring to FIG. 12, the present application further provides an embodiment of a header decapsulation apparatus, the header decapsulation apparatus comprising at least a memory 1201 and a processor 1202 connected to the memory 1201 via a communication bus.
  • the memory 1201 is configured to store a set of first data header decapsulation programs; the memory may be a high speed RAM memory or a non-volatile memory, such as at least one disk memory.
  • the processor 1202 is configured to invoke the set of first data header decapsulation programs stored in the memory, and perform the following operations:
  • the processor may be a central processing unit CPU or a specific integrated circuit ASIC
  • FIG. 13 is a schematic structural diagram of still another embodiment of a data header encapsulating apparatus according to an embodiment of the present disclosure, where the apparatus may include:
  • the device determining module 1301 is configured to determine a communication associated device of a MAC layer to be transmitted, where the communication associated device includes a sending device and a receiving device.
  • the third identifier obtaining module 1302 is configured to determine, when the sending device or the receiving device is an AP device, a second index identifier of the sending device or a second index identifier of the receiving device, where the sending device and The receiving device has a unique second index identifier, and the number of the second index identifier bytes is smaller than the number of MAC address bytes; or, when the sending device and the receiving device are AP devices, determining the sending device The second index identifier and the second index identifier of the receiving device.
  • the third address generating module 1303 is configured to use a second index identifier of the sending device and/or a second index identifier of the receiving device as a corresponding address in a MAC layer data header address field. That is, when the sending device or the receiving device is an AP device, the second index identifier of the sending device or the second index identifier of the receiving device is used as a corresponding address in a MAC layer data header address field; or,
  • the second index identifier of the sending device and the second index identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field.
  • the third header encapsulating module 1304 is configured to perform header encapsulation according to the address obtained by the third address generating module to form the MAC layer data header.
  • Different AP devices in the same distributed system or in different distributed systems respectively have a unique second index identifier, so that the transmitting device and/or the receiving device respectively have a unique second index identifier.
  • the second index identifier may be specifically configured by using the AP identifiers in the foregoing embodiments, and is preset for each AP device in different distributed systems.
  • the AP identity may include distributed system index information, AP index information, and unicast indication index information.
  • a 48-bit MAC address is not required for identification, and a small number of bits can be used for identification. Therefore, a unique AP identifier can be set in advance for each AP device of a different distributed system.
  • the header encapsulation apparatus of the embodiment is used to determine the address to be carried in the MAC layer data header address field, according to the transmitting device of the data to be transmitted and/or If the receiving device is an AP device, the second index identifier of the sending device and/or the second index identifier of the receiving device may be respectively obtained, and the MAC address of the device may be replaced by the second index identifier as the MAC layer data header address domain. The corresponding address, the sending address and the receiving address.
  • the space occupied by the MAC layer data header address field is reduced, so that the MAC layer data header overhead is reduced, and thus the header overhead of the finally formed WLAN data header is reduced. Conducive to reducing power consumption.
  • the sending device and/or the receiving device use the second index identifier to replace the MAC address of the device as the corresponding address in the MAC layer data header address field
  • the sending device and the receiving device are located in the same wireless subnet
  • the STA device in the sending device and/or the receiving device replaces the MAC address of the device with the STA identifier as the corresponding address in the MAC layer data header address field.
  • the second index identifier is limited, and the AP device can be allocated. Therefore, after the second index identifier is set for the AP device, the second index identifier can be detected.
  • the device may further include:
  • the first detecting module is configured to detect that the AP identifier of the associated AP device is the same as the AP identifier included in the received broadcast information, and the basic service set identifier BSSID or the service set identifier SSID of the associated AP device and the received broadcast information When the BSSID or the SSID included in the difference is different, the address conflict information is sent to the associated AP device;
  • the device may further include:
  • the second detecting module is configured to detect that the AP identifier included in the received broadcast information is the same as the AP identifier of the sending device, or re-set the AP identifier when receiving the address conflict message sent by the associated STA device.
  • the data header encapsulating device shown in FIG. 13 is specifically applied to a sending device, where the sending device can be a STA device or an AP device, and the device of the data header encapsulating device shown in FIG. 11 is deployed, which can make data to be transmitted.
  • the overhead of the data header is reduced, which can reduce the power consumption of the device.
  • the embodiment of the present application further provides another embodiment of a data header encapsulating device, where the data header encapsulating device includes at least a memory 1401 and a processor 1402 connected to the memory 1401 through a communication bus.
  • the memory 1401 is configured to store a set of second data header encapsulation programs; the memory may be a high speed RAM memory or a non-volatile memory such as at least one disk memory or the like.
  • the processor 1402 is configured to invoke all the second data header encapsulation programs stored by the memory 1401, and perform the following operations:
  • the second index identifier of the sending device or the second index identifier of the receiving device is used as a corresponding address in a MAC layer data header address field, and is encapsulated according to the corresponding address to form the MAC layer data header.
  • the sending device and the receiving device are wireless access point devices, determining a second index identifier of the sending device and a second index identifier of the receiving device;
  • the second index identifier of the sending device and the second index identifier of the receiving device are used as corresponding addresses in the MAC layer data header address field, and header encapsulation is performed according to the corresponding address to form the MAC layer data header.
  • the processor may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • ASIC Application Specific Integrated Circuit
  • the embodiment of the present application further provides a structure diagram of another embodiment of a data header decapsulation apparatus, where the apparatus may include:
  • the data obtaining module 1501 is configured to acquire MAC layer receiving data, and decapsulate the MAC layer to receive data.
  • the second header information obtaining module 1502 is configured to: when the sending device or the receiving device that receives the data by the MAC layer is an AP device, acquire a second index identifier of the sending device in the address domain or a second index of the receiving device Index identifier, the number of the second index identifier bytes is smaller than the number of MAC address bytes; or, when the sending device and the receiving device of the MAC layer receiving data are AP devices, acquiring the data in the data header address field Sending a second index identifier of the device and a second index identifier of the receiving device.
  • the second address determining module 1503 is configured to determine a MAC address of the sending device and/or the receiving device according to a correspondence between each second index identifier and a MAC address of each device.
  • the data header decapsulation apparatus of the embodiment shown in FIG. 15 can be applied to a receiving device in an actual application, and the receiving device can be a STA device or an AP device. Therefore, referring to FIG. 16, the embodiment of the present application further provides another embodiment of a data header decapsulation apparatus, where the device includes at least a memory 1601 and a processor 1602 connected to the memory 1601 through a communication bus.
  • the memory 1601 is configured to store a set of second data header decapsulation programs; the memory may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • the processor 1602 is configured to invoke a set of the second data header decapsulation program stored by the memory 1601, and perform the following operations:
  • the processor may be a central processing unit CPU or a specific integrated circuit ASIC
  • the data header encapsulation method, the decapsulation method, the device and the device provided by the embodiment of the present invention for the data to be transmitted in the MAC (Media Access Control) layer, first determine the sending device and the receiving device of the MAC layer to be transmitted data. Then, according to whether the sending device and the receiving device are located in the same wireless subnet, or whether the sending device and/or the receiving device are wireless access point devices, the first index identifier or the second index identifier of each of the sending device and the receiving device may be obtained. Instead of the MAC address of the device, it is the address carried by the MAC layer data header address field. Since the number of the first index identifier and the second index identifier are both smaller than the device MAC address, the MAC layer data header is caused. The number of occupied bytes is reduced, and the header overhead is reduced, thereby reducing power consumption.
  • MAC Media Access Control
  • the disclosed methods, apparatus, and apparatus 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 system, or some features can be ignored, or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some communication interface, device or unit, and may be in electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate, and the components displayed as the 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 or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is 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 removable 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 Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请实施例提供了一种数据报封装方法、解封装方法和装置,对于MAC层的待传输数据,确定MAC层待传输数据的发送设备和接收设备,根据发送设备和接收设备是否位于同一无线子网,或者发送设备、接收设备是否为无线接入点设备,获取发送设备和接收设备各自的第一索引标识或者第二索引标识,代替设备的MAC地址,作为MAC层数据报头地址域中的地址。由于第一索引标识或第二索引标识字节数均小于MAC地址,因此使得MAC层数据报头占用空间减少,使得最终形成的无线局域网数据报头占用空间减少,减小了报头开销,从而可以降低功耗。

Description

数据报头封装方法、 解封装方法、 装置及设备 技术领域
本申请涉及数据处理技术领域, 更具体的说是涉及一种数据报头封装方 法、 解封装方法、 装置及设备。 背景技术
WLAN(Wireless Local Area Networks ,无线局域网)是指以无线信道来替代 传统有线传输介质所构成的数据传输网络。 WLAN 的基本网络架构主要包括 物理层、 MAC ( Media Access Control, 媒体访问控制 )层以及逻辑链路控制 层。 无线局域网接入互联网后, 基于 IP ( Internet Protocol, 网络协议)连接的 无线局域网还可以包括网络层、传输层以及应用层,每一网络分层之间采用不 同的通信协议进行通信。
WLAN 中的设备主要包括无线接入点设备和站点设备, 一个无线接入点 设备可以连接若干个站点设备形成无线子网, 多个无线子网组成分布式系统, 分布式系统还可以接入互联网。同一无线子网范围内的站点设备可以直接进行 通信,也可以通过无线接入点设备与其他无线子网范围内的设备或者无线局域 网外部通信。
WLAN 中的设备进行通信时, 发送设备发送的待传输的数据, 需要经过 各个网络分层进行封装, 分别添加相应网络分层的数据报头后,再传输给接收 设备。 每一网络分层的数据报头包括不同的字段内容。 以 MAC层为例, MAC 层数据报头主要包括地址域、 帧控制域、 服务质量控制域、 持续时间标识域, 其中, 地址域主要承载待传输数据的发送地址、接收地址、 源地址以及目的地 址。
发明人在实现本发明的过程中发现,由于待传输数据需要经过多个网络分 层添加多个数据报头, 最终形成的 WLAN数据报头占用的字节数将会很多, 报头开销大, 不符合低功耗的需求。 发明内容
本申请实施例提供了一种数据报头封装生成方法、解封装方法、装置及设 备, 用以解决现有的数据报头开销大、 功耗较高的技术问题。
为实现上述目的, 本申请实施例提供如下技术方案:
第一方面, 提供了一种数据报头封装方法, 包括:
确定媒体访问控制 MAC层待传输数据的通信关联设备, 所述通信关联设 备包括发送设备和接收设备;
当所述发送设备和所述接收设备位于同一无线子网,确定所述发送设备的 第一索引标识以及所述接收设备的第一索引标识,所述发送设备和所述接收设 备分别具有唯一第一索引标识, 所述第一索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第一索引标识和所述接收设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
在所述第一方面的第一种可能方式中,所述第一索引标识为所述发送设备 和所述接收设备所在无线子网的无线接入点设备预先设置并分配的。
在所述第一方面的第二种可能方式中,所述第一索引标识为用于索引设备 类型为站点的设备的站点标识或索引设备类型为无线接入点的设备的无线接 入点标识;
当所述发送设备为站点设备时, 所述发送设备的第一索引标识为站点标 识, 其中, 位于同一无线子网内的站点设备分别具有唯一站点标识; 或, 当所述发送设备为无线接入点设备时,所述发送设备的第一索引标识为无 线接入点标识, 其中,位于不同分布式系统中的无线接入点设备分别具有唯一 无线接入点标识; 或,
当所述接收设备为站点设备时, 所述接收设备的第一索引标识为站点标 识; 或,
当所述接收设备为无线接入点设备时,所述接收设备的第一索引标识为无 线接入点标识。 在所述第一方面的第三种可能实现方式中,所述将所述发送设备的第一索 引标识和所述接收设备的第一索引标识, 作为 MAC层数据报头地址域中的相 应地址包括:
当所述待传输数据的源设备和所述发送设备相同、目的设备和所述接收设 备相同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的 发送地址和源地址, 将所述接收设备的第一索引标识作为 MAC层数据报头地 址域中的目的地址和接收地址; 或,
当所述待传输数据的源设备和所述发送设备相同、目的设备和所述接收设 备不同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的 发送地址和源地址, 将所述接收设备的第一索引标识以及所述目的设备的 MAC地址, 分别作为 MAC层数据 ^艮头地址域中的接收地址和目的地址; 或, 当所述待传输数据的源设备和所述发送设备不同、目的设备和所述接收设 备相同时, 分别将所述发送设备的第一索引标识以及所述源设备的 MAC地址 作为 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的第一 索引标识作为 MAC层数据报头地址域中的目的地址和接收地址。
结合所述第一方面的第二种可能实现方式,还提供了所述第一方面的第四 种可能实现方式, 当所述发送设备和所述接收设备位于不同无线子网时, 所述 方法还包括:
获取所述发送设备的无线接入点标识和所述接收设备的无线接入点标识; 将所述发送设备的无线接入点标识和所述接收设备的无线接入点标识作 为 MAC层数据报头地址域中的发送地址和接收地址, 并根据所述发送地址和 所述接收地址进行报头封装, 形成所述 MAC层数据报头。
结合所述第一方面的第二种可能实现方式或者所述第一方面的第四种可 能实现方式,还提供了所述第一方面的第五种可能实现方式, 所述无线接入点 标识包括分布式系统索引信息和无线接入点索引信息。
在所述第一方面的第六种可能实现方式中, 所述方法还包括:
确定所述待传输数据的网络层报头的报头信息;
按照数据报头压缩规则, 确定所述报头信息中的待传输信息; 根据所述待传输信息封装所述网络层数据报头 ,并添加到所述待传输数据 头部之后传输至逻辑链路控制层;
将逻辑链路控制层接收的所述待传输数据添加链路层数据报头后传输至
MAC层。
结合所述第一方面的第六种可能实现方式,还提供了所述第一方面的第七 种可能实现方式,所述待传输信息包括所述报头信息中通信连接过程中变化的 信息、 由逻辑链路控制层不能够获知的信息、 或者不能够预知的信息。
第二方面, 提供了一种数据报头解封装方法, 包括:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备和接收设备位于同一无线子网, 获取 所述数据报头地址域中的所述发送设备的第一索引标识以及所述接收设备的 第一索引标识, 所述第一索引标识字节数小于 MAC地址字节数;
根据各个第一索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备以及所述接收设备的 MAC地址。
第三方面, 提供了一种数据报头封装方法, 包括:
确定 MAC层待传输数据的通信关联设备, 所述通信关联设备包括发送设 备和接收设备;
当所述发送设备或所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识或所述接收设备的第二索引标识,所述发送设备和所述接收设 备分别具有唯一第二索引标识, 所述第二索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第二索引标识或所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头; 或,
当所述发送设备和所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识和所述接收设备的第二索引标识;
将所述发送设备的第二索引标识和所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
在所述第三方面的第一种可能实现方式中,所述第二索引标识为索引无线 接入点设备的无线接入点标识,位于不同分布式系统中的无线接入点设备分别 具有唯一无线接入点标识。
在所述第三方面的第二种可能实现方式中, 所述方法应用于发送设备中, 所述发送设备为站点设备时, 所述方法还包括:
检测关联的无线接入点设备的无线接入点标识和接收到的广播信息中包 括的无线接入点标识相同,且关联的无线接入点设备的基石出服务集标识 BSSID 或服务集标识 SSID和接收到的广播信息中包括的 BSSID或 SSID不同时, 向 关联的无线接入点设备发送地址冲突信息; 或,
所述发送设备为无线接入点设备时, 所述方法还包括:
检测接收到的广播信息包括的无线接入点标识与所述发送设备的无线接 入点标识相同, 或者接收到关联的站点设备发送的地址冲突消息时, 重新设置 无线接入点标识。
第四方面, 提供了一种数据报头解封装方法, 包括:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备或接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识或所述接收设备的 第二索引标识, 所述第二索引标识字节数小于 MAC地址字节数;
根据各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备或所述接收设备的 MAC地址; 或,
当所述 MAC层接收数据的发送设备和接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的 第二索引标识;
根据所述各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所 述发送设备和所述接收设备的 MAC地址。
第五方面, 提供了一种数据报头封装装置, 包括:
设备确定模块, 用于确定媒体访问控制 MAC层待传输数据的通信关联设 备, 所述通信关联设备包括发送设备和接收设备;
第一标识获取模块, 用于当所述发送设备和所述接收设备位于同一无线 子网, 确定所述发送设备的第一索引标识以及所述接收设备的第一索引标识, 所述发送设备和所述接收设备具有唯一第一索引标识,所述第一索引标识字节 数小于 MAC地址字节数;
第一地址生成模块,用于将所述发送设备的第一索引标识和所述接收设备 的第一索引标识, 作为 MAC层数据报头地址域中的相应地址;
第一报头封装模块,用于按照所述第一地址生成模块得到的地址进行报头 封装, 形成所述 MAC层数据报头。
在所述第五方面的第一种可能实现方式中,所述第一索引标识为所述发送 设备和所述接收设备所在无线子网的无线接入点设备预先设置并分配的。
在所述第五方面的第二种可能实现方式中,所述第一索引标识为用于索引 设备类型为站点的设备的站点标识或索引设备类型为无线接入点的设备的无 线接入点标识;
当所述发送设备为站点设备时, 所述发送设备的第一索引标识为站点标 识, 其中, 位于同一无线子网内的站点设备分别具有唯一站点标识; 或, 当所述发送设备为无线接入点设备时,所述发送设备的第一索引标识为无 线接入点标识, 其中,位于不同分布式系统中的无线接入点设备分别具有唯一 无线接入点标识; 或,
当所述接收设备为站点设备时, 所述接收设备的第一索引标识为站点标 识; 或,
当所述接收设备为无线接入点设备时,所述接收设备的第一索引标识为无 线接入点标识。
在所述第五方面的第三种可能实现方式中, 所述第一地址生成模块包括: 第一地址生成子模块,用于当所述待传输数据的源设备和所述发送设备相 同、 目的设备和所述接收设备相同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的第一索引 标识作为 MAC层数据报头地址域中的目的地址和接收地址; 或, 第二地址生成子模块,用于当所述待传输数据的源设备和所述发送设备相 同、 目的设备和所述接收设备不同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的第一索引 标识以及所述目的设备的 MAC地址, 分别作为 MAC层数据报头地址域中的 接收地址和目的地址; 或,
第三地址生成子模块,用于当所述待传输数据的源设备和所述发送设备不 同、 目的设备和所述接收设备相同时, 分别将所述发送设备的第一索引标识以 及所述源设备的 MAC地址作为 MAC层数据报头地址域中的发送地址和源地 址, 将所述接收设备的第一索引标识作为 MAC层数据报头地址域中的目的地 址和接收地址。
结合所述第五方面的第二种可能实现方式,还提供所述第五方面的第四种 可能实现方式, 还包括:
第二标识获取模块,用于当所述发送设备和所述接收设备位于不同无线子 网时, 获取所述发送设备的无线接入点标识和所述接收设备的无线接入点标 识,
第二地址生成模块,用于将所述发送设备的无线接入点标识和所述接收设 备的无线接入点标识作为 MAC层数据报头地址域中的发送地址和接收地址; 第二报头封装模块,用于按照所述第二地址生成模块得到的地址进行报头 封装, 形成所述 MAC层数据报头。
在所述第五方面的第五种可能实现方式中, 还包括:
报头信息确定模块, 用于确定所述待传输数据的网络层报头的报头信息; 传输信息确定模块, 用于按照数据报头压缩规则,确定所述报头信息中的 待传输信息;
第一数据传输模块, 用于根据所述待传输信息封装所述网络层数据报头, 并添加到所述待传输数据头部之后传输至逻辑链路控制层;
第二数据传输模块,用于将逻辑链路控制层接收的所述待传输数据添加链 路层数据报头后传输至 MAC层。
结合所述第五方面的第五种可能实现方式,还提供了所述第五方面的第六 种可能实现方式, 所述传输信息确定模块具体用于将所述 头信息中, 不包括 通信连接过程中不变的、由逻辑链路控制层能够获知的、或者能够预知的信息, 作为待传输的信息。
第六方面, 提供了一种数据报头解封装装置, 包括:
解封装模块, 用于获取 MAC层接收数据, 并解封装所述 MAC层接收数 据的数据报头; 第一报头信息获取模块, 用于当所述 MAC层接收数据的发送设备和接收 设备位于同一无线子网,获取地址域中的所述发送设备的第一索引标识以及所 述接收设备的第一索引标识,所述第一索引标识字节数小于 MAC地址字节数; 第一地址确定模块, 用于根据各个第一索引标识与各个设备的 MAC地址 的对应关系, 确定所述发送设备和所述接收设备的 MAC地址。
第七方面, 提供了一种数据报头封装装置, 包括:
设备确定模块, 用于确定 MAC层待传输数据的通信关联设备, 所述通信 关联设备包括发送设备和接收设备;
第三标识获取模块,用于当所述发送设备或所述接收设备为无线接入点设 备时,确定所述发送设备的第二索引标识或所述接收设备的第二索引标识, 所 述发送设备和所述接收设备分别具有唯一第二索引标识,所述第二索引标识字 节数小于 MAC地址字节数; 或, 当所述发送设备和所述接收设备为无线接入 点设备时, 确定所述发送设备的第二索引标识和所述接收设备的第二索引标 识;
第三地址生成模块, 用于将所述发送设备的第二索引标识和 /或接收设备 的第二索引标识, 作为 MAC层数据报头地址域中的相应地址;
第三报头封装模块,用于按照所述第三地址生成模块得到的地址进行报头 封装, 形成所述 MAC层数据报头。
在所述第七方面的第一种可能实现方式中,所述第二索引标识为索引无线 接入点设备的无线接入点标识,位于不同分布式系统中的无线接入点设备分别 具有唯一无线接入点标识。
在所述第七方面的第二种可能实现方式中, 所述装置应用于发送设备中, 所述发送设备为站点设备时, 所述装置还包括:
第一检测模块,用于检测关联的无线接入点设备的无线接入点标识和接收 到的广播信息中包括的无线接入点标识相同,且关联的无线接入点设备的基础 服务集标识 BSSID或服务集标识 SSID和接收到的广播信息中包括的 BSSID 或 SSID不同时, 向关联的无线接入点设备发送地址冲突信息; 或,
所述发送设备为无线接入点设备时, 所述装置还包括:
第二检测模块,用于检测接收到的广播信息包括的无线接入点标识与所述 发送设备的无线接入点标识相同,或者接收到关联的站点设备发送的地址冲突 消息时, 重新设置无线接入点标识。
第八方面, 提供了一种数据报头解封装装置, 包括:
数据获取模块, 用于获取 MAC层接收数据, 并解封装所述 MAC层接收 数据;
第二报头信息获取模块, 用于当所述 MAC层接收数据的发送设备或接收 设备为无线接入点设备时,获取地址域中的所述发送设备的第二索引标识或所 述接收设备的第二索引标识,所述第二索引标识字节数小于 MAC地址字节数; 或, 当所述 MAC层接收数据的发送设备和接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的 第二索引标识;
第二地址确定模块, 用于根据各个第二索引标识与各个设备的 MAC地址 的对应关系, 确定所述发送设备和 /或所述接收设备的 MAC地址。
第九方面, 提供了一种数据报头封装设备, 至少包括存储器和处理器, 所述存储器用于存储一组第一数据报头封装程序;
所述处理器用于调用所述存储器存储的所述一组第一数据报头封装程序 , 执行如下操作;
确定媒体访问控制 MAC层待传输数据的通信关联设备, 所述通信关联设 备包括发送设备和接收设备;
当所述发送设备和所述接收设备位于同一无线子网,确定所述发送设备的 第一索引标识以及所述接收设备的第一索引标识,所述发送设备和所述接收设 备分别具有唯一第一索引标识, 所述第一索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第一索引标识和所述接收设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
第十方面, 提供了一种数据报头解封装设备, 至少包括存储器和处理器, 所述存储器用于存储一组第一数据报头解封装程序;
所述处理器用于调用所述存储器存储的所述一组第一数据报头解封装程 序, 执行如下操作:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备和接收设备位于同一无线子网, 获取 所述数据报头地址域中的所述发送设备的第一索引标识以及所述接收设备的 第一索引标识, 所述第一索引标识字节数小于 MAC地址字节数;
根据各个第一索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备以及所述接收设备的 MAC地址。
第十一方面, 提供了一种数据报头封装设备, 其特征在于, 至少包括存储 器和处理器,
所述存储器用于存储一组第二数据报头封装程序;
所述处理器用于调用所述存储器存储的所有一组第二数据报头封装程序, 执行如下操作:
确定 MAC层待传输数据的通信关联设备, 所述通信关联设备包括发送设 备和接收设备;
当所述发送设备或所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识或所述接收设备的第二索引标识,所述发送设备和所述接收设 备分别具有唯一第二索引标识, 所述第二索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第二索引标识或所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头; 或,
当所述发送设备和所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识和所述接收设备的第二索引标识;
将所述发送设备的第二索引标识和所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
第十二方面,提供了一种数据报头解封装设备,至少包括存储器和处理器, 所述存储器用于存储一组第二数据报头解封装程序;
所述处理器用于调用所述存储器存储的一组所述第二数据报头解封装程 序, 执行如下操作:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备或接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识或所述接收设备的 第二索引标识, 所述第二索引标识字节数小于 MAC地址字节数;
根据各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备或所述接收设备的 MAC地址; 或,
当所述 MAC层接收数据的发送设备和接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的 第二索引标识;
根据所述各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所 述发送设备和所述接收设备的 MAC地址。
经由上述的技术方案可知, 与现有技术相比, 本申请提供了一种数据报头 封装方法、 解封装方法、 装置及设备, 对于 MAC ( Media Access Control, 媒 体访问控制 )层的待传输数据,通过获取发送设备和接收设备各自的第一索引 标识或者第二索引标识, 作为 MAC层数据报头地址域承载的地址。 由于第一 索引标识或者第二索引标识字节数均小于设备 MAC地址, 因此使得 MAC层 数据报头占用字节数减少, 减小了报头开销, 从而可以降低功耗。 附图说明 为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述 中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创 造性劳动的前提下, 还可以根据提供的附图获得其他的附图。
图 1 为本申请实施例提供的一种数据报头封装方法一个实施例的流程 图;
图 la为本申请实施例提供的无线局域网系统的一种结构示意图; 图 2 为本申请实施例提供的一种数据报头封装方法另一个实施例的流程 图;
图 3 为本申请实施例提供的一种数据报头封装方法中网络层数据报头封 装方法的流程图;
图 4 为本申请实施例提供的一种数据报头解封装方法一个实施例的流程 图;
图 5 为本申请实施例提供的一种数据报头封装方法又一个实施例的流程 图;
图 6 为本申请实施例提供的一种数据报头解封装方法另一个实施例的流 程图;
图 7 为本申请实施例提供的一种数据报头封装装置一个实施例的结构示 意图;
图 8 为本申请实施例提供的一种数据报头封装装置另一个实施例的结构 示意图;
图 9 为本申请实施例提供的一种数据报头封装装置又一个实施例的结构 示意图;
图 10为本申请实施例提供的一种数据报头封装设备一个实施例的结构示 意图;
图 11为本申请实施例提供的一种数据报头解封装装置又一个实施例的结 构示意图;
图 12为本申请实施例提供的一种数据报头解封装设备一个实施例的结构 示意图;
图 13为本申请实施例提供的一种数据报头封装装置又一个实施例的结构 示意图;
图 14为本申请实施例提供的一种数据报头封装设备另一个实施例的结构 示意图;
图 15为本申请实施例提供的一种数据报头解封装装置另一个实施例的结 构示意图;
图 16为本申请实施例提供的一种数据报头解封装设备另一个实施例的结 构示意图。 具体实施方式 下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本申请一部分实施例, 而不是 全部的实施例。基于本申请中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本申请保护的范围。
本申请实施例的主要思想之一包括:
在进行 MAC ( Media Access Control, 媒体访问控制 )层数据报头封装时, 确定出 MAC层待传输数据的发送设备和接收设备,根据发送设备和接收设备 是否位于同一无线子网, 或者发送设备和接收设备是否为无线接入点设备, 可 以获取发送设备和接收设备各自的第一索引标识或者第二索引标识,代替设备 的 MAC地址, 作为 MAC层数据报头地址域承载的地址。 由于第一索引标识 或者第二索引标识字节数均小于 MAC地址, 因此使得 MAC层数据报头占用 字节数减少, 减小了报头开销, 从而可以降低功耗。 图 1为本申请实施例一种数据报头封装方法一个实施例的流程图,该方法 可以包括以下几个步骤:
步骤 101 : 确定媒体访问控制 MAC层待传输数据的通信关联设备。
其中, 本实施例中, 该所述通信关联设备包括发送设备和接收设备。
通信关联设备为 MAC层数据报头地址域中的地址对应的设备, 也即为待 传输数据的在数据传输过程中涉及的设备。
本申请的技术方案主要适用于 WLAN ( Wireless Local Area Networks , 无 线局域网) 中。
为了方便理解本申请技术方案,首先描述一下本申请技术方案涉及的无线 局域网的基本知识:
MAC层报头地址域承载的地址主要包括 MAC层待传输数据的四个地址 要素: 源地址、 目的地址、 发送地址和接收地址。
源地址为源设备地址,是最初发送待传输数据的设备的地址; 目的地址为 目的设备地址,是最终接收待传输数据的设备的地址; 而发送地址为发送设备 地址, 是当前实际发送待传输数据的设备的地址, 其中, 发送设备可能是源设 备, 也可能是数据传输时的转发设备; 接收地址为接收设备地址, 是当前实际 接收待传输数据的设备的地址,接收设备可能是目的设备,也可能是数据传输 时的转发设备。
MAC层数据报头地址域通常包括四个地址字段, 可以分别用于承载不同 的地址。 当源地址和发送地址相同, 或者目的地址和接收地址相同时, 可以用 同一个地址段中的地址表示。
无线局域网中主要包括无线接入点设备, 即 Access Point, 以下文中描述 简称为 AP, 以及站点设备, 即 Station, 以下文中描述简称为 STA。 图 la示出 了无线局域网系统的一种结构示意图, 由图 la可知, 一个 AP设备可以关联 多个 STA设备形成无线子网, 多个 AP设备形成无线子网即组成分布式系统, 分布式系统可接入互联网。
其中, 同一无线子网范围内的 STA设备可以直接进行通信, 也可以通过 AP设备与其他无线子网范围内的设备或者无线局域网外部通信。 因此 AP设 备和 STA设备均可能作为发送设备或接收设备
基于无线局域网的待传输数据的不同来源和去向,数据通信模式方式主要 有以下几种情况:
A、 同一无线子网内 STA设备之间的通信, 即 Ad-Hoc (点对点)通信。 同一无线子网内的不同 STA设备, 可以直接进行通信, 无需转发设备进 行转发。 此时, 发送设备即为源设备, 接收设备即为目的设备。 在该情况下, 发送 地址与源地址相同, 接收地址与目的地址相同。 MAC层数据 4艮头地址域可以 用两个地址段分别承载该两个 STA设备的地址, 用以表示四个地址要素。
另外, 地址域还可以承载包括两个 STA设备所在无线子网的子网标识, 即 BSSID ( Basic Service Set , 基础服务集标识), 用于区分不同无线子网。
因此, 在通信模式 Α情况下, 地址域最多需要三个地址段承载地址即可, 第四个地址段为空。
B、 两个无线子网之间的 STA设备的通信。
两个无线子网之间的 STA设备进行通信, 需要经过两个无线子网的 AP 设备实现。 即例如, 当第一无线子网中的 STA1设备向第二无线子网的 STA2 设备发送数据时, 数据需要首先由 STA1设备发送至第一无线子网的 API设 备,然后由 API发送至第二无线子网的 AP2设备,由 AP2设备再发送至 STA2 设备。
因此, 在通信模式 B情况下, 数据传输主要包括以下几个过程:
Bl、 数据由 STA1设备发送至 API设备。
此时, 发送地址为 STA1设备的地址、接收地址为 API设备的地址, 源地 址与发送地址相同, 目的地址为 STA2设备的地址。 MAC层数据报头地址域 可以用三个地址段分别承载该三个设备的地址, 用以表示四个地址要素, 第四 个地址段为空。
B2、 数据由 API设备发送至 AP2设备。
此时, API设备和 AP2设备起到桥接的作用, 为无线桥接器上的数据传 输。
发送地址即为 API设备地址,接收地址为 AP2设备地址, 源地址为 STA1 设备地址, 目的地址为 STA2设备。 MAC层数据 头地址域用四个地址段分 别承载该四个设备的地址, 用以表示四个地址要素
B3、 数据由 AP2设备发送至 STA2设备。
此时, 发送地址即为 AP2设备地址。接收地址为 STA2设备地址, 源地址 为 STA1设备地址, 目的地址与接收地址相同。 MAC层数据报头地址域可以 用三个地址段分别 载该三个设备的地址, 用以表示四个地址要素, 第四个地 址段为空。
结合上述描述可知, MAC层待传输数据具有方向性。 在 MAC层数据报 头中包括帧控制域, 用以表示数据传输方向, 该帧控制域包括两个 DS ( distribution system, 分布式系统 )字段" To Ds"和" From Ds"。 To DS表示数 据由 STA设备发送至 AP设备, From DS表示数据由 AP设备发送至 STA设 备。
结合上述描述, 根据不同数据传输方向, 该帧控制域的两个 DS域字段值 可以有如下几种情况:
To DS=0,From DS=0:表示 STA设备之间的 AD Hoc的通信。
To DS=l,From DS = 0:表示数据由 STA1设备发送至 API设备。 此时发送 地址和源地址相同。
To DS=0,From DS=1:表示数据由 AP2设备发送至 STA2设备,此时接收地 址和目的地址相同。
To DS=l,From DS = 1:表示数据由 API设备发送至 AP2设备,为无线桥接 器上的数据传输。
本申请的技术方案即具体应用于发送该待传输数据的发送设备中。在进行 数据包头封装时, 首先确定出通信关联设备, 至少包括发送设备和接收设备。
步骤 102: 当所述发送设备和所述接收设备位于同一无线子网, 确定所述 发送设备的第一索引标识以及所述接收设备的第一索引标识。
其中, 该发送设备和该接收设备分别具有唯一第一索引标识, 该第一索引 标识字节数小于 MAC地址字节数。
现有技术中, MAC层数据报头地址域中的地址通常采用设备的 MAC地 址表示。 MAC地址为 6字节, 48比特的物理地址, 具有全球唯一性。 但是采 用 MAC地址, 地址域的四个地址字段最多将占用 24字节, 报头开销较大。
发明人在研究中发现,待传输数据在同一无线子网内传输时,对应上述描 述的帧控制域 "To Ds"和" From Ds"分别为 "00" "01" "10" 时, 发送设备和接 收设备均处于同一无线子网, 而位于同一无线子网内的设备数量是有限的, 无 需用采用 48比特的 MAC地址来进行识别, 采用较少比特的索引标识即可识 另 ij。 例如, 设备有 8个时, 采用至少 3个比特的位串即可实现对 8个设备的区 分。
由上述描述可知, 待传输数据只有两个 AP设备之间传输时, 发送设备与 接收设备不位于同一无线子网中。
因此, 本实施例中, 若待传输数据的发送设备以及接收设备位于同一无线 子网时, 则获取发送设备和接收设备各自的第一索引标识。
位于同一无线子网的各个设备均具有唯一的第一索引标识,该第一索引标 识可以是为每一设备预先设置的。
其中,作为一种可能的实现方式: 该第一索引标识为所述发送设备和所述 接收设备所在无线子网的 AP设备预先设置并分配的。
该发送设备和接收设备可能是 AP设备或者 STA设备。
由于在同一无线子网内, AP设备负责管理 STA设备, 同一无线子网内, STA设备之间进行通信时,需要关联至同一 AP设备, 即与 AP设备建立连接。 因此本实施例中, 无线子网内的 AP设备可以预先设置不同第一索引标识, 并 为加入该无线子网, 与其建立关联的 STA设备, 以及自身分配第一索引标识, 同时保存第一标识分配表。
该第一索引标识字节数小于 MAC地址字节数, 根据实际应用情况, 结合 一个无线子网内的可能设备数量, 采用 2字节、 16比特的第一索引标识即可 实现不同设备的区分。
因此发送设备和接收设备若位于同一无线子网,即具有唯一的第一索引标 识。
作为另一种可能的实现方式, 由于发送设备和接收设备可能是 AP设备或 者 STA设备, 根据不同的设备类型, 可以设置不同的第一索引标识。
该第一索引标识可以为用于索引设备类型为 STA的设备的 STA标识或者 索引设备类型为 AP的设备的 AP标识。
该 STA标识是 AP设备为同一无线子网内的各 STA设备预先设置并分配 的; 该 AP标识是为不同分布式系统中各个 AP设备预先设置的。 位于同一无 线子网内的站点设备分别具有唯一站点标识;位于不同分布式系统中的无线接 入点设备分别具有唯一无线接入点标识。
也即无线子网内的 AP设备可以预先设置不同 STA标识,并为加入该无线 子网, 与其建立关联的 STA设备分配 STA索引标识。
而不同分布式系统中的各个 AP设备, 由于分布式系统中 AP数量也是有 限的, 同样不需要 48比特的 MAC地址来进行识别, 采用较少比特数的标识 即可实现。因此可以预先为不同分布式系统的各个 AP设备设置唯一 AP标识。
该 AP标识可以包括: 分布式系统索引信息以及 AP索引信息, 其还可以 包括单播指示索引信息。 同一分布式系统中的 AP设备的 AP标识中分布式系 统索引信息相同。
根据实际应用情况,该分布式系统索引信息可以采用 6比特位串即可区分 不同分布式系统, AP索引信息可以采用 9比特位串即可区分同一分布式系统 中的不同 AP。 单播指示索引信息用于指示数据传输方式, 可以用 1比特位串 表示, 为 1时, 表示当前为单播传输方式, 本申请技术方案主要适用于单播传 输方式, 由此可知, AP标识可以采用 2字节、 16比特的标识符号即可实现区 分。
当然还可以仅为同一分布式系统中的各个 AP设备设置 AP标识。
STA标识和 AP标识字节数可以不同, 但均小于 MAC地址字节数。
当所述发送设备为 STA设备时, 所述发送设备的第一索引标识为 STA标 识, 其中, 位于同一无线子网内的 STA设备分别具有唯一站点标识; 或, 当所述发送设备为 AP设备时,所述发送设备的第一索引标识为 AP标识, 其中, 位于不同分布式系统中的 AP设备分别具有唯一 AP标识; 或,
当所述接收设备为 STA设备时, 所述接收设备的第一索引标识为 STA标 识; 或,
当所述接收设备为 AP设备时,所述接收设备的第一索引标识为 AP标识。 步骤 103: 将所述发送设备的第一索引标识和所述接收设备的第一索引标 识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头 封装, 形成所述 MAC层数据报头。
获取的发送设备的第一索引标识和接收设备的第一索引标识由于具有唯 一性, 因此可以替代 MAC地址, 作为发送设备和接收设备的索引地址。
因此, 可以将发送设备的第一索引标识和所述接收设备的第一索引标识, 作 MAC层数据 ^艮头地址域中对应的相应地址,至少包括发送地址和接收地址。 而根据不同数据传输方向, 还可以确定出源地址和目的地址等, 对于地址域中承载的其他地址, 可以仍采用设备的 MAC地址表示, 当然 也可以采用其他的实现方式, 在下面实施例中会详细介绍。
按照第一索引标识确定的地址封装成的数据报头,假设索弓 ]标识可以采用 2字节表示, 此时地址域承载地址中的至少发送地址和接收地址可以采用 2字 节表示, 那么相较于 6字节的 MAC地址, MAC层数据报头至少可以节约 8 字节空间, 大大减少了报头开销。。
在本实施例中, 确定出 MAC层待传输数据的发送设备和接收设备, 并获 取该发送设备的第一索引标识和接收设备的第一索引标识, 作为 MAC层报头 地址域中的相应地址, 按照该相应地址封装到 MAC层数据报头中, 由于第一 索引标识代替设备的 MAC地址, 地址占用字节数减少, 减小了报头开销, 从 而可以降低功耗。
其中, MAC层数据报头的格式如下表 1所示, 主要包括地址域、 帧控制 域、 服务质量控制、 持续时间标识 ID。 本申请主要描述的为地址域承载的地 址的确定。 MAC层数据报头中除地址域的其他域信息可以按照现有技术确定, 本申请并不对此进行限定。
表 1
Figure imgf000021_0001
帧控制域包括 "To Ds"和" From Ds"两个 DS字段, 分别去取值为 0或 1 , 用于表示数据传输方向。
地址域主要包括四个地址字段 , 用于承载不同地址。例如地址 1承载接收 地址, 地址 2 7|载发送地址。
由于源设备和发送设备可能相同, 目的设备和接收设备可能相同,使得源 地址和发送地址相同, 目的地址和接收地址相同, 此时源地址和发送地址可以 用同一地址表示, 目的地址和接收地址可以用同一地址表示,承载于同一地址 段中。
因此本申请实施例中,将所述发送设备的第一索引标识和所述接收设备的 第一索引标识,作为 MAC层数据报头地址域中的相应地址可以包括如下几种 情况:
当所述待传输数据的源设备和所述发送设备相同、目的设备和所述接收设 备相同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的 发送地址和源地址, 将所述接收设备的第一索引标识作为 MAC层数据报头地 址域中的目的地址和接收地址; 或,
当所述待传输数据的源设备和所述发送设备相同、目的设备和所述接收设 备不同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的 发送地址和源地址、 将所述接收设备的第一索引标识以及所述目的设备的 MAC地址, 分别作为 MAC层数据 ^艮头地址域中的接收地址和目的地址; 或, 当所述待传输数据的源设备和所述发送设备不同、目的设备和所述接收设 备相同时, 分别将所述发送设备的第一索引标识以及所述源设备的 MAC地址 作为 MAC层数据报头地址域中的发送地址和源地址、将所述接收设备的第一 索引标识作为 MAC层数据报头地址域中的目的地址和接收地址。
现有技术中, 帧控制域、 服务质量控制域以及持续时间标识分别需占用 2 字节, 地址域包括四个地址字段时, 采用 MAC地址需占用 6字节, MAC才艮 头开销最多需占用 32字节。
而采用本实施例的技术方案, 当发送设备和接收设备属于同一无线子网 时,假设第一索引标识可以采用 2字节表示,按照该本申请实施例封装成的数 据报头,地址域中至少发送地址和接收地址可以采用 2字节表示, 那么相较于 6字节的 MAC地址, MAC层数据报头至少可以节约 8字节空间, 大大减少了 报头开销。
且当发送设备与接收设备位于同一无线子网时, 即在 DS域的" To Ds"和 "From Ds"分别为 "00""0 "10"时,地址域需要三个地址段即可,第四个地址段 可以省略。 此时可以节约 12字节的空间。
尤其当 To Ds"和" From Ds"为" 00", 即发送设备和接收设备均为同一无线 子网中 STA设备时, 此时发送设备即为源设备, 接收设备即为目的设备, 地 址域只需两个地址段即可。 MAC层数据报头最多可节约 20字节, 如下表 2 所示。
表 2 地址 1 地址 2
帧控制域 ID 序列控制域服务质量控制
( 2字节) ( 2字节) 图 2为本申请实施例一种数据报头封装方法另一个实施例的流程图,该方 法可以包括以下几个步骤:
步骤 201 : 确定媒体访问控制 MAC层待传输数据的通信关联设备。
其中, 该通信关联设备包括发送设备和接收设备;
步骤 202: 判断该发送设备和该接收设备是否位于同一无线子网, 若是, 执行步骤 203 , 若否, 执行步骤 204。
步骤 203: 确定所述发送设备的第一索引标识以及所述接收设备的第一索 引标识。
其中, 发送设备可能为 STA设备或 AP设备, 接收设备可能为 STA设备 或 AP设备。
因此, 当所述发送设备为 STA设备时, 所述发送设备的第一索引标识为 STA标识; 或,
当所述发送设备为 AP设备时,所述发送设备的第一索引标识为 AP标识, 或,
当所述接收设备为 STA设备时, 所述接收设备的第一索引标识为 STA标 识; 或,
当所述接收设备为 AP设备时,所述接收设备的第一索引标识为 AP标识。 其中, 同一无线子网中的各个 STA设备具有唯一 STA标识。
位于不同分布式系统中的 AP设备具有唯一 AP标识。
该 STA标识是 AP设备为同一无线子网内的各 STA设备预先设置并分配 的; 所述 AP标识是为不同分布式系统中各个 AP设备预先设置的。
步骤 204: 将所述发送设备的 STA标识或 AP标识, 以及所述接收设备的 STA标识或 AP标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该 相应地址进行报头封装, 形成所述 MAC层数据报头。
其中, 根据发送设备的 STA标识或 AP标识, 以及所述接收设备的 STA 标识或 AP标识, 至少可以确定出 MAC层数据报头地址域中的发送地址和接 收地址。
根据数据的不同传输方向, 当源设备与发送设备相同时,发送设备的 STA 标识或 AP标识即作为 MAC层数据 头地址域中的发送地址和源地址, 此时 发送地址和源地址可以占用地址域中的一个地址字段, 承载该发送设备的 STA标识或 AP标识。
当目的设备与接收设备相同时, 接收设备的 STA标识或 AP标识即作为 MAC层数据报头地址域中的接收地址和目的地址, 此时接收地址和目的地址 可以占用地址域中的一个地址字段, 承载该接收设备的 STA标识或 AP标识。
而当源设备与发送设备不同时, 可以采用源设备的 MAC地址作为 MAC 层数据报头地址域中的源地址, 占用一个地址字段, 承载该源设备的 MAC地 址。
目的设备与接收设备不同时, 可以采用目的设备的 MAC地址作为 MAC 层数据报头地址域中的目的地址, 占用一个字段, 承载该目的设备的 MAC地 址。
步骤 205: 获取所述发送设备的 AP标识和所述接收设备的 AP标识。 步骤 206:将所述发送设备的 AP标识和所述接收设备的 AP标识作为 MAC 层数据报头地址域中的发送地址和接收地址,并根据所述发送地址和所述接收 地址进行报头封装, 形成所述 MAC层数据报头。
发送设备与接收设备位于不同无线子网时, 此时,发送设备和接收设备均 为 AP设备。 而不同分布式系统中的 AP设备可以采用 AP标识进行区分。 因 此可以将发送设备的 AP标识以及接收设备的 AP标识, 作为 MAC层数据报 头地址域中的发送地址和接收地址, 代替 MAC地址作为索引地址, 可以节省 地址域占用的字节空间。
发送设备和接收设备位于不同无线子网时,此时源设备和目的设备可以分 别采用 MAC地址作为地址域中对应的源地址和目的地址, 此时 MAC层数据 报头地址域需要四个地址段分别承载发送设备、接收设备、 源设备以及目的设 备的索引地址。
按照本实施例的技术方案,假设索引标识均为 2字节, "To Ds"和" From Ds" 为" 00"时, MAC层数据报头的地址域的两个地址段均为 2字节, 第三地址段 和第四个地址段省略, 则可以节省 20字节。 其中, 第三地址段承载发送设备 和接收设备所在无线子网的无线子网标识, 由于无线子网标识为 AP设备的索 弓 1地址,因此可以采用本实施例中 AP标识代替 MAC地址作为无线子网标识, 此时地址域最多可节省 18字节。
"To Ds"和" From Ds"为" 01"时, MAC层数据报头的地址域中发送地址和 接收地址均为 2字节, 源地址为 6字节, 第四个地址段省略, 可以节省 14字 节。
"To Ds"和" From Ds"为" 01"时, MAC层数据报头的地址域中发送地址和 接收地址均为 2字节, 目的地址为 6字节, 第四个地址段省略, 可以节省 14 字节。
"To Ds"和" From Ds"为" 11"时, MAC层数据报头的地址域中发送地址和接 收地址均为 2字节, 目的地址和源地址为 6字节, 可以节省 8字节。
在本实施例中, 进行待传输数据的 MAC层数据报头封装时, 针对 MAC 层数据报头地址域所需承载的地址,根据发送设备和接收设备是否位于同一无 线子网, 以及发送设备和接收设备的设备类型, 可以分别获取发送设备的第一 索引标识和接收设备的第一索引标识, 该第一索引标识可以是 STA标识或者 AP标识,从而可以用第一索引标识代替 MAC地址,作为 MAC层数据报头地 址域承载的地址, 由于第一索引标识字节数小于 MAC地址字节数, MAC层 数据报头地址域占用空间减小, 使得 MAC层数据报头开销减小, 从而最终形 成的无线局域网数据报头的报头开销减小, 有利于降低功耗。
上述对应图 1以及图 2所示的数据报头封装方法实施例中,主要描述的为 MAC层数据报头的封装, 应用于无线局域网中的发送设备, 该发送设备可以 是 STA设备或者 AP设备。
由于无线局域网的基本架构包括多个网络分层。发送设备和接收设备进行 输数据的各个网络分层数据报头是从网络分层的上层至下层依次封装生成,因 此 MAC层的待传输数据即是接收的来自逻辑链路控制层的数据, 当无线局域 网连接互联网时, 该逻辑链路控制层的数据即是接收的来自网络层的数据。
由于数据在发送时需经过各个网络分层, 添加相应网络分层的数据报头。 因此本申请中, 确定媒体访问控制 MAC层的待传输数据之前, 如图 3所示, 还可以包括以下几个步骤:
步骤 301: 确定所述待传输数据的网络层报头的报头信息;
无线局域网接入互联网, 由上至下, 网络架构包括应用层、 传输层、 网络 层、 逻辑链路控制层、 MAC层、 物理层。
因此网络层的待传输数据即是接收的来自传输层的数据。
网络层的待传输数据需要添加网络层报头后传输至逻辑链路控制层,逻辑 链路控制层添加链路层数据报头后才传输至 MAC层。
网络层报头的报头主要包括以下域:
TF: Traffic Class和 Flow Label业务类型和流标签;
NH: Next Header下一个 4艮头;
HLIM: Hop Limit跳数限制;
CID: Context Identifier Extension上下文标识扩展;
SA: Source Address源地址;
SAM: Source Address Mode源地址模式;
M: Multicast Compression多播压缩;
DA: Destination Address目的地址;
DAM: Destination Address Mode目的地址模式;
网络层报头中的源地址是指源 IP地址, 和目的地址是指目的 IP地址。 步骤 302: 按照数据报头压缩规则, 确定所述报头信息中的待传输信息。 报头压缩规则规定了网络层报头中哪些信息可以传输, 哪些信息可以省 略。
该报头压缩规则可以包括:
( 1 )才艮头中通信连接过程中保持不变的域可以压缩;
(2)报头中变化的但能够预知的域可以压缩;
(3)报头中由逻辑链路控制层可获知的域可以压缩。
因此步骤 302 中确定的待传输信息即是包括所述报头信息中通信连接过 程中变化的信息、 由逻辑链路控制层不能够获知的信息、或者不能够预知的信 比如, 网络层中的源 IP地址和目的 IP地址, 可以采用本地链接地址, 由 前缀和接口标识符表示。 通常一个无线子网内, 前缀都是相同的; 可以使用接 口标识符来区分不同设备的 IP地址。
以 IP地址为 IPv6地址为例:
IPv6本地链接地址 = FE80::/64(接口标识符)。
接口标识符为 64比特, 因此确定出接口标识符即可以确定出 Ipv6地址。 接口标识符的生成方法主要有两种:
A、 由 802.15.4标准的 64 bit扩展 MAC地址形成。
B、 按照下述公式生成:
zero(24 bit)+0xFFFE+zero(8 bit) +短地址(16 bit)。
即由 32比特的零和 16比特的短地址生成。
其中, 该短地址即是指 MAC层所确定的设备的第一索引标识。 源设备的 Ipv6地址中, 该短地址即是指源设备的第一索引标识。 目的设备的 Ipv6地址 中, 该短地址即是指目的设备的第一索引标识。 第一索引标识的相关描述可以 参见上述实施例中所述。
由此可得,网络层报头信息中的源地址和目的地址其可以根据地址生成方 式获知, 因此待传输信息中可以不包括该地址信息, IP地址为 IPv6地址时, 可以使得网络层报头至少压缩为 2字节, 节省 38字节的空间, 大大减少了报 头开销。
步骤 303: 根据所述待传输信息封装所述网络层数据报头, 并添加到所述 待传输数据头部之后传输至逻辑链路控制层。
步骤 304: 将逻辑链路控制层接收的所述待传输数据添加链路层数据报头 后传输至 MAC层。
MAC层接收到逻辑链路控制层的所述待传输数据即可按照上述几个实施 例中所述的方法生成 MAC层的报头信息。
此外, 发送设备将第一索引标识替代设备的 MAC地址后, 接收设备接收 到待传输数据后, 可以从中解封装出 MAC层数据报头地址域中的地址, 由于 MAC层数据报头地址域中的地址至少部分为第一索引标识, 因此, 参见图 4, 本申请实施例还提供了一种数据报头解封装方法一个实施例的流程图,使得接 收设备能够获取数据对应通信关联设备的 MAC地址。
该方法可以包括以下几个步骤:
步骤 401 : 获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数 据报头。
步骤 402: 当所述 MAC层接收数据的发送设备和所述接收设备位于同一 无线子网,获取地址域中的所述发送设备的第一索引标识以及所述接收设备的 第一索引标识。
其中, 所述第一索引标识字节数小于 MAC地址字节数。
发送设备的第一索引标识也即指地址域承载的发送地址,接收设备的第一 索引标识即为地址域承载的接收地址。
因此可以首先确定出地址域承载的发送地址和接收地址,该发送地址即为 发送设备的第一索引标识, 该接收地址即为接收设备的第一索引标识。
步骤 403: 根据各个第一索引标识与各个设备的 MAC地址的对应关系, 确定该发送设备和接收设备的 MAC地址。
发送设备可以存储并管理各个第一索引标识和各个设备的 MAC地址的一 一对应关系。在向接收设备发送数据时, 可以携带该各个第一索引标识和各个 设备的 MAC地址的对应关系。 当然该对应关系也可以单独发送。
根据该各个第一索引标识和各个设备的 MAC地址的对应关系, 即可以获 得该发送设备和接收设备的 MAC地址。
当源设备与发送设备相同, 或者目的设备与接收设备相同时, 即可获得源 设备的 MAC地址, 以及目的设备的 MAC地址。
接收设备确定出设备的 MAC地址, 即可根据该 MAC地址进行后续的数 据传输。
图 5示出了本申请实施例一种数据报头封装方法又一个实施例的流程图, 该方法可以包括以下几个步骤:
步骤 501 : 确定 MAC层待传输数据的通信关联设备, 所述通信关联设备 包括发送设备和接收设备。
步骤 502: 当所述发送设备和 /或所述接收设备为 AP设备时, 获取所述发 送设备的第二索引标识和 /或所述接收设备的第二索引标识。 发送设备和接收设备至少有一个可能为 AP设备, 或者同时为 AP设备。 因此, 步骤 502即是当所述发送设备或所述接收设备为 AP设备时, 确定 所述发送设备的第二索引标识或所述接收设备的第二索引标识,所述发送设备 和所述接收设备分别具有唯一第二索引标识, 所述第二索引标识字节数小于 MAC地址字节数; 或者,
当所述发送设备和所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识和所述接收设备的第二索引标识。
发送设备和所述接收设备分别具有唯一第二索引标识,所述第二索引标识 字节数小于 MAC地址字节数。
步骤 503: 将所述发送设备的第二索引标识和 /或接收设备的第二索引标 识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头 封装, 形成所述 MAC层数据报头。
当所述发送设备或所述接收设备为 AP设备时, 即将所述发送设备的第二 索引标识或所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的 相应地址, 并按照该相应地址进行报头封装,形成所述 MAC层数据报头; 或, 当所述发送设备和所述接收设备为 AP设备时, 即将所述发送设备的第二 索引标识和所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的 相应地址, 并按照该相应地址进行报头封装, 形成所述 MAC层数据报头
本实施例中, 若发送设备和接收设备至少一个为 AP设备时, 可以将 AP 设备的第二索引标识代替 MAC地址, 作为发送设备和 /或接收设备的索引地 址, 承载与 MAC层数据报头地址域中, 分别作为发送地址和接收地址。
同一分布式系统中或者不同分布式系统中不同 AP设备分别具有唯一第二 索引标识, 因此该发送设备和 /或接收设备分别具有唯一第二索引标识。
其中, 该第二索引标识可以具体为上述实施例中所述的 AP标识, 是为不 同分布式系统中各个 AP设备预先设置的。
该 AP标识可以包括分布式系统索引信息、 AP索引信息以及单播指示索 引信息。同一分布式系统中的 AP设备的 AP标识中分布式系统索引信息相同。
由于分布式系统中 AP数量也是有限的,同样不需要 48比特的 MAC地址 来进行识别, 采用较少比特数的标识即可实现。 因此可以预先为不同分布式系 统的各个 AP设备设置唯一 AP标识。
根据实际应用情况,该分布式系统索引信息可以采用 6比特位串即可区分 不同分布式系统, AP索引信息可以采用 9比特位串即可区分同一分布式系统 中的不同 AP。 单播指示索引信息用于指示数据传输方式, 可以用 1比特位串 表示, 为 1时, 表示当前为单播传输方式, 本申请技术方案主要适用于单播传 输方式, 由此可知, AP标识可以采用 2字节、 16比特的标识符号即可实现区 分。
在本实施中,进行待传输数据的 MAC层数据报头封装时,针对确定 MAC 层数据报头地址域所需承载的地址, 根据待传输数据的发送设备和 /接收设备 是否为 AP设备,可以分别获取发送设备的第二索引标识和 /或接收设备的第二 索引标识, 从可以将第二索引标识代替 MAC地址, 作为 MAC层数据报头地 址域承载的相应地址, 即发送地址和接收地址。 由于第二索引标识字节数小于 MAC地址字节数, MAC层数据报头地址域占用空间减小, 使得 MAC层数据 报头开销减小,从而最终形成的无线局域网数据报头的报头开销减小,有利于 降低功耗。
此外,在将发送设备和 /或接收设备采用第二索引标识替代 MAC地址,作 为 MAC层数据报头地址域中的相应地址后, 还可以当发送设备和接收设备位 于同一无线子网时, 将发送设备和 /接收设备中的 STA设备, 采用 STA标识代 替其 MAC地址, 作为 MAC层数据报头地址域中的相应地址后, 从而进一步 减小报头开销。 在无线局域网内, AP设备会定时广播发送信标 beacon帧, 用来通知 AP 的存在, STA设备通过扫描获得 beacon帧, 从而得知 AP设备的存在, 以确 定是否与其关联。 beacon帧中包括无线子网标识, 即 BSSID或 SSID ( Service Set Identifier, 服务集标识)。
图 5所示的实施例中, AP设备预先设置有第二索引标识, 本申请中, AP 设备可以将其第二索引标识通过 beacon帧进行广播,以通知 STA设备以及其 他 AP设备。
但是由于第二索引标识的字节数较少, 可以分配的 AP设备有限, 因此在 为 AP设备设置第二索引标识后, 还可以检测该第二索引标识是否可用。 具体的:
当待传输数据的发送设备为 STA设备时:
检测关联的 AP设备的 AP标识和接收到的广播信息中包括的 AP标识相 同, 且关联的 AP设备的基石出服务集标识 BSSID或服务集标识 SSID和接收到 的广播信息中包括的 BSSID或 SSID不同时, 向关联的 AP设备发送地址冲突 信息。
发送设备为 STA设备时, 其与 AP设备关联后, 即会获知 AP的第二索引 标识以及 BSSID或 SSID, 同时 STA设备还可以扫描获取其他 AP的设备第二 索引标识以及 BSSID或 SSID, 若其扫描获取的 AP设备的第二索引标识与其 关联的 AP的设备标识相同, 且 BSSID或 SSID不同, 则说明其扫描的 AP设 备与其关联的 AP不是同一 AP设备, 但由于第二索引标识相同, 说明第二索 引标识设置出现冲突, 则向其关联的 AP反馈地址冲突信息。
或者, 当所述待传输数据的发送设备为 AP设备时:
检测接收到的广播信息包括的 AP标识与所述发送设备的 AP标识相同, 或者接收到关联的 STA设备发送的地址冲突消息时, 说明地址冲突, 则重新 设置 AP标识。
该地址检测的操作, 可以实时执行或者定期执行, 以保证数据传输的正确 性。 图 5所示实施例描述的数据报头封装方法, 主要是 MAC层的数据报头的 封装。 而由于数据在发送时需经过各个网络分层, 添加相应网络分层的数据报 头。 因此本申请中, 确定媒体访问控制 MAC层的待传输数据之前, 还可以包 括如图 3所示实施例的网络层数据报头的封装。
此外, 按照图 5 所示实施例描述的数据报头封装方法进行数据报头封装 后,接收设备从接收到的数据中可以解封装出 MAC层数据报头地址域中的地 址, 由于 MAC层数据报头地址域中的地址至少部分为第二索引标识, 因此, 参见图 6, 本申请实施例还提供了一种数据报头解封装方法另一个实施例的流 程图, 使得接收设备能够获取数据对应通信关联设备的 MAC地址。 该方法可以包括以下几个步骤:
步骤 601 : 获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数 据报头。
步骤 602: 当所述 MAC层接收数据发送设备和 /或所述接收设备为 AP设 备时, 获取地址域中的所述发送设备的第二索引标识和 /或接收设备的第二索 引标识。
其中, 发送设备和接收设备至少有一个可能为 AP设备, 或者同时为 AP 设备。
因此, 步骤 602即是当所述发送设备或所述接收设备为 AP设备时, 确定 所述发送设备的第二索引标识或所述接收设备的第二索引标识, 或者,
当所述发送设备和所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识和所述接收设备的第二索引标识。
发送设备和所述接收设备分别具有唯一第二索引标识,所述第二索引标识 字节数小于 MAC地址字节数。
发送设备的第二索引标识也即是指地址域承载的发送地址,接收设备的第 二索引标识即为地址域承载地址中的接收地址。
因此可以首先确定出地址域承载的发送地址和接收地址,该发送地址即为 发送设备的第二索引标识, 该接收地址即为接收设备的第二索引标识。
步骤 603: 根据各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所述发送设备和 /或所述接收设备的 MAC地址。
发送设备可以存储并管理不同第二索引标识和不同设备的 MAC地址的一 一对应关系。在向接收设备发送数据时, 可以携带该各个第二索引标识和各个 设备的 MAC地址的对应关系。 当然该对应关系也可以单独发送。
根据该各个第二索引标识和各个设备的 MAC地址的对应关系, 即可以获 得该发送设备和 /或接收设备的 MAC地址。
即, 当所述发送设备或所述接收设备为 AP设备时, 即根据各个第二索引 标识与各个设备的 MAC地址的对应关系, 确定所述发送设备或所述接收设备 的 MAC地址; 或,
当所述发送设备和所述接收设备为 AP设备时, 即根据各个第二索引标识 与各个设备的 MAC地址的对应关系,确定所述发送设备和 /或所述接收设备的 MAC地址。
接收设备确定出不同设备的 MAC地址, 即可根据该不同设备的 MAC地 址进行后续的数据传输。
对于前述的各方法实施例, 为了简单描述,故将其都表述为一系列的动作 组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制, 因为依据本申请, 某些步骤可以采用其他顺序或者同时进行。 其次, 本领域技 术人员也应该知悉,说明书中所描述的实施例均属于优选实施例, 所涉及的动 作和模块并不一定是本申请所必须的。
图 7为本申请实施例一种数据报头封装装置一个实施例的结构示意图,该 装置可以包括:
设备确定模块 701 , 用于确定媒体访问控制 MAC层待传输数据的通信关 联设备, 所述通信关联设备包括发送设备和接收设备。
第一标识获取模块 702, 用于当所述发送设备和所述接收设备位于同一 无线子网,确定所述发送设备的第一索引标识以及所述接收设备的第一索引标 识。
所述发送设备和所述接收设备具有唯一第一索引标识,所述第一索引标识 字节数小于 MAC地址字节数。
待传输数据在同一无线子网内传输时,发送设备和接收设备均处于同一无 线子网, 而位于同一无线子网内的设备数量是有限的, 无需用采用 48比特的 MAC地址来进行识别, 采用较少比特的索引标识即可识别。 例如, 设备有 8 个时, 采用至少 3个比特的位串即可实现对 8个设备的区分。
因此, 本实施例中, 若待传输数据的发送设备以及接收设备位于同一无线 子网时, 则获取发送设备和接收设备各自的第一索引标识。
其中,作为一种可能的实现方式, 该第一索引标识为所述发送设备和所述 接收设备所在无线子网的 AP设备预先设置并分配的。
同一无线子网内的不同设备包括 STA设备以及 AP设备。 因此 AP设备可 以为其自己以及与其关联的 STA设备预先设备并分配不同第一索引标识。
作为另一种可能的实现方式,所述第一索引标识可以为用于索引设备类型 为 STA的设备的 STA标识或者索引设备类型为 AP的设备的 AP标识; 所述 STA标识是 AP设备为同一无线子网内的各 STA设备预先设置并分配的; 所 述 AP标识是为不同分布式系统中各个 AP设备预先设置的。
该 AP标识可以包括分布式系统索引信息以及 AP索引信息, 其还可以包 括单播指示索引信息。
此时, 当所述发送设备为 STA设备时, 所述发送设备的第一索引标识为 STA标识; 或,
当所述发送设备为 AP设备时,所述发送设备的第一索引标识为 AP标识, 或,
当所述接收设备为 STA设备时, 所述接收设备的第一索引标识为 STA标 识; 或,
当所述接收设备为 AP设备时,所述接收设备的第一索引标识为 AP标识。 其中, 同一无线子网中的各个 STA设备具有唯一 STA标识。
位于不同分布式系统中的 AP设备具有唯一 AP标识。
第一地址生成模块 703 , 用于将所述发送设备的第一索引标识和所述接收 设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址。
根据发送设备和接收设备各自的第一索引标识, 可以替代 MAC地址, 至 少可以作为 MAC层数据报头地址域承载的发送地址和接收地址。
对于地址域中承载的其他地址, 可以仍采用设备的 MAC地址表示.
其中, 作为一种可能的实现方式, 该第一地址生成模块 703可以包括: 第一地址生成子模块 7031 , 当所述待传输数据的源设备和所述发送设备 相同、 目的设备和所述接收设备相同时,将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的第一索引 标识作为 MAC层数据报头地址域中的目的地址和接收地址;
第二地址生成子模块 7032, 用于当所述待传输数据的源设备和所述发送 设备相同、 目的设备和所述接收设备不同时,将所述发送设备的第一索引标识 作为 MAC层数据报头地址域中的发送地址和源地址、将所述接收设备的第一 索引标识以及所述目的设备的 MAC地址, 分别作为 MAC层数据报头地址域 中的接收地址和目的地址; 第三地址生成子模块 7033 , 用于当所述待传输数据的源设备和所述发送 设备不同、 目的设备和所述接收设备相同时, 分别将所述发送设备的第一索引 标识以及所述源设备的 MAC地址作为 MAC层数据 ^艮头地址域中的发送地址 和源地址、将所述接收设备的第一索引标识作为 MAC层数据报头地址域中的 目的地址和接收地址。
第一报头封装模块 704, 用于按照所述第一地址生成模块得到的地址进行 报头封装, 形成所述 MAC层数据报头。
在本实施例中, 通过确定出 MAC层待传输数据的发送设备和接收设备, 并获取该发送设备的第一索引标识和接收设备的第一索引标识, 作为 MAC层 报头地址域中的相应地址, 按照该相应地址封装到 MAC层数据报头中, 由于 第一索引标识代替 MAC地址, 地址占用字节数减少, 减小了报头开销, 从而 可以降低功耗。
图 8为本申请实施例一种数据报头封装装置另一个实施例的结构示意图, 该装置可以包括:
设备确定模块 801 , 用于确定媒体访问控制 MAC层待传输数据的通信关 联设备, 所述通信关联设备包括发送设备和接收设备。
第一标识获取模块 802, 用于当所述发送设备和所述接收设备位于同一 无线子网,确定所述发送设备的第一索引标识以及所述接收设备的第一索引标 识。
其中, 所述第一索引标识可以用于索引设备类型为 STA的设备的 STA标 识或索引设备类型为 AP的设备的 AP标识; 所述 STA标识是 AP设备为同一 无线子网内的各 STA设备预先设置并分配的;所述 AP标识是不同分布式系统 中各个 AP设备预先设置的。
该 AP标识包括分布式系统索引信息、 AP索引信息, 还可以包括单播指 示索引信息。
因此具体的, 当所述发送设备为 STA设备时, 所述发送设备的第一索引 标识为 STA标识; 或,
当所述发送设备为 AP设备时,所述发送设备的第一索引标识为 AP标识, 或, 当所述接收设备为 STA设备时, 所述接收设备的第一索引标识为 STA标 识; 或,
当所述接收设备为 AP设备时,所述接收设备的第一索引标识为 AP标识。 其中, 同一无线子网中的各个 STA设备具有唯一 STA标识。
位于不同分布式系统中的 AP设备具有唯一 AP标识。
第一地址生成模块 803 , 用于将所述发送设备的第一索引标识和所述接收 设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址。
其中, 作为一种可能的实现方式, 该第一地址生成模块 803可以包括: 第一地址生成子模块 8031 , 当所述待传输数据的源设备和所述发送设备 相同、 目的设备和所述接收设备相同时,将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的第一索引 标识作为 MAC层数据报头地址域中的目的地址和接收地址; 或,
第二地址生成子模块,用于当所述待传输数据的源设备和所述发送设备相 同、 目的设备和所述接收设备不同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的发送地址和源地址、 将所述接收设备的第一索引 标识以及所述目的设备的 MAC地址, 分别作为 MAC层数据报头地址域中的 接收地址和目的地址 8032; 或,
第三地址生成子模块 8033 , 用于当所述待传输数据的源设备和所述发送 设备不同、 目的设备和所述接收设备相同时, 分别将所述发送设备的第一索引 标识以及所述源设备的 MAC地址作为 MAC层数据 ^艮头地址域中的发送地址 和源地址、将所述接收设备的第一索引标识作为 MAC层数据报头地址域中的 目的地址和接收地址。
第一报头封装模块 804, 用于按照所述第一地址生成模块得到的地址进行 报头封装, 形成所述 MAC层数据报头。
第二标识获取模块 805 , 用于当所述发送设备和所述接收设备位于不同无 线子网时, 获取所述发送设备的 AP标识和所述接收设备的 AP标识,
第二地址生成模块 806, 用于将所述发送设备的 AP标识和所述接收设备 的 AP标识作为 MAC层数据报头地址域中的发送地址和接收地址;
第二报头封装模块 807, 用于按照所述第二地址生成模块得到的地址进行 报头封装, 形成所述 MAC层数据报头。
发送设备与接收设备位于不同无线子网时, 此时,发送设备和接收设备均 为 AP设备。 而不同分布式系统中的 AP设备可以采用 AP标识进行区分。 因 此可以将发送设备的 AP标识以及接收设备的 AP标识, 作为 MAC层数据报 头地址域中的发送地址和接收地址, 代替 MAC地址作为索引地址, 可以节省 地址域占用的空间。
在本实施例中, 进行待传输数据的 MAC层数据报头封装时, 针对 MAC 层数据报头地址域所需承载的地址,根据发送设备和接收设备是否位于同一无 线子网, 以及发送设备和接收设备的设备类型, 可以分别获取发送设备的第一 索引标识和接收设备的第一索引标识, 该第一索引标识可以是 STA标识或者 AP标识,从而可以用第一索引标识代替 MAC地址,作为 MAC层数据报头地 址域承载的地址, 由于第一索引标识字节数小于 MAC地址字节数, MAC层 数据报头地址域占用空间减小, 使得 MAC层数据报头开销减小, 从而最终形 成的无线局域网数据报头的报头开销减小, 有利于降低功耗。
图 9为本申请实施例一种数据报头封装装置又一个实施例的结构示意图, 该装置可以包括:
报头信息确定模块 901 , 用于确定待传输数据的网络层报头的报头信息。 传输信息确定模块 902, 用于按照数据报头压缩规则, 确定所述报头信息 中的待传输信息。
该报头压缩规则可以包括:
( 1 )报头中通信连接过程中保持不变的域可以压缩;
(2)报头中变化的但能够预知的域可以压缩;
(3)报头中由逻辑链路控制层可获知的域可以压缩。
因此,所述传输信息确定模块 903确定待传输信息即包括所述报头信息中 通信连接过程中变化的信息、 由逻辑链路控制层不能够获知的信息、或者不能 够预知的信息。
第一数据传输模块 903 , 用于根据所述待传输信息封装所述网络层数据报 头, 并添加到所述待传输数据头部之后传输至逻辑链路控制层。
第二数据传输模块 904, 用于将逻辑链路控制层接收的所述待传输数据添 加链路层数据报头后传输至 MAC层。
由于无线局域网的基本架构包括多个网络分层。发送设备和接收设备进行 输数据的各个网络分层数据报头是从网络分层的上层至下层依次封装生成,因 此 MAC层的待传输数据即是接收的来自逻辑链路控制层的数据, 当无线局域 网连接互联网时, 该逻辑链路控制层的数据即是接收的来自网络层的数据。
因此待传输数据在进行 MAC层数据报头封装之前, 该待传输数据可以通 过本实施例中方案进行网络层数据报头以及链路层数据报头的封装,从而在将 添加有网络层数据报头以及链路层数据报头的待传输数据传输至 MAC层。
设备确定模块 905,用于确定所述第二数据传输模块 904传输至所述 MAC 层待传输数据的通信关联设备, 所述通信关联设备包括发送设备和接收设备; 第一标识获取模块 906, 用于当所述发送设备和所述接收设备位于同一 无线子网,获取所述发送设备的第一索引标识以及所述接收设备的第一索引标 识, 所述发送设备和所述接收设备具有唯一第一索引标识, 所述第一索引标识 字节数小于 MAC地址字节数;
第一地址生成模块 907, 用于将所述发送设备的第一索引标识和所述接收 设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址。
第一报头封装模块 908, 用于按照所述第一地址生成模块得到的地址进行 报头封装, 形成所述 MAC层数据报头。
此外, 该装置还可以包括:
第二标识获取模块,用于当所述发送设备和所述接收设备位于不同无线子 网时, 获取所述发送设备的 AP标识和所述接收设备的 AP标识,
第二地址生成模块, 用于将所述发送设备的 AP 标识和所述接收设备的 AP标识作为 MAC层数据 ^艮头地址域中的发送地址和接收地址;
第二报头封装模块,用于按照所述第二地址生成模块得到的地址进行报头 封装, 形成所述 MAC层数据报头。
在本实施例中,待传输数据在网络层按照报头压缩规则可以只将待传输信 息封装到网络层数据报头中,从而可以减小网络层数据报头占用的空间,待传 输数据在 MAC层, 可以根据发送设备和接收设备是否位于同一无线子网, 采 用第一索引标识代替 MAC地址, 作为 MAC层数据报头地址域承载的地址, 第一索引标识字节数小于 MAC地址字节数, 从而可以减少 MAC层数据报头 占用的空间, 从而可以使得待传输数据封装的无线局域网数据报头开销减小, 可以降低功耗。
上述图 7〜图 9所示实施例的数据报头封装装置, 在实际应用中可以应用 于发送设备中,该发送设备可以为 STA设备或者 AP设备,通过部署本申请数 据报头封装装置的设备, 可以使得待传输数据的数据报头的开销减小, 可以降 低设备功耗。
通过以上描述可知,本领域的技术人员可以清楚地了解到本申请可借助软 件加必需的通用硬件平台的方式来实现, 因此参见图 10, 本申请还提供了一 种数据报头封装设备的一个实施例, 该数据报头封装设备至少包括存储器
1001和通过通信总线与所述存储器 1001连接的处理器 1002,
其中, 所述存储器 1001用于存储一组第一数据报头封装程序; 该存储器 可以是是高速 RAM存储器,也可能是非易失性存储器( non-volatile memory ), 例如至少一个磁盘存储器等。
所述处理器 1002用于调用所述存储器存储的所述一组第一数据报头封装 程序, 执行如下操作;
确定媒体访问控制 MAC层待传输数据的通信关联设备, 所述通信关联设 备包括发送设备和接收设备;
当所述发送设备和所述接收设备位于同一无线子网,确定所述发送设备的 第一索引标识以及所述接收设备的第一索引标识,所述发送设备和所述接收设 备分别具有唯一第一索引标识, 所述第一索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第一索引标识和所述接收设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。 该处理器可能是一个中央处理器 CPU , 或者是特定集成电路 ASIC ( Application Specific Integrated Circuit ),或者是被配置成实施本发明实施例的 一个或多个集成电路。
与上述图 7、 图 8或图 9所示的数据报头封装装置相对应, 本申请还提供 一种数据报头解封装装置, 参见图 11为本申请实施例一种数据报头解封装装 置一个实施例的结构示意图:
数据获取模块 1101 , 用于获取 MAC层接收数据, 并解封装所述 MAC层 接收数据。
第一报头信息获取模块 1102,用于当所述 MAC层接收数据的发送设备和 接收设备位于同一无线子网,获取地址域中的所述发送设备的第一索引标识以 及所述接收设备的第一索引标识。
其中, 所述第一索引标识字节数小于 MAC地址字节数。
发送设备的第一索引标识也即是指地址域承载的发送地址,接收设备的第 一索引标识即为地址域承载地址中的接收地址。
因此可以首先确定出地址域承载的发送地址和接收地址,该发送地址即为 发送设备的第一索引标识, 该接收地址即为接收设备的第一索引标识。
第一地址确定模块 1103 , 用于根据各个第一索引标识与各个设备的 MAC 地址的对应关系, 确定所述发送设备和所述接收设备的 MAC地址。
发送设备可以存储并管理不同第一索引标识和不同设备的 MAC地址的一 一对应关系。在向接收设备发送数据时, 可以携带该各个第一索引标识和各个 设备的 MAC地址的对应关系。 当然该对应关系也可以单独发送。
根据该各个第一索引标识和各个设备的 MAC地址的对应关系, 即可以获 得该发送设备和接收设备的 MAC地址。
当源设备与发送设备相同, 或者目的设备与接收设备相同时, 即可获得源 设备的 MAC地址, 以及目的设备的 MAC地址。
接收设备确定出不同设备的 MAC地址, 即可根据该不同设备的 MAC地 址进行后续的数据传输。
图 11所示实施例的报头解封装装置, 在实际应用中, 具体应用于数据传 输过程中的接收设备中, 该接收设备可以为 STA设备或者 AP设备。 部署图 10所示实施例的该报头解封装置的设备可以将 MAC层数据报头地址域中的 地址, 还原出设备的 MAC地址。 因此, 参见图 12, 本申请还提供了一种报头解封装设备的一个实施例, 该报头解封装设备至少包括存储器 1201 和通过通信总线与所述存储器 1201 连接的处理器 1202。
所述存储器 1201用于存储一组第一数据报头解封装程序; 该存储器可以 是是高速 RAM存储器, 也可能是非易失性存储器(non-volatile memory ), 例 如至少一个磁盘存储器等。 所述处理器 1202用于调用所述存储器存储的所述一组第一数据报头解封 装程序, 执行如下操作:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备和接收设备位于同一无线子网, 获取 所述数据报头地址域中的所述发送设备的第一索引标识以及所述接收设备的 第一索引标识, 所述第一索引标识字节数小于 MAC地址字节数;
根据各个第一索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备以及所述接收设备的 MAC地址。
该处理器可能是一个中央处理器 CPU , 或者是特定集成电路 ASIC
( Application Specific Integrated Circuit ),或者是被配置成实施本发明实施例的 一个或多个集成电路。 图 13 为本申请实施例一种数据报头封装装置又一个实施例的结构示意 图, 该装置可以包括:
设备确定模块 1301 ,用于确定 MAC层待传输数据的通信关联设备, 所述 通信关联设备包括发送设备和接收设备。
第三标识获取模块 1302,用于当所述发送设备或所述接收设备为 AP设备 时,确定所述发送设备的第二索引标识或所述接收设备的第二索引标识, 所述 发送设备和所述接收设备分别具有唯一第二索引标识,所述第二索引标识字节 数小于 MAC地址字节数; 或, 当所述发送设备和所述接收设备为 AP设备时, 确定所述发送设备的第二索引标识和所述接收设备的第二索引标识。
第三地址生成模块 1303 , 用于将所述发送设备的第二索引标识和 /或接收 设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址。 即, 当所述发送设备或所述接收设备为 AP设备时, 将所述发送设备的第 二索引标识或所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中 的相应地址; 或,
当所述发送设备和所述接收设备为 AP设备时, 即将所述发送设备的第二 索引标识和所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的 相应地址。
第三报头封装模块 1304, 用于按照所述第三地址生成模块得到的地址进 行报头封装, 形成所述 MAC层数据报头。
同一分布式系统中或者不同分布式系统中不同 AP设备分别具有唯一第二 索引标识, 因此该发送设备和 /或接收设备分别具有唯一第二索引标识。
其中, 该第二索引标识可以具体为上述实施例中所述的 AP标识, 是为不 同分布式系统中各个 AP设备预先设置的。
该 AP标识可以包括分布式系统索引信息、 AP索引信息以及单播指示索 引信息。
由于分布式系统中 AP数量也是有限的,同样不需要 48比特的 MAC地址 来进行识别, 采用较少比特数的标识即可实现。 因此可以预先为不同分布式系 统的各个 AP设备设置唯一 AP标识。
在本实施中, 进行待传输数据的 MAC层数据报头封装时, 通过本实施例 所述报头封装装置, 针对确定 MAC层数据报头地址域所需承载的地址, 根据 待传输数据的发送设备和 /接收设备是否为 AP设备,可以分别获取发送设备的 第二索引标识和 /或接收设备的第二索引标识, 从可以将第二索引标识代替设 备的 MAC地址, 作为 MAC层数据报头地址域承载的相应地址, 即发送地址 和接收地址。 由于第二索引标识字节数小于 MAC地址字节数, MAC层数据 报头地址域占用空间减小, 使得 MAC层数据报头开销减小, 从而最终形成的 无线局域网数据报头的报头开销减小, 有利于降低功耗。
此外,在将发送设备和 /或接收设备采用第二索引标识替代设备的 MAC地 址, 作为 MAC层数据报头地址域中的相应地址后, 还可以当发送设备和接收 设备位于同一无线子网时, 将发送设备和 /接收设备中的 STA设备, 采用 STA 标识代替其设备的 MAC地址,作为 MAC层数据报头地址域中的相应地址后, 从而进一步减小报头开销。
其中, 由于第二索引标识的字节数较少, 可以分配的 AP设备有限, 因此 在为 AP设备设置第二索引标识后, 还可以检测该第二索引标识是否可用。
当本实施例所述报头封装装置应用于 AP设备中,也即发送设备为 STA设 备, 该装置还可以包括:
第一检测模块, 用于检测关联的 AP设备的 AP标识和接收到的广播信息 中包括的 AP标识相同,且关联的 AP设备的基础服务集标识 BSSID或服务集 标识 SSID和接收到的广播信息中包括的 BSSID或 SSID不同时, 向关联的 AP设备发送地址冲突信息;
当所述报头封装装置应用于 AP设备中, 即所述发送设备为 AP设备时, 所述装置还可以包括:
第二检测模块, 用于检测接收到的广播信息包括的 AP标识与所述发送设 备的 AP标识相同,或者接收到关联的 STA设备发送的地址冲突消息时,重新 设置 AP标识。
图 13所示数据报头封装装置, 在实际应用中, 具体应用于发送设备中, 该发送设备可以为 STA设备或者 AP设备, 部署图 11所示数据报头封装装置 的设备, 可以使得待传输数据的数据报头的开销减小, 可以降低设备功耗。
因此, 参见图 14, 本申请实施例还提供了一种数据报头封装设备的另一 个实施例, 该数据报头封装设备至少包括存储器 1401和通过通信总线与所述 存储器 1401连接的处理器 1402,
所述存储器 1401用于存储一组第二数据报头封装程序; 该存储器可以是 是高速 RAM存储器, 也可能是非易失性存储器(non-volatile memory ), 例如 至少一个磁盘存储器等。
所述处理器 1402用于调用所述存储器 1401存储的所有一组第二数据报头 封装程序, 执行如下操作:
确定 MAC层待传输数据的通信关联设备, 所述通信关联设备包括发送设 备和接收设备;
当所述发送设备或所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识或所述接收设备的第二索引标识,所述发送设备和所述接收设 备分别具有唯一第二索引标识, 所述第二索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第二索引标识或所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头; 或,
当所述发送设备和所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识和所述接收设备的第二索引标识;
将所述发送设备的第二索引标识和所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
该处理器可能是一个中央处理器 CPU , 或者是特定集成电路 ASIC ( Application Specific Integrated Circuit ),或者是被配置成实施本发明实施例的 一个或多个集成电路。 与图 13所示实施例的数据报头封装装置相对应, 参见图 15, 本申请实施 例还提供了一种数据报头解封装装置另一个实施例的结构示意图 ,该装置可以 包括:
数据获取模块 1501 , 用于获取 MAC层接收数据, 并解封装所述 MAC层 接收数据;
第二报头信息获取模块 1502,用于当所述 MAC层接收数据的发送设备或 接收设备为 AP设备时, 获取地址域中的所述发送设备的第二索引标识或所述 接收设备的第二索引标识, 所述第二索引标识字节数小于 MAC地址字节数; 或, 当所述 MAC层接收数据的发送设备和接收设备为 AP设备时, 获取所述 数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的第二索 引标识。
第二地址确定模块 1503 , 用于根据各个第二索引标识与各个设备的 MAC 地址的对应关系, 确定所述发送设备和 /或所述接收设备的 MAC地址。
图 15所示实施例的数据报头解封装装置在实际应用中可以应用于接收设 备中, 该接收设备可以为 STA设备或者 AP设备。 因此, 参见图 16, 本申请实施例还提供了一种数据报头解封装设备的另 一个实施例, 该设备至少包括存储器 1601和通过通信总线与所述存储器 1601 连接的处理器 1602,
所述存储器 1601用于存储一组第二数据报头解封装程序; 该存储器可以 是是高速 RAM存储器, 也可能是非易失性存储器(non-volatile memory ), 例 如至少一个磁盘存储器等。 所述处理器 1602用于调用所述存储器 1601存储的一组所述第二数据报头 解封装程序, 执行如下操作:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备或接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识或所述接收设备的 第二索引标识, 所述第二索引标识字节数小于 MAC地址字节数;
根据各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备或所述接收设备的 MAC地址; 或,
当所述 MAC层接收数据的发送设备和接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的 第二索引标识;
根据所述各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所 述发送设备和所述接收设备的 MAC地址。
该处理器可能是一个中央处理器 CPU , 或者是特定集成电路 ASIC
( Application Specific Integrated Circuit ),或者是被配置成实施本发明实施例的 一个或多个集成电路。
本发明实施例提供的数据报头封装方法、 解封装方法、 装置及设备, 对于 MAC ( Media Access Control, 媒体访问控制 )层的待传输数据, 首先确定出 MAC层待传输数据的发送设备和接收设备, 然后根据发送设备和接收设备是 否位于同一无线子网, 或者发送设备和 /或接收设备是否为无线接入点设备, 可以获取发送设备和接收设备各自的第一索引标识或者第二索引标识,代替设 备的 MAC地址, 作为 MAC层数据报头地址域承载的地址。 由于第一索引标 识和第二索引标识字节数均小于设备 MAC地址, 因此使得 MAC层数据报头 占用字节数减少, 减小了报头开销, 从而可以降低功耗。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是 与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于 实施例公开的装置而言, 由于其与实施例公开的方法相对应, 所以描述的比较 简单, 相关之处参见方法部分说明即可。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的方法、 装置和设 备, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性 的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另 外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个系统, 或 一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直 接耦合或通信连接可以是通过一些通信接口 ,装置或单元的间接耦合或通信连 接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为 单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者 也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部 单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元 中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用 时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技 术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以 以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介质中, 包括 若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设 备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前述的存储介质 包括: U盘、 移动硬盘、 只读存储器(ROM, Read-Only Memory )、 随机存取 存储器(RAM, Random Access Memory ), 磁碟或者光盘等各种可以存储程序 代码的介质。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本 申请。 对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见 的, 本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下, 在 其它实施例中实现。 因此, 本申请将不会被限制于本文所示的这些实施例, 而 是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。
+

Claims

权 利 要 求
1、 一种数据报头封装方法, 其特征在于, 包括:
确定媒体访问控制 MAC层待传输数据的通信关联设备, 所述通信关联设 备包括发送设备和接收设备;
当所述发送设备和所述接收设备位于同一无线子网,确定所述发送设备的 第一索引标识以及所述接收设备的第一索引标识,所述发送设备和所述接收设 备分别具有唯一第一索引标识, 所述第一索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第一索引标识和所述接收设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
2、 根据权利要求 1所述的方法, 其特征在于, 所述发送设备的第一索引 标识以及所述接收设备的第一索引标识分别为所述发送设备和所述接收设备 所在无线子网内的无线接入点设备预先设置并分配的。
3、 根据权利要求 1所述的方法, 其特征在于, 所述第一索引标识为用于 索引设备类型为站点的设备的站点标识或索引设备类型为无线接入点的设备 的无线接入点标识;
当所述发送设备为站点设备时, 所述发送设备的第一索引标识为站点标 识, 其中, 位于同一无线子网内的站点设备分别具有唯一站点标识; 或, 当所述发送设备为无线接入点设备时 ,所述发送设备的第一索引标识为无 线接入点标识, 其中,位于不同分布式系统中的无线接入点设备分别具有唯一 无线接入点标识; 或,
当所述接收设备为站点设备时, 所述接收设备的第一索引标识为站点标 识; 或,
当所述接收设备为无线接入点设备时,所述接收设备的第一索引标识为无 线接入点标识。
4、 根据权利要求 1所述的方法, 其特征在于, 所述将所述发送设备的第 一索引标识和所述接收设备的第一索引标识, 作为 MAC层数据报头地址域中 的相应地址包括:
当所述待传输数据的源设备和所述发送设备相同、目的设备和所述接收设 备相同时, 将所述发送设备的第一索引标识作为所述 MAC层数据报头地址域 中的发送地址和源地址, 将所述接收设备的第一索引标识作为所述 MAC层数 据 ^艮头地址域中的目的地址和接收地址; 或,
当所述待传输数据的源设备和所述发送设备相同、目的设备和所述接收设 备不同时, 将所述发送设备的第一索引标识作为所述 MAC层数据报头地址域 中的发送地址和源地址,将所述接收设备的第一索引标识以及所述目的设备的 MAC地址, 分别作为所述 MAC层数据报头地址域中的接收地址和目的地址; 或,
当所述待传输数据的源设备和所述发送设备不同、目的设备和所述接收设 备相同时, 分别将所述发送设备的第一索引标识以及所述源设备的 MAC地址 作为所述 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的 第一索引标识作为所述 MAC层数据报头地址域中的目的地址和接收地址。
5、 根据权利要求 3所述的方法, 其特征在于, 当所述发送设备和所述接 收设备位于不同无线子网时, 所述方法还包括:
获取所述发送设备的无线接入点标识和所述接收设备的无线接入点标识; 将所述发送设备的无线接入点标识和所述接收设备的无线接入点标识分 别作为 MAC层数据报头地址域中的发送地址和接收地址, 并根据所述发送地 址和所述接收地址进行报头封装, 形成所述 MAC层数据报头。
6、 根据权利要求 3或 5所述的方法, 其特征在于, 所述无线接入点标识 包括分布式系统索引信息和无线接入点索引信息。
7、 根据权利要求 1 所述的方法, 其特征在于, 所述确定媒体访问控制 MAC层待传输数据的通信关联设备之前, 所述方法还包括:
确定所述待传输数据的网络层报头的报头信息;
按照数据报头压缩规则, 确定所述报头信息中的待传输信息;
根据所述待传输信息封装所述网络层数据报头 ,并添加到所述待传输数据 头部之后传输至逻辑链路控制层; 将逻辑链路控制层接收的所述待传输数据添加链路层数据报头后传输至 所述 MAC层。
8、 根据权利要求 7所述的方法, 其特征在于, 所述待传输信息包括所述 报头信息中通信连接过程中变化的信息、 由逻辑链路控制层不能够获知的信 息、 或者不能够预知的信息。
9、 一种数据报头解封装方法, 其特征在于, 包括:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备和接收设备位于同一无线子网, 获取 所述数据报头地址域中的所述发送设备的第一索引标识以及所述接收设备的 第一索引标识, 所述第一索引标识字节数小于 MAC地址字节数;
根据各个第一索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备以及所述接收设备的 MAC地址。
10、 一种数据报头封装方法, 其特征在于, 包括:
确定 MAC层待传输数据的通信关联设备, 所述通信关联设备包括发送设 备和接收设备;
当所述发送设备或所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识或所述接收设备的第二索引标识,所述发送设备和所述接收设 备分别具有唯一第二索引标识, 所述第二索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第二索引标识或所述接收设备的第二索引标识, 作为
MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头; 或,
当所述发送设备和所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识和所述接收设备的第二索引标识;
将所述发送设备的第二索引标识和所述接收设备的第二索引标识, 作为
MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
11、 根据权利要求 10所述的方法, 其特征在于, 所述第二索引标识为索 引无线接入点设备的无线接入点标识,位于不同分布式系统中的无线接入点设 备分别具有唯一无线接入点标识。
12、 根据权利要求 10所述的方法, 其特征在于, 所述方法应用于发送设 备中, 所述发送设备为站点设备时, 所述方法还包括:
检测关联的无线接入点设备的无线接入点标识和接收到的广播信息中包 括的无线接入点标识相同,且关联的无线接入点设备的基石出服务集标识 BSSID 或服务集标识 SSID和接收到的广播信息中包括的 BSSID或 SSID不同时, 向 关联的无线接入点设备发送地址冲突信息; 或,
所述发送设备为无线接入点设备时, 所述方法还包括:
检测接收到的广播信息包括的无线接入点标识与所述发送设备的无线接 入点标识相同, 或者接收到关联的站点设备发送的地址冲突消息时, 重新设置 无线接入点标识。
13、 一种数据报头解封装方法, 其特征在于, 包括:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备或接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识或所述接收设备的 第二索引标识, 所述第二索引标识字节数小于 MAC地址字节数;
根据各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备或所述接收设备的 MAC地址; 或,
当所述 MAC层接收数据的发送设备和接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的 第二索引标识; 根据所述各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所 述发送设备和所述接收设备的 MAC地址。
14、 一种数据报头封装装置, 其特征在于, 包括:
设备确定模块, 用于确定媒体访问控制 MAC层待传输数据的通信关联设 备, 所述通信关联设备包括发送设备和接收设备;
第一标识获取模块, 用于当所述发送设备和所述接收设备位于同一无线 子网, 确定所述发送设备的第一索引标识以及所述接收设备的第一索引标识, 所述发送设备和所述接收设备具有唯一第一索引标识,所述第一索引标识字节 数小于 MAC地址字节数;
第一地址生成模块,用于将所述发送设备的第一索引标识和所述接收设备 的第一索引标识, 作为 MAC层数据报头地址域中的相应地址;
第一报头封装模块,用于按照所述第一地址生成模块得到的地址进行报头 封装, 形成所述 MAC层数据报头。
15、 根据权利要求 14所述的装置, 其特征在于, 所述发送设备的第一索 引标识以及所述接收设备的第一索引标识分别为所述发送设备和所述接收设 备所在无线子网内的无线接入点设备预先设置并分配的。
16、 根据权利要求 14所述的装置, 其特征在于, 所述第一索引标识包括 为用于索引设备类型为站点的设备的站点标识或索引设备类型为无线接入点 的设备的无线接入点标识;
当所述发送设备为站点设备时, 所述发送设备的第一索引标识为站点标 识, 其中, 位于同一无线子网内的站点设备分别具有唯一站点标识; 或, 当所述发送设备为无线接入点设备时,所述发送设备的第一索引标识为无 线接入点标识, 其中,位于不同分布式系统中的无线接入点设备分别具有唯一 无线接入点标识; 或,
当所述接收设备为站点设备时, 所述接收设备的第一索引标识为站点标 识; 或,
当所述接收设备为无线接入点设备时,所述接收设备的第一索引标识为无 线接入点标识。
17、 根据权利要求 14所述的装置, 其特征在于, 所述第一地址生成模块 包括:
第一地址生成子模块,用于当所述待传输数据的源设备和所述发送设备相 同、 目的设备和所述接收设备相同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的第一索引 标识作为 MAC层数据报头地址域中的目的地址和接收地址; 或, 第二地址生成子模块,用于当所述待传输数据的源设备和所述发送设备相 同、 目的设备和所述接收设备不同时, 将所述发送设备的第一索引标识作为 MAC层数据报头地址域中的发送地址和源地址, 将所述接收设备的第一索引 标识以及所述目的设备的 MAC地址, 分别作为 MAC层数据报头地址域中的 接收地址和目的地址; 或,
第三地址生成子模块,用于当所述待传输数据的源设备和所述发送设备不 同、 目的设备和所述接收设备相同时, 分别将所述发送设备的第一索引标识以 及所述源设备的 MAC地址作为 MAC层数据报头地址域中的发送地址和源地 址, 将所述接收设备的第一索引标识作为 MAC层数据报头地址域中的目的地 址和接收地址。
18、 根据权利要求 16所述的装置, 其特征在于, 还包括:
第二标识获取模块,用于当所述发送设备和所述接收设备位于不同无线子 网时, 获取所述发送设备的无线接入点标识和所述接收设备的无线接入点标 识;
第二地址生成模块,用于将所述发送设备的无线接入点标识和所述接收设 备的无线接入点标识分别作为 MAC层数据报头地址域中的发送地址和接收地 址;
第二报头封装模块,用于按照所述第二地址生成模块得到的地址进行报头 封装, 形成所述 MAC层数据报头。
19、 根据权利要求 16或 18所述的装置, 其特征在于, 所述无线接入点标 识包括分布式系统索引信息和无线接入点索引信息。
20、 根据权利要求 14所述的装置, 其特征在于, 还包括:
报头信息确定模块, 用于确定所述待传输数据的网络层报头的报头信息; 传输信息确定模块, 用于按照数据报头压缩规则,确定所述报头信息中的 待传输信息;
第一数据传输模块, 用于根据所述待传输信息封装所述网络层数据报头, 并添加到所述待传输数据头部之后传输至逻辑链路控制层;
第二数据传输模块,用于将逻辑链路控制层接收的所述待传输数据添加链 路层数据报头后传输至 MAC层。
21、 根据权利要求 20所述的装置, 其特征在于, 所述待传输信息包括所 述报头信息中通信连接过程中变化的信息、由逻辑链路控制层不能够获知的信 息、 或者不能够预知的信息。
22、 一种数据报头解封装装置, 其特征在于, 包括:
解封装模块, 用于获取 MAC层接收数据, 并解封装所述 MAC层接收数 据的数据报头; 第一报头信息获取模块, 用于当所述 MAC层接收数据的发送设备和接收 设备位于同一无线子网,获取地址域中的所述发送设备的第一索引标识以及所 述接收设备的第一索引标识,所述第一索引标识字节数小于 MAC地址字节数; 第一地址确定模块, 用于根据各个第一索引标识与各个设备的 MAC地址 的对应关系, 确定所述发送设备和所述接收设备的 MAC地址。
23、 一种数据报头封装装置, 其特征在于, 包括:
设备确定模块, 用于确定 MAC层待传输数据的通信关联设备, 所述通信 关联设备包括发送设备和接收设备;
第三标识获取模块,用于当所述发送设备或所述接收设备为无线接入点设 备时,确定所述发送设备的第二索引标识或所述接收设备的第二索引标识, 所 述发送设备或所述接收设备分别具有唯一第二索引标识,所述第二索引标识字 节数小于 MAC地址字节数; 或, 当所述发送设备和所述接收设备为无线接入 点设备时, 确定所述发送设备的第二索引标识和所述接收设备的第二索引标 识;
第三地址生成模块, 用于将所述发送设备的第二索引标识和 /或接收设备 的第二索引标识, 作为 MAC层数据报头地址域中的相应地址;
第三报头封装模块,用于按照所述第三地址生成模块得到的地址进行报头 封装, 形成所述 MAC层数据报头。
24、 根据权利要求 23所述的装置, 其特征在于, 所述第二索引标识为索 引无线接入点设备的无线接入点标识,位于不同分布式系统中的无线接入点设 备分别具有唯一无线接入点标识。
25、 根据权利要求 23所述的装置, 其特征在于, 所述装置应用于发送设 备中, 所述发送设备为站点设备时, 所述装置还包括:
第一检测模块,用于检测关联的无线接入点设备的无线接入点标识和接收 到的广播信息中包括的无线接入点标识相同,且关联的无线接入点设备的基础 服务集标识 BSSID或服务集标识 SSID和接收到的广播信息中包括的 BSSID 或 SSID不同时, 向关联的无线接入点设备发送地址冲突信息; 或,
所述发送设备为无线接入点设备时, 所述装置还包括:
第二检测模块,用于检测接收到的广播信息包括的无线接入点标识与所述 发送设备的无线接入点标识相同,或者接收到关联的站点设备发送的地址冲突 消息时, 重新设置无线接入点标识。
26、 一种数据报头解封装装置, 其特征在于, 包括:
数据获取模块, 用于获取 MAC层接收数据, 并解封装所述 MAC层接收 数据;
第二报头信息获取模块, 用于当所述 MAC层接收数据的发送设备或接收 设备为无线接入点设备时 ,获取地址域中的所述发送设备的第二索引标识或所 述接收设备的第二索引标识,所述第二索引标识字节数小于 MAC地址字节数; 或, 当所述 MAC层接收数据的发送设备和接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的 第二索引标识; 第二地址确定模块, 用于根据各个第二索引标识与各个设备的 MAC地址 的对应关系, 确定所述发送设备和 /或所述接收设备的 MAC地址。
27、 一种数据报头封装设备, 其特征在于, 至少包括存储器和处理器, 所述存储器用于存储一组第一数据报头封装程序;
所述处理器用于调用所述存储器存储的所述一组第一数据报头封装程序 , 执行如下操作;
确定媒体访问控制 MAC层待传输数据的通信关联设备, 所述通信关联设 备包括发送设备和接收设备;
当所述发送设备和所述接收设备位于同一无线子网,确定所述发送设备的 第一索引标识以及所述接收设备的第一索引标识,所述发送设备和所述接收设 备分别具有唯一第一索引标识, 所述第一索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第一索引标识和所述接收设备的第一索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
28、 一种数据报头解封装设备, 其特征在于, 至少包括存储器和处理器, 所述存储器用于存储一组第一数据报头解封装程序;
所述处理器用于调用所述存储器存储的所述一组第一数据报头解封装程 序, 执行如下操作:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备和接收设备位于同一无线子网, 获取 所述数据报头地址域中的所述发送设备的第一索引标识以及所述接收设备的 第一索引标识, 所述第一索引标识字节数小于 MAC地址字节数;
根据各个第一索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备以及所述接收设备的 MAC地址。
29、 一种数据报头封装设备, 其特征在于, 至少包括存储器和处理器, 所述存储器用于存储一组第二数据报头封装程序;
所述处理器用于调用所述存储器存储的所有一组第二数据报头封装程序, 执行如下操作:
确定 MAC层待传输数据的通信关联设备, 所述通信关联设备包括发送设 备和接收设备;
当所述发送设备或所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识或所述接收设备的第二索引标识,所述发送设备和所述接收设 备分别具有唯一第二索引标识, 所述第二索引标识字节数小于 MAC地址字节 数;
将所述发送设备的第二索引标识或所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头; 或,
当所述发送设备和所述接收设备为无线接入点设备时,确定所述发送设备 的第二索引标识和所述接收设备的第二索引标识;
将所述发送设备的第二索引标识和所述接收设备的第二索引标识, 作为 MAC层数据报头地址域中的相应地址, 并按照该相应地址进行报头封装, 形 成所述 MAC层数据报头。
30、 一种数据报头解封装设备, 其特征在于, 至少包括存储器和处理器, 所述存储器用于存储一组第二数据报头解封装程序;
所述处理器用于调用所述存储器存储的一组所述第二数据报头解封装程 序, 执行如下操作:
获取 MAC层接收数据, 并解封装所述 MAC层接收数据的数据报头; 当所述 MAC层接收数据的发送设备或接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识或所述接收设备的 第二索引标识, 所述第二索引标识字节数小于 MAC地址字节数;
根据各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所述发 送设备或所述接收设备的 MAC地址; 或,
当所述 MAC层接收数据的发送设备和接收设备为无线接入点设备时, 获 取所述数据报头地址域中的所述发送设备的第二索引标识和所述接收设备的 第二索引标识;
根据所述各个第二索引标识与各个设备的 MAC地址的对应关系, 确定所 述发送设备和所述接收设备的 MAC地址。
+
PCT/CN2013/082700 2013-08-30 2013-08-30 数据报头封装方法、解封装方法、装置及设备 WO2015027474A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201380079253.6A CN105493563A (zh) 2013-08-30 2013-08-30 数据报头封装方法、解封装方法、装置及设备
PCT/CN2013/082700 WO2015027474A1 (zh) 2013-08-30 2013-08-30 数据报头封装方法、解封装方法、装置及设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/082700 WO2015027474A1 (zh) 2013-08-30 2013-08-30 数据报头封装方法、解封装方法、装置及设备

Publications (2)

Publication Number Publication Date
WO2015027474A1 true WO2015027474A1 (zh) 2015-03-05
WO2015027474A9 WO2015027474A9 (zh) 2016-09-29

Family

ID=52585429

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082700 WO2015027474A1 (zh) 2013-08-30 2013-08-30 数据报头封装方法、解封装方法、装置及设备

Country Status (2)

Country Link
CN (1) CN105493563A (zh)
WO (1) WO2015027474A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155014A (zh) * 2016-06-23 2016-11-23 北京东土科技股份有限公司 一种工业互联网现场层宽带总线实时性实现方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210185612A1 (en) * 2017-10-30 2021-06-17 Lg Electronics Inc. Method for transmitting or receiving frame in wireless lan system and apparatus therefor
CN113395135B (zh) * 2021-05-06 2023-03-14 埃森智能科技(深圳)有限公司 数据通信方法、装置及计算机可读存储介质
CN113452616B (zh) * 2021-07-13 2022-04-19 烽火通信科技股份有限公司 一种三四地址路由器及其下挂设备管理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188739A (zh) * 2011-12-30 2013-07-03 中兴通讯股份有限公司 网络中帧的传输方法及装置
CN103209045A (zh) * 2012-01-12 2013-07-17 华为终端有限公司 数据通信的方法、装置及系统
CN103259876A (zh) * 2012-02-17 2013-08-21 华为终端有限公司 处理地址冲突的方法和装置
CN103260136A (zh) * 2012-02-17 2013-08-21 华为终端有限公司 通信方法、站点设备及接入点设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188739A (zh) * 2011-12-30 2013-07-03 中兴通讯股份有限公司 网络中帧的传输方法及装置
CN103209045A (zh) * 2012-01-12 2013-07-17 华为终端有限公司 数据通信的方法、装置及系统
CN103259876A (zh) * 2012-02-17 2013-08-21 华为终端有限公司 处理地址冲突的方法和装置
CN103260136A (zh) * 2012-02-17 2013-08-21 华为终端有限公司 通信方法、站点设备及接入点设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155014A (zh) * 2016-06-23 2016-11-23 北京东土科技股份有限公司 一种工业互联网现场层宽带总线实时性实现方法

Also Published As

Publication number Publication date
WO2015027474A9 (zh) 2016-09-29
CN105493563A (zh) 2016-04-13

Similar Documents

Publication Publication Date Title
JP5689179B2 (ja) 低電力ワイヤレスパーソナルエリアネットワーク上のIPv6データパケットを送信する方法および装置
US8724583B2 (en) Neighbor discovery message handling to support roaming of wireless mobile client devices
EP2708001B1 (en) Label switched routing to connect low power network domains
US7760666B2 (en) Method of generating and managing connection identifiers for supporting multicast for each group in IPv6-based wireless network and network interface using the method
KR101203463B1 (ko) IPv6 기반 모바일 시스템에서 이웃 탐색을 제공하는장치 및 방법
US20050018677A1 (en) Method and system for generating IP addresses of access terminals and transmitting messages for generation of IP addresses in an IP system
US20150113168A1 (en) Network Bridging
JP2005318619A (ja) バックボーンネットワークに連結された調整子基盤無線網と異種のネットワークとの通信方法及び装置並びにプログラムの記録媒体
US11153207B2 (en) Data link layer-based communication method, device, and system
WO2011032481A1 (zh) 通信方法、通信过程中的数据报文转发方法及通信节点
WO2021052399A1 (zh) 接口扩展方法、装置和系统
CN114124618B (zh) 一种报文传输方法及电子设备
US20150103746A1 (en) Communication system and computer-readable recording medium
WO2013071866A1 (zh) 一种传递主机名的方法和装置
KR101901341B1 (ko) 사용자 장치의 이동성을 지원하는 네트워크 접속 방법 및 장치
WO2015027474A1 (zh) 数据报头封装方法、解封装方法、装置及设备
US20180167231A1 (en) Managing multiple virtual network memberships
JP2024504466A (ja) パケット転送方法、パケット処理方法、およびデバイス
CN108989173B (zh) 一种报文传输的方法及装置
WO2013026299A1 (zh) 一种地址解析方法、装置及信息传输方法
WO2022007749A1 (zh) 一种数据传输方法和装置
US20130034108A1 (en) System and Method for Communications Network Configuration
WO2012110004A1 (zh) 基于lte-lan的报文转发方法及装置
WO2023036434A1 (en) Devices and methods for wlan enhanced broadcast services
WO2020187398A1 (en) Tunnel endpoint encoding for mobile network architecture

Legal Events

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

Ref document number: 201380079253.6

Country of ref document: CN

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

Ref document number: 13892458

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

Country of ref document: EP

Kind code of ref document: A1