WO2017166032A1 - 一种nan设备发送同步信标消息的方法和设备 - Google Patents

一种nan设备发送同步信标消息的方法和设备 Download PDF

Info

Publication number
WO2017166032A1
WO2017166032A1 PCT/CN2016/077566 CN2016077566W WO2017166032A1 WO 2017166032 A1 WO2017166032 A1 WO 2017166032A1 CN 2016077566 W CN2016077566 W CN 2016077566W WO 2017166032 A1 WO2017166032 A1 WO 2017166032A1
Authority
WO
WIPO (PCT)
Prior art keywords
cluster
information
state
message
role
Prior art date
Application number
PCT/CN2016/077566
Other languages
English (en)
French (fr)
Inventor
庞高昆
方平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CA3019360A priority Critical patent/CA3019360C/en
Priority to KR1020187031041A priority patent/KR20180126050A/ko
Priority to RU2018137577A priority patent/RU2018137577A/ru
Priority to SG11201809571QA priority patent/SG11201809571QA/en
Priority to US16/088,951 priority patent/US11140644B2/en
Priority to AU2016401125A priority patent/AU2016401125A1/en
Priority to CN201680080776.6A priority patent/CN108605300A/zh
Priority to EP16895813.0A priority patent/EP3429283A4/en
Priority to PCT/CN2016/077566 priority patent/WO2017166032A1/zh
Priority to BR112018069734A priority patent/BR112018069734A2/pt
Publication of WO2017166032A1 publication Critical patent/WO2017166032A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/20Master-slave selection or change arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W74/00Wireless channel access, e.g. scheduled or random access
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and device for transmitting a synchronization beacon message by a NAN device.
  • Wi-Fi wireless-Fidelity
  • IEEE Institute of Electrical and Electronics Engineers
  • AP Access Point
  • STA station
  • NAN Neighbor Awareness Network
  • the role of the NAN mechanism is to synchronize all the devices participating in the NAN mechanism without the central node, and maintain the NAN mechanism and service discovery in the discovery window (DW) agreed by the NAN mechanism. After the service is discovered, the service is discovered. Based on the information obtained in the service discovery, a corresponding connection is established between the devices to form a cluster, and then data transmission is performed.
  • the device in the NAN mechanism includes two roles: a master and a non-master.
  • the master includes an anchor master (AM) and a non-anchor master.
  • the default is synchronous (sync) state.
  • Non-master includes non-master sync and non-master non-sync. Each device can be master, non-master sync, non-master non-sync.
  • the state changes constantly and is in one of the states.
  • a sync beacon message is sent by the device in the master role and the non-master sync state.
  • the message carries the information of the AM, including an anchor master rank (AMR), an anchor master beacon transmission time (AMBTT), a time synchronization function (TSF), and a cluster.
  • AMR anchor master rank
  • AMBTT anchor master beacon transmission time
  • TSF time synchronization function
  • the NAN device A in the cluster 1 receives the sync beacon message sent by the device B in the other cluster 2, if the NAN device A obtains the cluster level (Cluster grade, CG) value of the Cluster 2 according to the beacon message, it is smaller than the cluster1.
  • the CG value is large, and the NAN device A leaves the cluster1 and merges to the cluster2 in the master role.
  • the synchronous beacon message is sent in the DW of the cluster1, and the information of the cluster2 is carried.
  • the device is flooded, so that the device that hears the sync beacon in Cluster1 is also added to Cluster2 in the master role.
  • the master that joins the cluster 2 sends a sync beacon message, which is easy to cause conflicts, and the other NAN devices in the cluster 2 may not receive the sync beacon. Empty resources are wasted.
  • the embodiment of the invention provides a method and a device for sending a synchronization beacon message by a NAN device, which can solve the problem that a sync beacon message conflicts when a NAN device joins a new cluster in the master role.
  • the first aspect provides a method for a NAN device to send a synchronization beacon message, including:
  • the first device in the first cluster in the NAN receives the message, and the message includes the first cluster information of the second cluster;
  • the synchronization beacon message is sent in the second cluster according to the role and state of the first device in the first cluster.
  • the first device herein may receive a message sent by the second device in the second cluster, the message includes the first cluster information of the second cluster, or receive the cancellation sent by the third device in the first cluster.
  • the third device is in the first NAN data cluster NDC of the first cluster, the message includes the first cluster information of the second cluster, or receives the message sent by the fourth device in the first cluster, where the message includes the second cluster a cluster of information;
  • the first cluster information may include at least one of a cluster identifier of the second cluster, a first anchor master ordering AMR, a first anchor master beacon transmission time AMBTT, a first time synchronization function TSF, and a first hop count HC.
  • the first device when the first device joins the second cluster, the first device does not join the second cluster in the master role and sends the synchronization beacon message in the second cluster, as in the prior art.
  • the role and state of a device in the first cluster determines that a synchronization beacon message is sent. Since different retreat intervals in different roles and states are different or a synchronization beacon message is not sent in a role and state, multiple devices can be prevented from joining the second device. A sync beacon conflict that occurs in a cluster.
  • transmitting the synchronization beacon message in the second cluster according to the role and state of the first device in the first cluster includes:
  • the role and state of the first device in the first cluster are the primary device or the non-primary device, and the state is the synchronization state, and the first device sends the synchronization beacon message in the second cluster.
  • the method before the first device sends the synchronization beacon message, the method further includes:
  • the first device sets information of the first device according to the first cluster information.
  • the information of the first device itself can be set according to the received first cluster information of the second cluster, so that the first device can be timely and timely when joining the second cluster.
  • the devices in the two clusters are interconnected.
  • the setting, by the first device, the information of the first device according to the first cluster information includes: setting, by the first device, the cluster identifier of the first device, the anchor master information, the second TSF, and the role and state of the first device.
  • the cluster identifier of the first device is a cluster identifier of the second cluster
  • the anchor master information includes at least one of the second AMR, the second AMBTT, and the second HC
  • the value of the second AMR is The value of an AMR is the same
  • the second The value of the AMBTT is the same as the value of the first AMBTT
  • the value of the second HC is the value of the first HC plus one
  • the second TSF is the same as the first TSF
  • the role of the first device is the master device, and the state defaults to the synchronization state
  • the role and state of the first device are the same as the role and state of the first device in the first cluster; or the role and state after the first device is set according to at least one of the information before the setting of the first device
  • the pre-set information includes the sponsor device ranking MR before the first device setting, the HC before setting, and the AMBTT before setting, as determined by comparison with at least one of the first cluster information.
  • the HC indicating the hop count is incremented by one, and the role and state of the first device are not directly in the master role as in the first setting in the prior art.
  • the second cluster is added, but may be set to master, or may be set to be the same as the role and state of the first device in the first cluster, and the rest of the information is corresponding to the received first cluster information of the second cluster. The information is consistent, so that the first device can be interconnected with the devices in the second cluster in time.
  • the method before the first device sets the information of the first device, the method further includes: if the first device receives the message from the second device, The first device acquires the MR of the second device; if the first device receives the message from the third device, the first device acquires the MR of the third device; And the first device acquires the MR of the fourth device by the device receiving the message from the fourth device.
  • the determining, according to the role and state of the first device in the first cluster, whether to send a synchronization beacon message in the second cluster comprises: setting a role of the first device And the state is the same as the role and state of the first device in the first cluster, if the role is the master device or the non-master device, and the state is the synchronization state, the first device determines Sending the synchronization beacon message in the second cluster; if the set role is a non-master device, and the state is an unsynchronized state, the first device determines not to send in the second cluster The synchronization beacon message.
  • the synchronization beacon message carries at least one of the information set by the first device. Therefore, when the first device joins the second cluster, if the set role is a non-master device and the state In the unsynchronized state, it is not necessary to send a synchronization beacon message to avoid synchronization beacon message conflict, and also save air interface resources.
  • the method further includes: when the role of the first device is set as the main device, the first device records the role and state of the first device in the first cluster; Determining whether the role and the state in the first cluster send the synchronization beacon message in the second cluster includes: if the role of the first device in the first cluster is a master device or a non-master device, the state is a synchronization state. The first device determines to send the synchronization beacon message; if the role of the first device in the first cluster is a non-primary device, and the state is an unsynchronized state, the first device determines not to send the synchronization beacon in the second cluster. Message.
  • the first device joins the second cluster in the role of the master when joining the second cluster, it is determined whether the synchronization beacon message is sent in the second cluster, so that the first device is in the first before joining the second cluster.
  • the roles and states in the cluster are judged because the role and state of the first device in the first cluster are not necessarily master, and the backspace of the master role is [0, 15], and the device of the non-master role sync state
  • the backoff interval is [0, 31], and the non-master state non-sync state does not send the synchronization beacon message, which can prevent the device added to the second cluster from sending a synchronization beacon message to generate a collision.
  • the synchronization beacon message may be sent in the second cluster after the retreat interval is modified, which may include: when the role of the first device is set as the main device, the first device modifies the retreat interval, and after the modification The backoff interval is greater than the backoff interval before the modification; the first device sends the synchronization beacon message in the second cluster according to the modified backoff interval.
  • the first device sends a synchronization beacon message in the second cluster.
  • the first device can modify the backoff interval before sending, so that the modified device can be modified.
  • the backoff interval is greater than the backoff interval before the modification, so that the probability that the number of backoffs randomly selected by the device joining the second cluster may be the same may be reduced, thereby avoiding the collision of sending the synchronization beacon frame.
  • the role and state of the first device are determined according to at least one of the information before the setting of the first device and at least one of the second cluster information, if the setting is The role is primary or non-primary, and the status is synchronous.
  • the first device determines to send the synchronization beacon message in the second cluster; if the set role is the non-master device and the state is the unsynchronized state, the first device determines not to send the synchronization beacon message in the second cluster.
  • the role of the first device is master, and the MR is smaller than the MR in the second cluster information. Then, the role set by the first device is non-master, and the state is sync. After the first device joins the second cluster, the synchronization is determined.
  • the beacon frame for example, the role before the first device setting is non-master, the state is sync state, and the value of HC is smaller than the value of HC in the second cluster, then the role set by the first device is non-master, state In the non-sync state, the first device joins the second cluster and does not send the synchronization beacon frame, which can avoid the sync conflict problem and save the air interface resources.
  • the method further includes: if the first device receives the first cluster information sent by the second device, and the first device is in the at least one NDC, the first device determines to send the first in at least one NDC.
  • the second cluster information of the two clusters, the second cluster information including at least one of the information set by the first device.
  • the first device receives the first cluster information from the second device of the second cluster, if the first device is in the at least one NDC in the first cluster, the second cluster is also sent in the at least one NDC.
  • the information is such that the device that hears the information of the second cluster in the at least one NDC is also connected to the second cluster, so that the first device diffuses the cluster information of the second cluster in the NDC in the first cluster.
  • the propagation range of the cluster information of the second cluster is expanded, and the cluster information can be transmitted faster by the NDC.
  • the method further includes: if the first device has received the second cluster information sent by any other device in the first cluster, the first device cancels sending the second cluster information in the at least one NDC. .
  • the second cluster information can be prevented from being repeatedly transmitted in the at least one NDC to save air interface overhead.
  • the method further includes: if the first device receives the message from the third device, the first device determines to send the first NDC in the remaining NDCs except the first NDC in all the NDCs in which the first device is located.
  • the second cluster information of the second cluster, the second cluster information packet At least one of the information after the first device is set.
  • the third device is the device in any one of the first clusters.
  • the first device may send the information of the second cluster in the remaining NDCs where the first device is located.
  • the propagation range of the cluster information of the second cluster is expanded, and the cluster information can be transmitted faster by the NDC.
  • the method further includes: if the first device has received the second cluster information from any of the remaining NDCs, the first device cancels sending the second cluster information in the remaining NDCs.
  • the information of the second cluster can be avoided from being repeatedly transmitted in the first cluster, which saves the air interface overhead.
  • the method further includes: the first device updating at least one of an NDC management window, an NDC data link NDL information, a group key, and a device identifier of the first device.
  • the first device after the first device joins the second cluster, the first device can be interconnected with the devices in the second cluster according to the updated information.
  • a first device is provided, where the first device is in the proximity sensing network NAN, and includes:
  • a receiving unit configured to receive a message, where the message includes the first cluster information of the second cluster
  • the first determining unit when the first device joins the second cluster, sends a synchronization beacon message in the second cluster according to the role and state of the first device in the first cluster.
  • the first determining unit is configured to: if the role and state of the first device in the first cluster are a master device or a non-master device, and the state is a synchronization state, the first device is in the second cluster. Send a synchronization beacon message.
  • it also includes:
  • a setting unit configured to set information of the first device according to the first cluster information before the first device sends the synchronization beacon message.
  • the first cluster information includes a cluster identifier of the second cluster, a first anchor master ordering AMR, a first anchor master beacon transmission time AMBTT, a first time synchronization function TSF, and At least one of the first hop counts HC.
  • the setup unit is used to:
  • the cluster identifier of the first device is a cluster identifier of the second cluster
  • the anchor master information includes at least one of a second AMR, a second AMBTT, and a second HC, the value of the second AMR is the same as the value of the first AMR, and the value of the second AMBTT is the same as the value of the first AMBTT, the second HC The value of the first HC is increased by one;
  • the second TSF is the same as the first TSF
  • the role of the first device is the master device, and the state is the synchronization state by default; or the role and state of the first device are the same as the role and state of the first device in the first cluster; or the role and state after the first device is set is According to at least one of the information before the first device setting is compared with at least one of the first cluster information, the information before the setting includes the primary device ranking MR before the first device setting, the HC before setting, and the setting before AMBTT.
  • the receiving unit is configured to: send a message sent by the second device in the second cluster, the message includes the first cluster information of the second cluster; or receive the message sent by the third device in the first cluster, The third device is in the first NAN data cluster NDC of the first cluster, the message includes the first cluster information of the second cluster; or receives the message sent by the fourth device in the first cluster, the message includes the first cluster of the second cluster information.
  • the acquiring unit before the first device sets the information of the first device, the acquiring unit further includes: an acquiring unit, configured to:
  • the first determining unit is used to:
  • the role and state of the first device are set to be the same as the role and state of the first device in the first cluster, if the set role is the master device or the non-master device, and the state is the synchronization state, it is determined in the second cluster. Sending a synchronization beacon message;
  • the set role is a non-master device and the state is an unsynchronized state, it is determined that the synchronization beacon message is not sent in the second cluster.
  • it also includes:
  • a recording unit configured to record a role and a state of the first device in the first cluster when the role of the first device is set as the master device;
  • the first determining unit is used to:
  • the role of the first device in the first cluster is a master device or a non-master device, and the state is a synchronization state, determining to send a synchronization beacon message;
  • the role of the first device in the first cluster is a non-master device and the state is an unsynchronized state, it is determined that the synchronization beacon message is not sent in the second cluster.
  • the first determining unit is configured to: when the role of the first device is set as the master device, determine to send a synchronization beacon message in the second cluster;
  • the setting unit is further configured to: modify the back-off interval, and the modified back-off interval is greater than the back-off interval before the modification.
  • the first determining unit is used to:
  • the role and status of the first device are determined according to at least one of the information before the setting of the first device and at least one of the second cluster information, if the set role is the When the master device or the non-master device is in the synchronization state, determining to send the synchronization beacon message in the second cluster;
  • the set role is a non-master device and the state is an unsynchronized state, it is determined that the synchronization beacon message is not sent in the second cluster.
  • a second determining unit is further included for:
  • the first device determines to send the second cluster information of the second cluster, the second cluster information, in the at least one NDC.
  • the at least one of the information after the setting of the first device is included.
  • it also includes:
  • the first canceling unit is configured to cancel sending the second cluster information in the at least one NDC if the first device has received the second cluster information sent by any other device in the first cluster.
  • the first cancellation unit is used to:
  • the second cluster information is cancelled in at least one NDC.
  • a third determining unit is further included for:
  • the first device receives the message from the third device, determining to send the second cluster information of the second cluster in the remaining NDCs except the first NDC in all the NDCs in which the first device is located, where the second cluster information includes the first At least one of the information after the device is set.
  • it also includes:
  • a second canceling unit configured to cancel sending the second cluster information in the remaining NDCs if the first device has received the second cluster information from any of the remaining NDCs.
  • a fourth determining unit is also included for:
  • the first device receives the message from the fourth device, determining to send the second cluster information of the second cluster in the first cluster, where the second cluster information includes at least one of the information set by the first device.
  • a third cancellation unit is further included for:
  • the setup unit is also used to:
  • a first device having a function to implement the behavior of a first device in the design of the method described above.
  • the functions can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the first device includes a processor and a network interface, the processor being configured to support the first device to perform a corresponding function in the above method, and the network interface is configured to support the first device to send and receive messages.
  • the network interface is configured to receive a message, and the message includes the first cluster information of the second cluster; the processor is configured to determine, when joining the second cluster, the information of the first device according to the first cluster information.
  • the first device can also include a memory for coupling with the processor that retains the program instructions and data necessary for the first device.
  • the method provided by the present invention can determine whether the second device is in the second cluster according to the role and state of the first device in the first cluster when the first device receives the first cluster information of the second cluster.
  • Sending a synchronization beacon message which avoids the problem that the devices joining the second cluster join and send the sync beacon conflict generated by the sync beacon message, for example, the role of the first device in the first cluster is non-master, the state When non-sync, you do not need to send a sync beacon message, which not only avoids sync beacon conflicts, but also saves air interface resources.
  • FIG. 1 is a schematic diagram of a NAN network architecture including two clusters according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of connection of an NDC in the same cluster according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for sending a synchronization beacon message according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a method for sending a synchronization beacon message according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a method for setting beacon transmission and anchor master information after setting information of a NAN device according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of a method for setting beacon transmission and anchor master information after setting information of a NAN device according to an embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart of a method for setting beacon transmission and anchor master information after setting information of a NAN device according to an embodiment of the present disclosure
  • FIG. 8 is a schematic flowchart of a cluster information diffusion method after setting information of a NAN device according to an embodiment of the present disclosure
  • FIG. 9 is a schematic flowchart of a cluster information diffusion method after setting information of a NAN device according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic flowchart of a cluster information diffusion method after setting information of a NAN device according to an embodiment of the present disclosure
  • FIG. 11 is a schematic structural diagram of a first device according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a first device according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of a first device according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of a first device according to an embodiment of the present invention.
  • the embodiment of the present invention is applied to the NAN.
  • the NAN may include multiple clusters. There may be overlapping areas between the coverages of the clusters.
  • FIG. 1 is a schematic diagram of a NAN network architecture including two clusters, as shown in FIG. NAN Cluster2, each cluster includes multiple NAN devices and/or NAN2.0 devices, and synchronization, maintenance work, and service discovery work can be performed between NAN devices.
  • a cluster may include multiple NAN Data Clusters (NDCs) (also referred to as data groups or other names). Each NDC can be understood as a group consisting of NAN2.0 devices, and is at least two NAN2s.
  • NDCs NAN Data Clusters
  • NDL NAN Data Link
  • the NAN2.0 device can establish multiple NDLs, as shown in Figure 2.
  • Figure 2 is a schematic diagram of the connection of an NDC in the same Cluster.
  • the NAN device or the NAN2.0 device may be a communication terminal such as a mobile phone or a tablet. For example, data transmission may be performed between multiple mobile phones to simultaneously perform network games.
  • the synchronization between the NAN devices can be time synchronization; the service discovery work can enable the NAN device to establish a corresponding connection based on the information obtained in the service discovery, thereby performing data transmission; the NAN device can be divided into a master and a non-master, and the state of the master can be
  • the anchor master (AM) and the non-anchor master (also referred to as the master) are both defaulted to the sync state.
  • the non-master state can be non-master sync and non-master non-sync. Maintaining the work can make each NAN device have a fair chance to change and be in one of the four states.
  • a DW can be set every 512 TU, and the duration is 16 TU, and a TU (time unit) is approximately
  • the NAN device in the anchor master, the master, and the non-master sync state uses the backoff mechanism to contend for the synchronous beacon message.
  • the message carries the information of the AM. After the other device hears the message, it sets its own related information to synchronize with the AM. .
  • the NDC includes a Base Schedule.
  • the NAN device wakes up and can receive messages sent by other NAN devices or send messages to other NAN devices, which is equivalent to the NDC management window, so that the NDC is in the NDC. Data communication between NAN devices.
  • the NAN device joins the cluster 2 when it joins the cluster 2.
  • the NAN device also sends the information of the cluster 2 in the cluster 1 in the process of joining, so that the NAN that hears the information in the cluster 1
  • the master role is added to the cluster2, so that the NAN device with multiple master roles sends a sync beacon message in the cluster2, and the backhaul interval used by the master role to send the sync beacon message is [0, 15], which is easy to generate sync beacon conflicts.
  • the NAN device determines to join the Cluster2, and determines whether to send a sync beacon message in the Cluster2 according to the role and state of the NAN device in the Cluster1, so as to avoid the problem of the sync beacon conflict. Therefore, the embodiment of the present invention provides a method for a NAN device to send a synchronization beacon message. As shown in FIG. 3, the method includes:
  • the first device in the first cluster in the NAN receives the message, where the message includes the first cluster information of the second cluster.
  • the first cluster is the last cluster of the second cluster in which the first device is located, or merges to the cluster before the second cluster.
  • the first device in the first cluster (denoted as Cluster1) in the NAN may receive a message sent by the second device in the second cluster (denoted as Cluster2), the message including the first cluster information of the second cluster, the message specific It can be a sync beacon frame in the DW, or a discovery beacon frame outside the DW;
  • the first device receives the message sent by the third device in the first cluster, where the third device is in the first NDC of the first cluster, the message includes the first cluster information of the second cluster, and the message may be an announcement message. (announcement frame);
  • the first device receives the message sent by the fourth device in the first cluster, where the message may be a sync beacon message in the DW, or may be a discovery beacon message other than the DW, including the first cluster information of the second cluster,
  • the fourth device may be in the NDC of the first cluster or may not be in the NDC of the first cluster, and the message may be spread in the first cluster in a broadcast form.
  • the first device is referred to as NAN device A
  • the second device is recorded as NAN device B
  • the first cluster information is information of Cluster 2, including at least one of the following: Cluster ID, cluster, AMR, TSF, AMBTT, HC, etc.
  • the Cluster ID is the ID of the Cluster2
  • the AMR is the value of the MR of the AM in the Cluster2
  • the AMBTT is the value of the AMBTT of the AM in the Cluster2
  • the HC is the HC value of the AM in the NAN Device B to the Cluster2
  • the TSF is the NAN Device A
  • the value of the TSF in the received message, the TSF value is obtained according to the time stamp in the message, and the TSF value can usually be replaced by the TSF.
  • MP Master Preference
  • CG cluster level information
  • AMR is the MR value of AM
  • MR value indicates the willingness of the NAN device to be the master, and the larger the MR value, the higher the willingness
  • the TSF indicates the synchronization function of the NAN device, which can make the timer of the NAN device
  • the AM time is the same
  • AMBTT indicates the transmission time of the AM beacon
  • the HC value indicates the hop count of the NAN device to the AM.
  • the NAN device A in the cluster 1 receives the information of the cluster 2, the NAN device A determines whether the CG value in the information of the cluster 2 is greater than the location of the NAN device A according to whether the cluster ID in the cluster 2 information is the same as the cluster ID of the cluster 1 .
  • the CG value of Cluster1 if the Cluster ID is different, and the CG value in the information of Cluster2 is greater than the CG value of Cluster1, the NAN device determines to join Cluster2; otherwise, NAN Device A discards the received message.
  • the synchronization beacon message is sent in the second cluster according to the role and state of the first device in the first cluster.
  • the NAN device A when the NAN device A determines to join the Cluster 2, it can determine whether to send a sync beacon message in the Cluster 2 according to the role and state of the NAN device A in the Cluster 1, for example, the role of the NAN device A in the Cluster 1 is the master, or the role.
  • the NAN device A determines to send a sync beacon message when it joins the cluster 2; when the NAN device A has a non-master role in the cluster 1, and the state is non-sync, the NNA device A It is determined that the sync beacon message is not sent when joining Cluster2.
  • the backoff interval of the synchronous beacon message sent by the NAN device of the master role in the current specification is [0, 15], so the backoff interval can be modified, so that the modified The backoff interval is larger than the backoff interval [0, 15] before the modification.
  • the modified backoff interval is [0, 50] and other intervals, so that the probability that the NAN device selects the same number of backoffs is reduced to avoid sync beacon conflict.
  • the NAN specification in the prior art does not specify how the NAN device sets its own information when it joins the Cluster2 from the Cluster1, so that the NAN devices of the various vendors do not have a unified standard when implemented, and the information of different NAN devices may cause the NAN device to be different.
  • the cluster When the cluster is added to the cluster 2, it cannot be synchronized with the AM in the cluster 2, and the interworking between the NAN devices cannot be implemented. Therefore, before the NAN device joins the cluster 2 and sends a sync beacon message, the NAN device can also receive the information of the cluster 2 according to the received information. Set up your own information so that it can be set up in time with Cluster2 The device is interconnected. Therefore, as shown in FIG. 4, before the first device sends the synchronization beacon message, the method further includes:
  • the first device sets information about the first device according to the first cluster information.
  • the setting of the information of the first device may be when the first device decides to join the second cluster, or when the first device is ready to join the second cluster, or after the first device has joined the second cluster, This application is not limited.
  • the first anchor information of the first device When the first device, that is, the NAN device A sets its own information, the first anchor information of the first device, the TSF, the role and state of the first device, and the cluster identifier may be set according to the first cluster information of the Cluster2. At least one item may also include a last anchor master record.
  • the anchor master information may also be information (including: at least one of the second AMR, the second AMBTT, and the second HC) sent in the sync beacon, or the information sent in the announcement frame (including: second At least one of AMR, second AMBTT, and second HC).
  • the current anchor master record includes at least one of the first AMR, the first AMBTT, and the first HC, and the value of the first AMR is set to the value of the MR (second AMR) of the AM in the Cluster2 obtained in step 301. That is, the value of the first AMR is the same as the value of the second AMR; the value of the first AMBTT is set to the value of the AMBTT (second AMBTT) of the AM of Cluster2 in step 301, that is, the value of the first AMBTT and the value of the second AMBTT.
  • the value of the first HC is set to the HC value obtained in step 301 plus 1; since the previous anchor master information is the information of the AM in Cluster1, when the NAN device A confirms that it is to be added to the Cluster2, the previous anchor master The information can be set to be empty or 0.
  • the first TSF needs to be synchronized with the time information in the added Cluster2. Therefore, the first TSF is set to the second TSF carried in the message; the role of the NAN device A can be directly set as the master device.
  • the status is the synchronization status, or the default is the synchronization status, or the role and status of the NAN device A in the cluster1 is the same; the cluster ID is set to the ID of the cluster 2 to be joined by the NAN device A.
  • the TSF indicates time information for transmitting the message, if the first device receives at least two of the second device, the third device, and the fourth device.
  • the HC and TSF of the first cluster information in the message may be different.
  • the roles and states of the NAN device A are the same as those of the N1 device A.
  • the role and status of the NAN device A at the end of the DW of the Cluster 1 are not limited in this application.
  • the role of the NAN device A in the cluster 1 is non-master and the state is the sync state.
  • the NAN device A joins the cluster 2 the role remains non-master and the state is still in the sync state.
  • the NAN device A is in the cluster1.
  • the role of the middle is master, and the state defaults to sync.
  • the role joins Cluster2 the role remains master and the state is still sync.
  • the first device may also acquire the MR of the third device or the fourth device.
  • the first cluster information received by the first device further includes an MP value and a random number (RF) of the third device, where the first device can be at least Calculating, according to the MP value, the RF value, and the Media Access Control (MAC) address of the third device, the MR of the third device;
  • the first device may calculate the MR of the fourth device according to the MP value and the RF value of the fourth device.
  • the first case the role of the first device can be set as the master device, the state defaults to the synchronization state, and the second case: the role of the first device can also be set.
  • the state is the same as the role and state of the first device in the first cluster.
  • the role of the first device may be determined according to the comparison between the information before the first device setting and the first cluster information. And status.
  • the first device may compare the MR, HC, and AMBTT of the first device with the MR, HC, and AMBTT of the corresponding third device or the fourth device in the received message, For example, the third device or the first obtained
  • the MR of the four devices is higher than the value of the MR of the first device, or the HC value in the message is higher than the HC value of the first device, or the AMBTT value in the message is greater than the AMBTT value of the first device, and any one of them is satisfied at this time.
  • the first device is updated from the master role sync state to the non-master role sync state, or if the current state of the first device is the non-master role sync state. Then the first device is updated from the non-master role sync state to the non-master role non-sync state. Or, before the first device joins the second cluster, if the MR value in the received message(s) is not higher than its own MR value, or the HC value in the received message(s) does not have its own HC The value is high and the first device can be updated from the other roles to the master role.
  • the first device may further determine whether the message meets one of a short-range condition or a long-distance condition, where the close-range condition is a Receive Signal Strength Indicator (RSSI) in the message. Greater than -60 dBm, the long range condition is RSSI greater than -75 and less than -60 dBm. If the message satisfies the close distance condition, the first device can perform the setting process in the third case described above after receiving the message. Or, if the message satisfies the long-distance condition, the first device may perform the setting process in the third case described above after receiving the message, and may also be used in the first case or the second case.
  • RSSI Receive Signal Strength Indicator
  • the NAN device confirms the join to Cluster2, it does not directly join the master role, and sets the MR to the MR of the NAN device itself.
  • the HC is not 0 as the master role, and the AMBTT is not the same as the master role. 0, but the role and status can be set to master, the status defaults to sync, or the same role and status as the NAN device in Cluste1r, but the device information is set according to the received information of Cluster2.
  • the NAN device can determine the role and state of the first device according to at least one of the information before the setting of the first device and the at least one of the first cluster information, so when the NAN device joins the Cluster 2, the NAN device can The AMs in Cluster2 are synchronized in time, so that the NAN devices newly added to Cluster2 can communicate with the NAN devices in Cluster2 in time.
  • FIG. 5 is a schematic flowchart of a method for transmitting a beacon after setting information of the NAN device. As shown in FIG. 5, the method may further include:
  • the first device determines to send a synchronization beacon message in the second cluster, and the synchronization beacon message carries the first device setting. At least one of the following information; if the set role is a non-master device and the state is an unsynchronized state, the first device determines not to send the synchronization beacon message in the second cluster.
  • the set role and state are the same as the role and state of the NAN device A in the Cluster 1:
  • the role of the NAN device A is master or non-master, and the state is sync, it is determined that the sync beacon message is sent in the cluster 2; if the role set by the NAN device A is a non master role and the state is non sync state, then Make sure that the sync beacon message is not sent in Cluster2.
  • the sync beacon message includes one or more of the set current anchor master records set by the NAN device A in step 302, that is, the set AMR, One or more of HC, AMBTT, TSF, cluster ID, and MR of NAN device A itself.
  • the Nacon device in the cluster 1 can effectively reduce the beacon message sent by the NAN device A.
  • the NAN device A When joining the Cluster2 with the master role, multiple NAN devices Compete with conflicts that arise when sending sync beacon messages.
  • any one of the backoff intervals [0, 15] may be randomly selected to contend for sending a sync beacon message, and carries the information in the currently set current anchor master record;
  • any one of the backoff intervals [0, 31] can be randomly selected to contend for the synchronous beacon message, and the information in the currently set current anchor master record is carried. Therefore, under the setting of different roles and states, the number of backoffs randomly selected according to different retreat intervals can further effectively reduce the conflict problem when a plurality of NAN devices are in a sync state and compete to send a sync beacon message.
  • the method further includes the following steps:
  • the first device When receiving the synchronization beacon message sent by the other device in the second cluster, the first device sets the anchor information of the first device according to the synchronization beacon message.
  • the NAN device A compares the information in the received sync beacon message with the information set by the NAN device A to determine whether to modify the information. Its own anchor master information to keep pace with other NAN devices in Cluster2.
  • NAN device A updates the AMR value in its current anchor master record to sync.
  • the AMR in the beacon message is the same as the value of the TSF in the sync beacon message;
  • the AMBTT of the update beacon is the AMBTT in the sync beacon message;
  • the HC value is updated to the HC value in the sync beacon message plus one.
  • the NAN device A sets its own last anchor master record: sets the AMR to the AMR in the current anchor master record before the update; sets the AMBTT to the AMBTT in the current anchor master record before the update;
  • the NAN device A does not process, or the NAN device A compares the value of the AMBTT in the sync beacon message with its own AMBTT after the NAN device A is set.
  • the value of the AMBTT of the NAN device A itself is updated to the value of the AMBTT in the sync beacon message if the value of the AMBTT of the NAN device A itself is smaller than the value of the AMBTT in the sync beacon message, which is due to the sync beacon message.
  • NAN device A When the value of AMBTT is greater than the value of AMBTT of NAN device A itself, it indicates that the time information is the latest, and NAN device A is to be synchronized with the latest time; if the value of AMBTT of NAN device A itself is greater than the value of AMBTT in the sync beacon message , then NAN device A does not process.
  • the MR value carried in the sync beacon message is greater than the MR value of the NAN device A itself, when the NAN device A is currently in the master role, the role of the NAN device A needs to be updated to the non-master role, and the state is still in the sync state. If the status of the device is in the non-master state, the device needs to be updated to the non-master role and the state is non-sync.
  • the HC value carried in the sync beacon message is smaller than the current HC value of the NAN device A, when the NAN device A is currently in the master role, the role of the NAN device A needs to be updated to the non-master role, and the state is still in the sync state. A is currently a non-master role. When the state is sync, you need to update its role to a non-master role with a non-sync state; or
  • the NAN device A needs to be updated to the non-master role when the NAN device A is in the master role.
  • the state is still in the sync state. A is currently a non-master role.
  • FIG. 6 is a beacon transmission and anchor information after the NAN device setting information according to the embodiment of the present invention.
  • a schematic diagram of the method flow is set, and the above steps 304-305 can be replaced with steps 306-308:
  • the first device When the role of the first device is set as the master device, and the state is the synchronization state, the first device records the role and state of the first device in the first cluster.
  • the NAN device A joins the Cluster2 from Cluster1, although it is determined that the set role is master, it is also necessary to record the role and state of the device itself in Cluster1.
  • step 304 if the role of the first device in the first cluster is the master device or the non-master device, the state is the synchronization state, then it is determined to send the synchronization beacon message; if the first device is in the first cluster If the role is a non-master device and the state is an unsynchronized state, the first device determines not to send the synchronization beacon message in the second cluster.
  • step 304 since step 304 is when the first device joins the second cluster, the role and state when the first device is in the first cluster are set, and steps 306-307 are When the first device is added to the second cluster, the role is the master device, and the state is the synchronization state by default. Therefore, if the step 307 determines to send the synchronization beacon message, the synchronization beacon message carries the first device setting. At least one of the information.
  • the role of the NAN device A after leaving Cluster1 to be added to Cluster2 is set to master and the state is sync, it is determined whether to send the sync beacon message or the role and state of Cluster1 recorded by NAN device A.
  • the information carried in the sync beacon message is the set information. It can effectively reduce the number of multiple clusters in Cluster1 when multiple NAN devices in Cluster1 are added to Cluster2 by the master role because they receive the beacon message sent by NAN device A.
  • the NAN device competes for conflicts when sending sync beacon messages.
  • any one of the backoff intervals [0, 15] can be randomly selected to contend for the synchronous beacon message and carry the current set current.
  • the information in the anchor master record when the NAN device A is in the non master sync state, it can randomly select any one of the backoff intervals [0, 31] to contend for the synchronous beacon message, and carry the current set master anchor master record. Information in. Therefore, under the setting of different roles and states, the number of backoffs randomly selected according to different backoff windows can further effectively reduce the conflict problem when multiple NAN devices in the sync state in the cluster 2 compete for the sync beacon message.
  • the first device after being added to the second cluster, receives the sync beacon message sent by the other NAN devices in the second cluster. Therefore, the foregoing method further includes:
  • the first device When receiving the synchronization beacon message sent by the other device in the second cluster, the first device sets the anchor information of the first device according to the synchronization beacon message in the role of the primary device.
  • the NAN device A compares the information in the received sync beacon message with the information set by the NAN device A to determine whether it is still As the master device, and modify its own anchor master information to keep in sync with other NAN devices in Cluster2.
  • the NAN device A will no longer function as the master role, and needs to update its role as a non master and update its current anchor master record.
  • One or more pieces of information update the AMR to the AMR in the sync beacon message; update the value of the TSF to the value of the TSF in the sync beacon message; update the AMBTT value to the AMBTT in the sync beacon message; update the HC value to the sync beacon
  • the HC value in the message is incremented by 1.
  • the NAN device A sets its own last anchor master record: sets the AMR to the AMR in the current anchor master record before the update; sets the AMBTT to the current anchor master record before the update.
  • AMBTT AMBTT
  • the NAN device A If the AMR in the sync beacon message is smaller than the AMR after the NAN device A is set, the NAN device A does not process; if the AMR in the sync beacon message is equal to the AMR after the NAN device A is set, the NAN device does not process, or The NAN device A compares the value of the AMBTT in the sync beacon message with the value of the AMBTT set by the NAN device A.
  • the NAN device A If the value of the AMBTT of the NAN device A itself is smaller than the value of the AMBTT in the sync beacon message, the NAN device A itself The value of the AMBTT is updated to the value of the AMBTT in the sync beacon message; if the value of the AMBTT of the NAN device A itself is greater than the value of the AMBTT in the sync beacon message, the NAN device A does not process.
  • step 305 if the MR value carried in the sync beacon message is greater than the MR value of the NAN device A itself, when the NAN device A is currently in the master role, the role of the non-master is required to be updated.
  • the sync state when the NAN device A is in the non-master role and the state is in the sync state, it needs to update its role to the non-master role, and the state is non-sync state; or
  • the HC value carried in the sync beacon message is smaller than the current HC value of the NAN device A, when the NAN device A is currently in the master role, the role of the NAN device A needs to be updated to the non-master role, and the state is still in the sync state. A is currently a non-master role. When the state is sync, you need to update its role to a non-master role with a non-sync state; or
  • the NAN device A needs to be updated to the non-master role when the NAN device A is in the master role.
  • the state is still in the sync state. A is currently a non-master role.
  • FIG. 7 is a beacon transmission and anchor information after the NAN device setting information according to the embodiment of the present invention.
  • the first device adds the second cluster after modifying the backoff interval, and sends a synchronization beacon message in the second cluster.
  • the role of the NAN device A is set to master, and when the state is the sync state, the newly defined backoff interval can be adopted, and the newly defined backoff interval is larger than the retreat interval before the modification.
  • [0,15] such as [0, 50] or other larger interval [0, X], where X is greater than 15 or greater than 31, but X is less than the length value of DW, such that the newly defined backoff interval is greater than before modification The retreat interval.
  • the multiple NAN devices in the cluster 1 are added to the cluster 2 by the master role because they receive the beacon message sent by the NAN device A.
  • the NAN device of the master role in the cluster 2 contends to send the sync beacon message.
  • the larger the backoff interval of the new definition is used, the probability that the number of backoffs randomly selected by multiple master roles is reduced, and the synchronization can be effectively reduced.
  • the first device carries the information in the current anchor master record set in step 303 when sending the sync beacon message.
  • the first device after being added to the second cluster, receives the sync beacon message sent by the other NAN devices in the second cluster. Therefore, the foregoing method further includes:
  • the first device When receiving the synchronization beacon message sent by the other device in the second cluster, the first device sets the anchor information of the first device according to the synchronization beacon message in the role of the primary device.
  • step 310 The specific implementation of the step 310 is similar to the step 308, and details are not described herein again.
  • the first device when the first device receives the synchronization beacon message or the discovery beacon message including the cluster information of the second cluster, the first device may be in a broadcast form in the DW of the first cluster. Send a sync beacon message in the sync beacon message
  • the cluster information of the second cluster is included, so that the device in the first cluster that hears the sync beacon message can also join the second cluster.
  • the synchronization beacon message or the discovery beacon message that may be sent from the second device in the second cluster may also come from the first cluster.
  • the prior art only diffuses the cluster information of the second cluster in a broadcast manner, which may cause some NAN devices in the first cluster to receive no message, that is, the propagation range is limited.
  • the first device receives the second information, a message sent by the second device of the cluster, and the first device belongs to the at least one NDC in the first cluster, where the first device needs to send an NDC message in the at least one NDC, where the NDC message includes the cluster information of the second cluster, so that The device that hears the NDC message in the at least one NDC in a cluster joins the second cluster; or, when the first device receives the NDC message sent by the third device in the NDC in which the first device is located, the first device The NDC message may also be sent in multiple NDCs in which the device is located, so that the devices in the multiple NDCs are added to the second cluster; or the first device may also broadcast the fourth device in the first cluster.
  • FIG. 8 is a schematic flowchart of a cluster information diffusion method after the NAN device setting information according to an embodiment of the present invention.
  • the following steps 311-313 are performed after the foregoing step 303, and are performed before the foregoing steps 304-305 or steps 306-308 or steps 309-310.
  • the method further includes:
  • the first device in the first cluster receives the first cluster information from the second device of the second cluster, and the first device is in the at least one NDC, the first device determines to send the second cluster in the at least one NDC.
  • the second cluster information includes at least one of the information set by the first device.
  • the NAN device A in the cluster 1 receives the sync beacon message or the discovery beacon message sent by the NAN device B in the cluster 2.
  • the message includes the information of the cluster 2, that is, the first cluster information, including the cluster ID, the AMR, the TSF, and the like. One or more of AMBTT and HC. If the NAN device A is in multiple NDCs in the Cluster 1, the NAN device A is in the management window of the plurality of NDCs after setting the information of the NAN device A itself according to the first cluster information. Sending the second cluster information of the second cluster, the second cluster information including at least one of the information set by the NAN device A.
  • the message that the NAN device A sends the second cluster information may be a sync beacon message or an announcement frame message.
  • the NAN device A is sent in multiple NDC management windows, that is, not only in the management window of the NDC1 to which the NAN device A belongs, but also It is transmitted in the management window of NDC2 or the like to which the NAN device A belongs
  • the format of the sync beacon message or the announcement frame message may be an existing sync beacon message format, an action message format, or a service discovery frame (SDF) message format, or a newly defined message format. .
  • SDF service discovery frame
  • the method further includes:
  • the first device If the first device has received the second cluster information of the second cluster sent by any other device in the first cluster, the first device cancels sending the second cluster information in some or all of the NDCs in the at least one NDC. .
  • the NAN device A can be prevented from repeatedly transmitting the information of Cluster2 in Cluster1, thereby saving air interface overhead.
  • the first device may determine, by comparing the information carried in the second cluster information sent by the any device with the information set by the first device. For example, if the first AMBTT set in step 303 is smaller than the fourth AMBTT carried in the second cluster information, or the first HC is greater than the fourth HC carried in the second cluster information, or the first AMR is smaller than the second cluster information.
  • the fourth AMR carried, or the device ordering MR of the first device is smaller than the MR of any device, or the HC of the first device is greater than the HC of the device itself, the first device cancels sending the first in at least one NDC. Cluster information.
  • the second cluster information may further include a time information that the first device is to join the second cluster.
  • Information, or time period information to inform the NAN device in the NDC that the first device joins the second cluster when the time period information arrives, so that the devices in the NDC can be added to the second cluster at the same time.
  • the first device is communicating with other devices in the NDC, such as chatting, and the other devices will not affect the ongoing service when they join the second cluster at the same time.
  • the first device updates at least one of an NDC management window, an NDC data link NDL information, a group key, and a device identifier of the first device.
  • the NAN device A modifies its own NDC management window to the management window of the DW in Cluster2.
  • the original NDC management window is the start time of the NDC management window to the offset1 of the DW of Cluster1
  • the modified NDC management window is the start time of the NDC management window to the offset2 of the DW of Cluster2.
  • the AMBTT ie, the AMBTT of Cluster 2
  • the offset can be described in the form of a bitmap.
  • the bitmap in the bit table is set to 1 to indicate that the time unit is available.
  • the NAN device A When the bitmap is set to 0 or blank, the NAN device A enters sleep during the time period indicated by the time unit. status. As shown in Table 1, with 16 TUs as the minimum time unit for the device to work on a certain channel, within each 16 TU, the NAN device A is in a sleep state or works on a certain channel, and the position in the bit table is 1. The location acts as the NDC management window for NAN device A, and NAN device A is awake during this time period.
  • the NDL is a time-frequency resource negotiated between NAN devices, including channel and time
  • the NDL information that is, the NDL schedule
  • the NDL schedule can be modified according to the bit table of the NDC management window.
  • the NAN devices may use the same group ID as a group, or may be a group of NAN devices supporting the same service, or a group of NAN devices belonging to the same geographic location, or multiple.
  • a group of NAN devices that need to communicate with each other is not limited in this application.
  • the group key may be generated based on the first 4 octets of the TSF, ie, the first 4 bytes, and the group key may be updated in combination with the first 4 bytes of the TSF as part of the group key.
  • the device identifier (service identity) of the NAN device A in the cluster 2 needs to be updated, and the HSR operation may be performed at least in combination with the partial information of the TSF and the device name to generate a new SID. Or, at least the partial information of the group key and the device name are hashed to generate a new SID, etc., which is not limited in this application.
  • the NAN device A diffuses the cluster information of the second cluster in the NDC in the cluster 1, the propagation range of the cluster information of the second cluster is expanded, and the cluster information can be transmitted faster through the NDC.
  • FIG. 9 is a schematic flowchart of a cluster information diffusion method after setting information of a NAN device according to an embodiment of the present invention.
  • the above steps 311 to 313 can also be replaced by 314 to 316:
  • the first device in the first cluster receives the message from the third device of the first cluster, the first device determines to send the second in the remaining NDCs except the first NDC in all the NDCs in which the first device is located.
  • the second cluster information of the cluster including at least one of the information set by the first device.
  • the third device Since the third device is in the first NDC of the first cluster in step 301, it is recorded as NDC1 at this time, that is, if the first device is the first cluster information received by the device in the NDC1 where the device itself is located. After the first device sets its own information according to the first cluster information, the first device also needs to be in addition to NDC1 in the NDC in which it is located.
  • the second cluster information of the second cluster is sent in the remaining NDC (for example, NDC2), and the second cluster information includes at least one of the information set by the first device.
  • the message format used by the first device to send the second cluster information may be as described in step 311, and details are not described herein again.
  • the first device cancels sending the second cluster information in the remaining NDCs.
  • the second cluster information can be prevented from being repeatedly sent in the NDC where the first device is located, which saves air interface resources.
  • the first device updates at least one of an NDC management window, an NDC data link NDL information, a group key, and a device identifier of the first device.
  • FIG. 10 is a schematic flowchart of a cluster information diffusion method after NAN device setting information according to an embodiment of the present invention. Steps 311-313 or steps 314-316 may also be replaced with steps. 317 ⁇ 318:
  • the first device of the first cluster receives the message from the fourth device of the first cluster, the first device determines to send the second cluster information of the second cluster in the first cluster, where the second cluster information includes the first device. At least one of the set information.
  • the fourth device may broadcast the first cluster information in the first cluster, the first device.
  • the second cluster information of the second cluster may be broadcast in the first cluster, where the second cluster information includes the first device setting. At least one of the information, so that other devices in the first cluster that receive the second cluster information can also be added to the second cluster, wherein the message format adopted can be as illustrated in step 311, and is no longer here. Narration.
  • the first device cancels sending the second cluster information in the first cluster.
  • the first cluster information can be prevented from being repeatedly transmitted in the first cluster, thereby saving air interfaces. Resources.
  • the information of the first device itself may be set according to the first cluster information of the second cluster, so that After a device is added to the second cluster, it can be interconnected with the devices in the second cluster in time. Further, after the first device joins the second cluster, whether to send the synchronization beacon message in the second cluster is determined according to the information set by the first device, so as to avoid adding more to the second cluster. The devices send synchronization beacon messages in the second cluster and collide, causing the devices in the second cluster to not receive the message.
  • the first device may also broadcast the first cluster or send the set information in the NDC where the first device is located, so that the device that hears the information also joins the second.
  • the propagation range of the cluster information of the second cluster can be expanded, and the cluster information can be transmitted faster by the NDC.
  • the embodiment of the present invention further provides a first device 11, where the first device 11 is located in the proximity sensing network NAN, as shown in FIG.
  • the receiving unit 111 is configured to receive a message, where the message includes the first cluster information of the second cluster;
  • a first determining unit 112 configured to: when joining the second cluster, send a synchronization beacon message in the second cluster according to the role and state of the first device in the first cluster;
  • a transmitting unit 113 (not shown) for transmitting the synchronization beacon message in the second cluster after modifying the backoff interval.
  • the first determining unit 112 is configured to: if the role and status of the first device in the first cluster is a primary device or a non-primary device, and the state is a synchronous state, the first device sends a synchronization message in the second cluster. Standard message.
  • the setting unit 113 is configured to set information of the first device according to the first cluster information before the first device sends the synchronization beacon message.
  • the receiving unit 111 can be used to:
  • the third device is in the first NAN data cluster NDC of the first cluster, and the message includes the first cluster information of the second cluster;
  • the first cluster information includes at least one of a cluster identifier of the second cluster, a first anchor master ordering AMR, a first anchor master beacon transmission time AMBTT, a first time synchronization function TSF, and a first hop count HC. .
  • the setting unit 113 can be used to:
  • the cluster identifier of the first device is a cluster identifier of the second cluster
  • the anchor master information includes at least one of a second AMR, a second AMBTT, and a second HC, the value of the second AMR is the same as the value of the first AMR, and the value of the second AMBTT is the same as the value of the first AMBTT, the second HC The value of the first HC is increased by one;
  • the second TSF is the same as the first TSF
  • the role of the first device is the master device, and the state is the synchronization state by default; or the role and state of the first device are the same as the role and state of the first device in the first cluster; or the role and state after the first device is set is According to at least one of the information before the first device setting is compared with at least one of the first cluster information, the information before the setting includes the primary device ranking MR before the first device setting, the HC before setting, and the setting before AMBTT.
  • the receiving unit 111 can be used to:
  • the message includes the first cluster information of the second cluster;
  • the acquiring unit 114 is further configured to: obtain the MR of the second device if the first device receives the message from the second device;
  • the first device receives the message from the fourth device, acquiring the MR of the fourth device.
  • the first determining unit 112 is configured to determine, after joining the second cluster, whether to send the synchronization beacon message in the second cluster.
  • the role and state of the first device are set to be the same as the role and state of the first device in the first cluster, if the configured role is a primary device or a non-primary device, and the state is a synchronous state, it is determined that Sending a synchronization beacon message in the second cluster;
  • the set role is a non-master device and the state is an unsynchronized state, it is determined that the synchronization beacon message is not sent in the second cluster.
  • the method further includes:
  • a recording unit 115 is configured to record a role and a state of the first device in the first cluster when the role of the first device is set as the master device;
  • the first determining unit 112 is configured to:
  • the role of the first device in the first cluster is a master device or a non-master device, and the state is a synchronization state, determining to send a synchronization beacon message;
  • the role of the first device in the first cluster is a non-master device and the state is an unsynchronized state, it is determined that the synchronization beacon message is not sent in the second cluster.
  • the sending unit 113 may be configured to: when the role of the first device is set as the master device, modify the backoff interval, and the modified backoff interval is greater than the backoff interval before the modification;
  • a second determining unit 116 is further included, configured to:
  • the first device determines to send the second cluster information of the second cluster, the second cluster information, in the at least one NDC.
  • the at least one of the information after the setting of the first device is included.
  • it may also include:
  • the first canceling unit 117 is configured to cancel sending the second cluster information in the at least one NDC if the first device has received the second cluster information sent by any other device in the first cluster.
  • the first canceling unit 117 can be used to:
  • the second cluster information is cancelled in at least one NDC.
  • the third determining unit 120 may further be configured to:
  • the first device receives the message from the third device, determining to send the second cluster information of the second cluster in the remaining NDCs except the first NDC in all the NDCs in which the first device is located, where the second cluster information includes the first At least one of the information after the device is set.
  • it may also include:
  • the second canceling unit 121 is configured to cancel sending the second cluster information in the remaining NDCs if the first device has received the second cluster information from any of the remaining NDCs.
  • the fourth determining unit 130 may further be configured to:
  • the first device receives the message from the fourth device, determining to send the second cluster information of the second cluster in the first cluster, where the second cluster information includes at least one of the information set by the first device.
  • the third canceling unit 131 is further configured to:
  • the setting unit 113 is further configured to:
  • the information of the first device itself may be set according to the first cluster information of the second cluster, so that the first device is added to the second cluster.
  • the devices in the second cluster can be interconnected in time.
  • whether to send the synchronization beacon message in the second cluster is determined according to the information set by the first device, so as to avoid adding more to the second cluster.
  • the devices send synchronization beacon messages in the second cluster and collide, causing the devices in the second cluster to not receive the message.
  • the first device may also broadcast the first cluster or send the set information in the NDC where the first device is located, so that the device that hears the information also joins the second.
  • the propagation range of the cluster information of the second cluster can be expanded, and the cluster information can be transmitted faster by the NDC.
  • Fig. 14 is a view showing the structure of the first device involved in the above embodiment.
  • the first device may be a NAN device in the network architecture shown in FIG. 1 or 2.
  • the first device includes a controller/processor 142 for controlling management of actions of the first device.
  • the controller/processor 142 is configured to support the first device to perform the processes 301 and 302 in FIG. 3, 301 to 303 in the process of FIG. 4, and 301, 303, 304, and 305 in the process of FIG. 5, in the process of FIG. 301, 303, 306 ⁇ 308, 301, 303, 309 ⁇ 310 in the process of Figure 7, 301, 303, 311 ⁇ 313 in the process of Figure 8, Figure 9 301, 303, 314-316 in the process, 301, 303, 317-318 in the process of FIG. 10, and/or other processes for the techniques described in the embodiments of the present invention.
  • the memory 141 is for storing program codes and data of the first device
  • the network interface 143 is for supporting the first device to communicate with its devices in the first cluster or the second cluster.
  • network interface 143 is used to support communication between the first device and the various NAN devices shown in FIG. 1 or 2.
  • the information of the first device itself may be set according to the first cluster information of the second cluster, so that the first device is added to the second cluster. After that, the devices in the second cluster can be interconnected in time.
  • the disclosed apparatus and method may be implemented in other manners.
  • 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 mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • each functional unit may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above units may be implemented in the form of hardware or in the form of hardware plus software functional units.
  • All or part of the steps of implementing the foregoing method embodiments may be performed by hardware related to the program instructions.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes the steps of the foregoing method embodiments;
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. medium.

Abstract

本发明实施例提供一种NAN设备发送同步信标消息的方法和设备,涉及通信领域,能够解决NAN设备以master角色加入新的Cluster时出现的sync beacon消息冲突的问题。其方法为:当第一簇中的第一设备接收到第二簇的第一簇信息时,若第一设备确定加入第二簇,则根据第一设备在第一簇中的角色和状态在第二簇中发送同步信标消息。本发明实施例用于NAN设备加入Cluster发送同步信标帧。

Description

一种NAN设备发送同步信标消息的方法和设备 技术领域
本发明涉及通信领域,尤其涉及一种NAN设备发送同步信标消息的方法和设备。
背景技术
无线宽带(WIreless-Fidelity,Wi-Fi)技术的基础标准是电气和电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)制定的802.11协议,包括一个中心节点,即接入点(Access Point,AP),和至少一个站点(Station,STA),STA通过与AP进行消息交互加入AP的网络。由于802.11协议中的网络结构和数据传输有移动的限制,对于没有连接到AP的节点来说,进行服务发现比较困难,因此,相关的标准组织基于802.11协议制定了新的标准,以实现不需要关联也达到服务发现的效果,临近感知网络(Neighbor Awareness Network,NAN)便是其中一种机制。
NAN机制的作用是在没有中心节点的情况下,使得所有参与NAN机制的设备同步,在NAN机制约定的发现窗口(discovery window,DW)中进行NAN机制的维持工作和服务发现工作,服务发现后,可以基于服务发现中获得的信息使得设备之间建立相应的连接,形成簇(Cluster),进而进行数据传输。其中,NAN机制中的设备包括主设备(master)和非主设备(non-master)两种角色(Role),master包括锚主设备(anchor master,AM)和非anchor master两种,状态(State)均默认为同步(sync)状态,non-master包括non-master sync和non-master non-sync两种状态,每个设备均可在master,non-master sync,non-master non-sync 3种状态中不断改变,并处于其中一种状态。
当NAN机制中所有设备会在DW醒来时,由处于master角色以及non-master sync状态的设备发送同步信标(sync beacon)消息, 该消息中携带AM的信息,包括锚主设备排序(anchor master rank,AMR)、锚主设备信标传输时间(anchor master beacon transmission time,AMBTT)、时间同步功能(time synchronization function,TSF)、簇标识(Cluster ID)及设备自身的主设备排序(master rank,MR)等,用于Cluster中的其他NAN设备与Cluster中的AM同步,即根据接收到的sync beacon设置设备自身的相关信息。
目前的NAN规范中,当Cluster1中的NAN设备A接收到其它Cluster2中的设备B发送的sync beacon消息时,如果NAN设备A根据beacon消息获取的Cluster2的簇等级(Cluster grade,CG)值比Cluster1的CG值大,NAN设备A便离开Cluster1,并以master角色加入(merge)到Cluster2,并在NAN设备A merge到Cluster2的过程中,在Cluster1的DW中发送sync beacon消息,并携带Cluster2的信息进行扩散,使得Cluster1中听到sync beacon的设备也以master角色加入到Cluster2中。由于现有技术中规定master的退避窗口为[0,15],使得加入到Cluster2中的master发送sync beacon消息容易产生冲突,进而使得Cluster2中的其它NAN设备可能接收不到sync beacon,也造成了空口资源浪费。
发明内容
本发明实施例提供一种NAN设备发送同步信标消息的方法和设备,能够解决NAN设备以master角色加入新的Cluster时出现的sync beacon消息冲突的问题。
第一方面,提供一种NAN设备发送同步信标消息的方法,包括:
NAN中处于第一簇中的第一设备接收消息,消息包括第二簇的第一簇信息;
第一设备加入第二簇时,根据所述第一设备在所述第一簇中的角色和状态在所述第二簇中发送同步信标消息。
这里的第一设备可以接收第二簇中的第二设备发送的消息,消息包括第二簇的第一簇信息;或接收第一簇中的第三设备发送的消 息,第三设备处于第一簇的第一NAN数据簇NDC中,消息包括第二簇的第一簇信息;或接收第一簇中的第四设备发送的消息,消息包括第二簇的第一簇信息;
第一簇信息可以包括第二簇的簇标识、第一锚主设备排序AMR、第一锚主设备信标传输时间AMBTT、第一时间同步功能TSF和第一跳数HC中的至少一项。
由此,本申请中,第一设备在加入第二簇时,并不是如现有技术中第一设备以master角色加入第二簇并在第二簇中发送同步信标消息,而是根据第一设备在第一簇中的角色和状态确定发送同步信标消息,由于不同角色和状态下的退避区间不同或某角色和状态下不发送同步信标消息,能够避免多个设备加入到第二簇中时发生的sync beacon冲突问题。
在一种可能的设计中,根据第一设备在第一簇中的角色和状态在第二簇中发送同步信标消息包括:
第一设备在第一簇中的角色和状态为主设备或非主设备,状态为同步状态,则第一设备在第二簇中发送同步信标消息。
在一种可能的设计中,在所述第一设备发送所述同步信标消息之前,该方法还包括:
所述第一设备根据所述第一簇信息设置所述第一设备的信息。
由此,当第一设备确定加入第二簇时,能够根据接收到的第二簇的第一簇信息设置第一设备自身的信息,使得第一设备在加入第二簇时,能够及时与第二簇中的设备进行互联互通。
在一种可能的设计中,第一设备根据第一簇信息设置第一设备的信息包括:第一设备设置第一设备的簇标识、锚主信息、第二TSF和第一设备的角色和状态中的至少一项;其中,第一设备的簇标识为第二簇的簇标识;锚主信息包括第二AMR、第二AMBTT和第二HC中的至少一项,第二AMR的值与第一AMR的值相同,第二 AMBTT的值与第一AMBTT的值相同,第二HC的值为第一HC的值加1;第二TSF与第一TSF相同;第一设备的角色为主设备,状态默认为同步状态;或者,第一设备的角色和状态与第一设备在第一簇中的角色和状态相同;或者所述第一设备设置后的角色和状态是根据所述第一设备设置前的信息中的至少一个与所述第一簇信息中的至少一个进行比较确定的,所述设置前的信息包括所述第一设备设置前的助主设备排名MR、设置前的HC和设置前的AMBTT。
由此,第一设备在确定加入第二簇时设置自身的信息时,表示跳数的HC要加1,第一设备的角色和状态也并不是如现有技术中第一设置直接以master角色加入第二簇的,而是可以设置为master,也可以设置为与第一设备在第一簇时的角色和状态相同,其余的信息与接收到的第二簇的第一簇信息中相应的信息一致,可以使得第一设备及时与第二簇中的设备进行互联互通。
在一种可能的设计中,在所述第一设备设置所述第一设备的信息之前,则该方法还包括:若所述第一设备从所述第二设备接收的所述消息,则所述第一设备获取所述第二设备的MR;若所述第一设备从所述第三设备接收的所述消息,则所述第一设备获取所述第三设备的MR;若所述第一设备从所述第四设备接收的所述消息,则所述第一设备获取所述第四设备的MR。
在一种可能的设计中,所述根据所述第一设备在所述第一簇中的角色和状态确定是否在第二簇中发送同步信标消息包括:当设置所述第一设备的角色和状态与所述第一设备在第一簇中的角色和状态相同时,若设置后的所述角色为所述主设备或非主设备,状态为同步状态,则所述第一设备确定在所述第二簇中发送所述同步信标消息;若设置后的所述角色为非主设备,且所述状态为不同步状态,则所述第一设备确定不在所述第二簇中发送所述同步信标消息。
该同步信标消息携带第一设备设置后的信息中的至少一个。由此,即第一设备加入第二簇时如果设置后的角色为非主设备且状态 为不同步状态,就不需要发送同步信标消息了,以避免同步信标消息冲突,也可以节省空口资源。
在一种可能的设计中,该方法还包括:当设置第一设备的角色为主设备时,第一设备记录第一设备在第一簇中时的角色和状态;根据所述第一设备在所述第一簇中的角色和状态确定是否在所述第二簇中发送同步信标消息包括:若第一设备在第一簇中时的角色为主设备或非主设备,状态为同步状态,则第一设备确定发送同步信标消息;若第一设备在第一簇中时的角色为非主设备,且状态为不同步状态,则第一设备确定不在第二簇中发送同步信标消息。
也即,当第一设备在加入第二簇时即使以master角色加入第二簇,但是确定是否在第二簇中发送同步信标消息是以第一设备在加入到第二簇之前在第一簇中的角色和状态判断的,由于第一设备在第一簇中的角色和状态并不一定为master,且master角色的退避区间为[0,15],non-master角色sync状态的设备的退避区间为[0,31],non-master角色non-sync状态不发送同步信标消息,可避免加入到第二簇中的设备发送同步信标消息产生冲突。
在一种可能的设计中,可以在修改退避区间后在第二簇中发送同步信标消息,具体可以包括:当设置第一设备的角色为主设备时,第一设备修改退避区间,修改后的退避区间大于修改前的退避区间;第一设备根据修改后的退避区间在第二簇中发送同步信标消息。
由此,第一设备在加入第二簇时如果设置的角色为master,第一设备就会在第二簇中发送同步信标消息,但是,第一设备发送之前可以修改退避区间,使得修改后的退避区间大于修改前的退避区间,这样,加入第二簇的设备随机选择的退避数可能相同的概率降低,进而可避免发送同步信标帧产生冲突。
在一种可能的设计中,当所述第一设备的角色和状态是根据第一设备设置前的信息中的至少一个与第二簇信息中的至少一个进行比较确定的时,若设置后的角色为主设备或非主设备,状态为同步 状态时,则第一设备确定在第二簇中发送同步信标消息;若设置后的角色为非主设备,状态为不同步状态,则第一设备确定不在第二簇中发送同步信标消息。
例如第一设备设置前的角色为master,MR小于第二簇信息中的MR,那么第一设备设置后的角色为non-master,状态为sync状态,第一设备加入第二簇后确定发送同步信标帧;再例如第一设备设置前的角色为non-master,状态为sync状态,HC的值小于第二簇中的HC的值,那么第一设备设置后的角色为non-master,状态为non-sync状态,第一设备加入第二簇后不发送同步信标帧,可以避免sync冲突问题,也可以节省空口资源。
在一种可能的设计中,方法还包括:若第一设备接收到第二设备发送的第一簇信息,且第一设备处于至少一个NDC中,则第一设备确定在至少一个NDC中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
由此,第一设备若从第二簇的第二设备接收到第一簇信息,若第一设备在第一簇中处于至少一个NDC中时,也会在该至少一个NDC中发送第二簇的信息,使得至少一个NDC中听到该第二簇的信息的设备也接入到第二簇中,这样一来,第一设备在第一簇中的NDC中扩散第二簇的簇信息后,扩大了第二簇的簇信息的传播范围,且通过NDC可以实现簇信息更快的传播。
在一种可能的设计中,方法还包括:若第一设备已接收到第一簇中的其它任一设备发送的第二簇信息,则第一设备取消在至少一个NDC中发送第二簇信息。
由此,可避免第二簇信息在该至少一个NDC中重复发送,以节省空口开销。
在一种可能的设计中,方法还包括:若第一设备从第三设备接收的消息,则第一设备确定在第一设备所处的所有NDC中除第一NDC以外的其余NDC中发送第二簇的第二簇信息,第二簇信息包 括第一设备设置后的信息中的至少一项。
由此,第三设备是第一簇中的任一NDC中的设备,第一设备在接收到第三设备发送的消息时,可在第一设备所处的其余NDC中发送第二簇的信息,扩大了第二簇的簇信息的传播范围,且通过NDC可以实现簇信息更快的传播。
在一种可能的设计中,方法还包括:若第一设备已从其余NDC中的任一NDC接收到第二簇信息,则第一设备取消在其余NDC中发送第二簇信息。
由此,可避免第二簇的信息在第一簇中重复发送,节省了空口开销。
在一种可能的设计中,方法还包括:第一设备更新第一设备的NDC管理窗口、NDC数据链接NDL信息、组密钥以及设备标识中的至少一个。
由此,第一设备在加入到第二簇中后,可根据更新后的信息与第二簇中的设备及时实现互联互通。
第二方面,提供一种第一设备,第一设备处于临近感知网络NAN中,包括:
接收单元,用于接收消息,消息包括第二簇的第一簇信息;
第一确定单元,用于第一设备加入第二簇时,根据第一设备在第一簇中的角色和状态在第二簇中发送同步信标消息。
在一种可能的设计中,第一确定单元用于:若第一设备在第一簇中的角色和状态为主设备或非主设备,状态为同步状态,则第一设备在第二簇中发送同步信标消息。
在一种可能的设计中,还包括:
设置单元,用于在所述第一设备发送所述同步信标消息之前,根据所述第一簇信息设置所述第一设备的信息。
在一种可能的设计中,所述第一簇信息包括所述第二簇的簇标识、第一锚主设备排序AMR、第一锚主设备信标传输时间AMBTT、第一时间同步功能TSF和第一跳数HC中的至少一项。
在一种可能的设计中,设置单元用于:
设置第一设备的簇标识、锚主信息、第二TSF和所述第一设备的角色和状态中的至少一项;
其中,第一设备的簇标识为第二簇的簇标识;
锚主信息包括第二AMR、第二AMBTT和第二HC中的至少一项,第二AMR的值与第一AMR的值相同,第二AMBTT的值与第一AMBTT的值相同,第二HC的值为所述第一HC的值加1;
第二TSF与第一TSF相同;
第一设备的角色为主设备,状态默认为同步状态;或者,第一设备的角色和状态与第一设备在第一簇中的角色和状态相同;或者第一设备设置后的角色和状态是根据第一设备设置前的信息中的至少一个与第一簇信息中的至少一个进行比较确定的,设置前的信息包括第一设备设置前的助主设备排名MR、设置前的HC和设置前的AMBTT。
在一种可能的设计中,接收单元用于:第二簇中的第二设备发送的消息,消息包括第二簇的第一簇信息;或接收第一簇中的第三设备发送的消息,第三设备处于第一簇的第一NAN数据簇NDC中,消息包括第二簇的第一簇信息;或接收第一簇中的第四设备发送的消息,消息包括第二簇的第一簇信息。
在一种可能的设计中,在第一设备设置所述第一设备的信息之前,还包括获取单元,用于:
若所述第一设备从所述第二设备接收的所述消息,则获取所述第二设备的MR;
若所述第一设备从所述第三设备接收的所述消息,则获取所述 第三设备的MR;
若所述第一设备从所述第四设备接收的所述消息,则获取所述所述第四设备的MR。
在一种可能的设计中,第一确定单元用于:
当设置第一设备的角色和状态与第一设备在第一簇中的角色和状态相同时,若设置后的角色为主设备或非主设备,状态为同步状态,则确定在第二簇中发送同步信标消息;
若设置后的角色为非主设备,且状态为不同步状态,则确定不在第二簇中发送同步信标消息。
在一种可能的设计中,还包括:
记录单元,用于当设置第一设备的角色为主设备时,记录第一设备在第一簇中时的角色和状态;
第一确定单元用于:
若第一设备在第一簇中时的角色为主设备或非主设备,状态为同步状态,则确定发送同步信标消息;
若第一设备在第一簇中时的角色为非主设备,且状态为不同步状态,则确定不在第二簇中发送同步信标消息。
在一种可能的设计中,第一确定单元用于:当设置第一设备的角色为主设备时,确定在第二簇中发送同步信标消息;
设置单元还用于:修改退避区间,修改后的退避区间大于修改前的退避区间。
在一种可能的设计中,所述第一确定单元用于:
当所述第一设备的角色和状态是根据所述第一设备设置前的信息中的至少一个与所述第二簇信息中的至少一个进行比较确定的时,若设置后的角色为所述主设备或非主设备,状态为同步状态时,则确定在所述第二簇中发送所述同步信标消息;
若设置后的角色为非主设备,状态为不同步状态,则确定不在所述第二簇中发送所述同步信标消息。
在一种可能的设计中,还包括第二确定单元,用于:
若第一设备接收到第二设备发送的第一簇信息,且第一设备处于至少一个NDC中,则第一设备确定在至少一个NDC中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
在一种可能的设计中,还包括:
第一取消单元,用于若第一设备已接收到第一簇中的其它任一设备发送的第二簇信息,则取消在至少一个NDC中发送第二簇信息。
在一种可能的设计中,第一取消单元用于:
比较任一设备发送的第二簇信息中携带的信息与第一设备设置后的信息;
若第一AMBTT小于第二簇信息中携带的第四AMBTT,或第一HC大于第二簇信息中携带的第四HC,或第一AMR小于第二簇信息中携带的第四AMR,或第一设备的设备排序MR小于任一设备的MR,则取消在至少一个NDC中发送第二簇信息。
在一种可能的设计中,还包括第三确定单元,用于:
若第一设备从第三设备接收的消息,则确定在第一设备所处的所有NDC中除第一NDC以外的其余NDC中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
在一种可能的设计中,还包括:
第二取消单元,用于若第一设备已从其余NDC中的任一NDC接收到第二簇信息,则取消在其余NDC中发送第二簇信息。
在一种可能的设计中,还包第四确定单元,用于:
若第一设备从第四设备接收的消息,则确定在第一簇中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
在一种可能的设计中,还包括第三取消单元,用于:
若第一设备已接收到第一簇中的任一设备发送的第二簇信息,则取消在第一簇中发送第二簇信息。
在一种可能的设计中,设置单元还用于:
更新第一设备的NDC管理窗口、NDC数据链接NDL信息、组密钥以及设备标识中的至少一个。
又一方面,提供一种第一设备,该第一设备具有实现上述方法设计中第一设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。
在一种可能的设计中,第一设备包括处理器和网络接口,处理器被配置为支持第一设备执行上述方法中相应的功能,网络接口用于支持第一设备发送与接收消息。例如,网络接口用于接收消息,消息包括第二簇的第一簇信息;处理器用于确定加入第二簇时,根据第一簇信息设置第一设备的信息。第一设备还可以包括存储器,存储区用于与处理器耦合,其保存第一设备必要的程序指令和数据。
相较于现有技术,本发明提供的方法,能够在第一设备接收到第二簇的第一簇信息时,根据第一设备在第一簇中的角色和状态确定是否在第二簇中发送同步信标消息,这样可以避免加入第二簇的设备都以master角色加入并发送sync beacon消息产生的sync beacon冲突的问题,例如第一设备在第一簇中的角色为non-master,状态为non-sync时,就不需要发送sync beacon消息,不仅可以避免sync beacon冲突,还可以节省空口资源。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种包括两个Cluster的NAN网络架构示意图;
图2为本发明实施例提供的一种同一个Cluster中的一个NDC的连接示意图;
图3为本发明实施例提供的一种发送同步信标消息的方法的流程示意图;
图4为本发明实施例提供的一种发送同步信标消息的方法的流程示意图;
图5为本发明实施例提供的一种NAN设备设置信息后的信标发送和锚主信息设置的方法流程示意图;
图6为本发明实施例提供的一种NAN设备设置信息后的信标发送和锚主信息设置的方法流程示意图;
图7为本发明实施例提供的一种NAN设备设置信息后的信标发送和锚主信息设置的方法流程示意图;
图8为本发明实施例提供的一种NAN设备设置信息后的簇信息扩散方法的流程示意图;
图9为本发明实施例提供的一种NAN设备设置信息后的簇信息扩散方法的流程示意图;
图10为本发明实施例提供的一种NAN设备设置信息后的簇信息扩散方法的流程示意图;
图11为本发明实施例提供的一种第一设备的结构示意图;
图12为本发明实施例提供的一种第一设备的结构示意图;
图13为本发明实施例提供的一种第一设备的结构示意图;
图14为本发明实施例提供的一种第一设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例应用于NAN,NAN中可以包括多个Cluster,Cluster的覆盖范围之间可能存在重合区域,图1为包括两个Cluster的NAN网络架构示意图,如图1所示中的NAN Cluster1和NAN Cluster2,每个Cluster中包括多个NAN设备和/或NAN2.0设备,NAN设备之间可以进行同步、维持工作和服务发现工作。Cluster中可以包括多个NAN数据簇(NAN Data Cluster,NDC)(也可以称为data group或其它名称),每个NDC可以理解为NAN2.0设备组成的组(group),是至少2个NAN2.0设备之间为了数据传输而建立的一个组,即NAN2.0设备可以与自身所处的NDC中的其它NAN2.0设备建立NAN数据连接(NAN Data Link,NDL),且每个NDC中的NAN2.0设备可以建立多个NDL,如图2所示,图2为同一个Cluster中的一个NDC的连接示意图。其中,NAN设备或NAN2.0设备可以为手机、平板等通信终端,例如多个手机之间可以进行数据传输以同时进行网络游戏。
NAN设备之间的同步可以为时间同步;服务发现工作可以使得NAN设备基于服务发现中获得的信息建立相应的连接,从而进行数据传输;NAN设备可以分为master和non-master,master的状态可 以为anchor master(AM)和非anchor master(也简称master),且均默认为sync状态,non-master的状态可以为non-master sync和non-master non-sync。维持工作可以使得每个NAN设备均有公平的机会在这4种状态中不断改变并处于其中一种状态,具体可以每隔512TU设置一个DW,且持续时长为16TU,一个TU(time unit)大约为1024ms,处于anchor master、master以及non-master sync状态的NAN设备采用退避机制竞争发送sync beacon消息,消息中携带AM的信息,其它设备听到该消息后会设置自身的相关信息与AM保持同步。
NDC中包含一个Base Schedule(基础安排),在该Base Schedule中,NAN设备会醒来,可以接收其它NAN设备发送的消息或向其它NAN设备发送消息,相当于NDC的管理窗口,以使得NDC中的NAN设备之间进行数据通信。
现有技术中,NAN设备在从Cluster1加入到Cluster2时,以master角色加入,由于NAN设备在加入的过程中也会在Cluster1中发送Cluster2的信息,使得Cluster1中听到该信息的NAN也会以master角色加入Cluster2,这样会有多个master角色的NAN设备在Cluster2中发送sync beacon消息,又由于master角色用于发送sync beacon消息的退避区间为[0,15],容易产生sync beacon冲突,因此,本发明为了解决这一问题,在NAN设备确定加入Cluster2时,可以根据NAN设备在Cluster1中的角色和状态确定是否在Cluster2中发送sync beacon消息,用于避免sync beacon冲突的问题。因此本发明实施例提供一种NAN设备发送同步信标消息的方法,如图3所示,该方法包括:
301、NAN中处于第一簇中的第一设备接收消息,消息包括第二簇的第一簇信息。
第一簇为第一设备所处的第二簇的上个簇,或,merge到第二簇之前所处的簇。
NAN中处于第一簇(记为Cluster1)中的第一设备可以接收第二簇(记为Cluster2)中的第二设备发送的消息,该消息包括第二簇的第一簇信息,该消息具体可以为DW内的同步信标(sync beacon)帧,也可以是DW之外的发现信标(discovery beacon)帧;
或者,第一设备接收第一簇中的第三设备发送的消息,第三设备处于第一簇的第一NDC中,该消息包括第二簇的第一簇信息,该消息具体可以为宣告消息(announcement frame);
或者,第一设备接收第一簇中的第四设备发送的消息,该消息可以为DW内的sync beacon消息,也可以是DW之外的discovery beacon消息,包括第二簇的第一簇信息,该第四设备可能在第一簇的NDC中,也可能不在第一簇的NDC中,该消息可以以广播形式在第一簇中扩散。
将第一设备记为NAN设备A,第二设备记为NAN设备B,第一簇信息即Cluster2的信息,包括以下的至少一项:Cluster ID(簇标识)、AMR、TSF、AMBTT和HC等。其中,Cluster ID为Cluster2的ID;AMR为Cluster2中的AM的MR的值;AMBTT为Cluster2中的AM的AMBTT的值;HC为NAN设备B到Cluster2中的AM的HC值;TSF为NAN设备A接收到的消息中的TSF的值,TSF值是根据消息中的时间戳(time stamp)得来的,通常可以用TSF代替TSF值。第一设备还可以根据Cluster2的信息获取Cluster2的CG值,CG值的计算规则为:CG=2^64*A1+A2,A1为Cluster2中AM的主设备意愿(Master Preference,MP)的值,记为AMP,AMP表示锚主设备作为主设备的意愿的值,A2为TSF的值。
CG为簇等级信息;AMR为AM的MR值;MR值表示NAN设备想作为master的意愿,MR值越大,表示意愿越高;TSF表示NAN设备的同步功能,可使得NAN设备的计时器与AM的时间相同;AMBTT表示AM的beacon的发送时间;HC值表示NAN设备到AM的跳数。
当Cluster1中的NAN设备A接收到Cluster2的信息时,NAN设备A会根据Cluster2的信息中的Cluster ID与Cluster1的Cluster ID是否相同,并确定Cluster2的信息中的CG值是否大于NAN设备A所在的Cluster1的CG值,如果Cluster ID不同,且Cluster2的信息中的CG值大于Cluster1的CG值,则NAN设备确定加入到Cluster2中,否则,NAN设备A丢弃接收到的消息。
302、第一设备加入第二簇时,根据第一设备在第一簇中的角色和状态在第二簇中发送同步信标消息。
示例性的,当NAN设备A确定加入Cluster2时,可以根据NAN设备A在Cluster1中的角色和状态确定是否在Cluster2中发送sync beacon消息,例如NAN设备A在Cluster1中时的角色为master,或角色为non-master状态为sync时,那么NAN设备A在加入到Cluster2中时,确定发送sync beacon消息;当NAN设备A在Cluster1中的角色为non-master,状态为non-sync时,NNA设备A在加入Cluster2时确定不发送sync beacon消息。
或者,可以当NAN设备A在以master角色加入Cluster2时,由于目前的规范中master角色的NAN设备发送sync beacon消息的退避区间为[0,15],因此,可以修改退避区间,使得修改后的退避区间大于修改前的退避区间[0,15],例如修改后的退避区间为[0,50]会其他的区间,使得NAN设备选取的退避数相同的概率降低,以避免发生sync beacon冲突。
现有技术中NAN规范没有规定NAN设备在从Cluster1加入到Cluster2中时如何设置自身的信息,使得各个厂商的NAN设备在实现时没有统一的标准,不同NAN设备的信息不同时可能会导致NAN设备在加入Cluster2时不能及时与Cluster2中的AM同步,进而使得NAN设备间无法实现互联互通,因此,在NAN设备加入到Cluster2时发送sync beacon消息之前,NAN设备还可以先根据接收到的Cluster2的信息设置自身的信息,以便及时与Cluster2中的设 备实现互联互通,因此,如图4所示,在第一设备发送同步信标消息之前,还包括:
303、第一设备根据第一簇信息设置第一设备的信息。
该第一设备的信息的设置可以是在第一设备决定加入第二簇时,或者是在第一设备决定后准备加入第二簇时,或者是在第一设备已经加入到第二簇后,本申请不做限定。
第一设备即NAN设备A设置自身的信息时,可以根据Cluster2的第一簇信息设置第一设备的锚主信息(current anchor master record)、TSF、第一设备的角色和状态和簇标识中的至少一项,还可以包括上一锚主信息(last anchor master record)。锚主信息还可以是带在sync beacon中发送的信息(包括:第二AMR、第二AMBTT和第二HC中的至少一项),或,带在announcement frame中发送的信息(包括:第二AMR、第二AMBTT和第二HC中的至少一项)。
其中,current anchor master record包括第一AMR、第一AMBTT和第一HC中的至少一项,第一AMR的值设置为步骤301中获得的Cluster2中的AM的MR(第二AMR)的值,即第一AMR的值与第二AMR的值相同;第一AMBTT的值设置为步骤301中的Cluster2的AM的AMBTT(第二AMBTT)的值,即第一AMBTT的值与第二AMBTT的值相同;第一HC的值设置为步骤301中获得的HC值加1;由于上一锚主信息是Cluster1中的AM的信息,因此,NAN设备A确认要加入到Cluster2中时,上一锚主信息就可以设置为空或者0;第一TSF需要与加入后的Cluster2中的时间信息同步,因此第一TSF就设置为消息中携带的第二TSF;NAN设备A的角色可以直接设置为主设备,状态为同步状态,或直接默认为同步状态,或者也可以与NAN设备A在Cluster1中时的角色和状态相同;簇标识(Cluster ID)设置为NAN设备A待加入的Cluster2的ID。由于HC表示NAN设备到AM的跳数,TSF表示发送消息的时间信息,如果第一设备接收到第二设备、第三设备和第四设备中的至少两个 设备发送的消息时,消息中的第一簇信息的HC和TSF可能不同。
其中,NAN设备A的角色和状态设置与Cluster1中时的角色和状态相同具体可以为:NAN设备A在接收到上述sync beacon消息之前的角色和状态,或NAN设备A在Cluster1中的DW开始时的角色和状态,或NAN设备A在Cluster1的DW结束时的角色和状态等,本申请不做限定。
例如,NAN设备A在Cluster1中时的角色为non-master,状态为sync状态,则NAN设备A在加入到Cluster2时角色依然为non-master,状态依然为sync状态;或,NAN设备A在Cluster1中时的角色为master,状态默认为sync状态,则NAN设备A在加入到Cluster2时角色依然为master,状态依然为sync状态。
对于第一设备接收到第三设备或第四设备发送的消息,即从第一设备所在的第一簇中的设备接收到消息时,第一设备还可以获取第三设备或第四设备的MR,具体地,若第一设备从第三设备接收的消息,则第一设备接收到的第一簇信息还包括第三设备的MP值和随机数(random factor,RF),第一设备可以至少根据第三设备的MP值、RF值和媒体访问控制(Media Access Control,MAC)地址计算得出第三设备的MR;若第一设备从第四设备接收的消息,则第一簇信息还包括第四设备的MP值和RF值,第一设备可以根据第四设备的MP值和RF值计算得出第四设备的MR。
此时,在设置第一设备的角色和状态时,第一种情况:可以设置第一设备的角色为主设备,状态默认为同步状态,第二种情况:也可以设置第一设备的角色和状态与第一设备在第一簇中的角色和状态相同,第三种情况:还可以根据第一设备设置前的信息与第一簇信息中的至少一个进行比较确定第一设备设置后的角色和状态。
对于第三种情况,第一设备在接收到消息之后,可以根据第一设备的MR、HC和AMBTT与接收到的消息中相应的第三设备或第四设备的MR、HC和AMBTT进行比较,例如获取的第三设备或第 四设备的MR高于第一设备的MR的值,或者消息中的HC值高于第一设备的HC值,或者消息中的AMBTT值大于第一设备的AMBTT值,此时满足其中的任一个条件时,若第一设备当前的状态为master角色sync状态,第一设备从master角色sync状态更新为non-master角色sync状态,或者,若第一设备当前的状态为non-master角色sync状态,则第一设备从non-master角色sync状态更新为non-master角色non-sync状态。或,第一设备在加入第二簇之前,如果接收到(多个)消息中的MR值都没自己的MR值高,或,接收到(多个)消息中的HC值都没自己的HC值高,第一设备可以从其它角色更新为master角色。
可选的,第一设备在接收到消息之后,还可以判断消息是否满足近距离条件或远距离条件中的一个,其中,近距离条件为消息中的接收强度指示(Receive Signal Strength Indicator,RSSI)大于-60dBm,远距离条件为RSSI大于-75且小于-60dBm。如果消息满足近距离条件,第一设备在接收到该消息后,可以执行上述第三种情况中的设置过程。或,如果消息满足远距离条件,第一设备在接收到该消息后,可以执行上述第三种情况中的设置过程,也可以用于第一种情况或第二种情况。
这样一来,NAN设备在确认加入到Cluster2时,并不是直接以master角色加入,并设置MR为NAN设备自身的MR,HC也并不是如master角色一样为0,AMBTT也并不是如master角色一样为0,而是可以将角色和状态设置为master,状态默认为sync,或与NAN设备在Cluste1r中的角色和状态相同,但是设备信息是按照与接收到的Cluster2的信息设置NAN设备自身的信息,或者根据第一设备设置前的信息中的至少一个与第一簇信息中的至少一个进行比较确定第一设备的角色和状态,于是,当NAN设备加入到Cluster2种时,NAN设备就可以与Cluster2中的AM及时同步,使得新加入到Cluster2中的NAN设备可以及时与Cluster2中的NAN设备实现互联互通。
在上述设置第一设备的信息的说明的基础上,为了解决sync beacon冲突的问题,第一设备在加入第二簇后,可以根据设置后的第一设备的信息确定是否在第二簇中发送同步信标消息,具体地,图5为一种NAN设备设置信息后的信标发送方法的流程示意图,如图5所示,上述方法还可以包括:
304、当设置第一设备的角色和状态与第一设备在第一簇中的角色和状态相同时,第一设备在加入第二簇后,根据设置后的第一设备的信息确定是否在第二簇中发送同步信标消息。
具体的,当步骤303中设置后的角色为主设备或非主设备,状态为同步状态,则第一设备确定在第二簇中发送同步信标消息,同步信标消息中携带第一设备设置后的信息中的至少一项;若设置后的角色为非主设备,且状态为不同步状态,则第一设备确定不在第二簇中发送同步信标消息。
示例性的,当NAN设备A是在加入Cluster2时,设置后的角色和状态与NAN设备A在Cluster1中的角色和状态相同时:
如果NAN设备A设置后的角色为master或non-master,状态为sync状态,则确定在Cluster2中发送sync beacon消息;如果NAN设备A设置后的角色为non master角色且状态为non sync状态,则确定在Cluster2中不发送sync beacon消息。
其中,如果NAN设备A确定在Cluster2中发送sync beacon消息,该sync beacon消息包括NAN设备A在步骤302中阐述的设置后的current anchor master record中的一项或多项,即设置后的AMR、HC、AMBTT、TSF、cluster ID以及NAN设备A自身的MR中的一项或多项。
这样一来,NAN设备A在加入到Cluster2时若以自身原来在Cluster1中的角色和状态确定是否发送sync beacon消息,可以有效降低Cluster1中的多个NAN设备由于接收到NAN设备A发送的beacon消息而以master角色加入到Cluster2中时,多个NAN设备 竞争发送sync beacon消息时产生的冲突问题。
另外,当NAN设备A处于master角色时,可以随机选择退避区间[0,15]中的任一个退避数去竞争发送sync beacon消息,并携带当前设置后的current anchor master record中的信息;当NAN设备A处于non master sync状态时,可以随机选择退避区间[0,31]中的任一个退避数去竞争发送sync beacon消息,并携带当前设置后的current anchor master record中的信息。于是,在不同角色和状态的设置下,根据不同的退避区间随机选择的退避数,可以进一步有效降低多个NAN设备处于sync状态时竞争发送sync beacon消息时的冲突问题。
进一步的,第一设备在加入到第二簇中后,会接收到第二簇中的其它NAN设备发送的sync beacon消息,因此,上述方法还包括步骤305:
305、第一设备在接收到第二簇中的其它设备发送的同步信标消息时,根据该同步信标消息设置第一设备自身的锚主信息。
具体的,NAN设备A在接收到Cluster2中的其它NAN设备发送的sync beacon消息时,会将接收到的sync beacon消息中的信息与NAN设备A设置后自身的信息进行比对,以确定是否修改自身的锚主信息,以与Cluster2中的其它NAN设备保持同步。
示例性的,若sync beacon消息中的AMR大于NAN设备A设置后的AMR,说明Cluster2中的anchor master设备的MR值大于NAN设备A自身的MR值,Cluster2中的anchor master设备作为锚主设备的意愿更大,NAN设备A需要根据sync beacon消息中的信息设置自身的current anchor master record中的信息中的一项或多项:NAN设备A将自身的current anchor master record中的AMR值更新为sync beacon消息中的AMR;更新自身的TSF时间信息与sync beacon消息中的TSF的值相同;更新自身的AMBTT为sync beacon消息中的AMBTT;HC值更新为sync beacon消息中的HC值加1。 同时,NAN设备A设置自身的last anchor master record:设置AMR为未更新前的current anchor master record中的AMR;设置AMBTT为未更新前的current anchor master record中的AMBTT;
若sync beacon消息中的AMR小于或等于NAN设备A设置后的AMR,则NAN设备A不做处理,或者,NAN设备A比较sync beacon消息中的AMBTT的值与NAN设备A设置后的自身的AMBTT的值,如果NAN设备A自身的AMBTT的值小于sync beacon消息中的AMBTT的值,则将NAN设备A自身的AMBTT的值更新为sync beacon消息中的AMBTT的值,这是由于sync beacon消息中的AMBTT的值大于NAN设备A自身的AMBTT的值时,表示时间信息是最新的,NAN设备A要与最新的时间同步;如果NAN设备A自身的AMBTT的值大于sync beacon消息中的AMBTT的值,则NAN设备A不做处理。
此外,若sync beacon消息中携带的MR值大于NAN设备A自身的MR值,则当NAN设备A当前为master角色时,需要更新自身的角色为non-master角色,状态依然为sync状态,当NAN设备A当前为non-master角色,状态为sync状态时,需要更新自身的角色为non-master角色,状态为non-sync状态;或
若sync beacon消息中携带的HC值小于NAN设备A自身当前的HC值,则当NAN设备A当前为master角色时,需要更新自身的角色为non-master角色,状态依然为sync状态,当NAN设备A当前为non-master角色,状态为sync状态时,需要更新自身的角色为non-master角色,状态为non-sync状态;或
若sync beacon消息中携带的AMBTT值大于NAN设备A自身当前的AMBTT值,则当NAN设备A当前为master角色时,需要更新自身的角色为non-master角色,状态依然为sync状态,当NAN设备A当前为non-master角色,状态为sync状态时,需要更新自身的角色为non-master角色,状态为non-sync状态。
如果步骤303中设置第一设备的角色为主设备,状态为同步状态时,如图6所示,图6为本发明实施例提供的一种NAN设备设置信息后的信标发送和锚主信息设置的方法流程示意图,上述步骤304~305可以替换为步骤306~308:
306、当设置第一设备的角色为主设备,状态为同步状态时,第一设备记录第一设备在第一簇中时的角色和状态。
例如当NAN设备A从Cluster1加入到Cluster2中时,虽然确定设置后的角色为master,但还需记录设备自身在Cluster1中时的角色和状态。
307、第一设备在加入第二簇后,根据设置后的第一设备的信息确定是否在第二簇中发送同步信标消息。
与步骤304类似的,若第一设备在第一簇中时的角色为主设备或非主设备,状态为同步状态,则确定发送同步信标消息;若第一设备在第一簇中时的角色为非主设备,且状态为不同步状态,则第一设备确定不在第二簇中发送同步信标消息。
与步骤304不同的是,由于步骤304是在第一设备加入到第二簇时,设置的是与第一设备在第一簇中时的角色和状态相同的情况下,而步骤306~307是在第一设备加入到第二簇中时设置的角色为主设备,状态默认为同步状态的情况下,因此,若步骤307确定发送同步信标消息,该同步信标消息携带第一设备设置后的信息中的至少一项。
举例来说,虽然NAN设备A离开Cluster1加入到Cluster2中后的角色设置为master,状态为sync状态,但是确定是否发送sync beacon消息还是以NAN设备A记录的在Cluster1时的角色和状态决定的,所发送的sync beacon消息携带的信息是设置后的信息,可以有效降低Cluster1中的多个NAN设备由于接收到NAN设备A发送的beacon消息而以master角色加入到Cluster2中时,Cluster2中的多个NAN设备竞争发送sync beacon消息时的冲突问题。
同样地,当NAN设备A在cluster1中处于master角色,在加入cluster2中后,可以随机选择退避区间[0,15]中的任一个退避数去竞争发送sync beacon消息,并携带当前设置后的current anchor master record中信息;当NAN设备A处于non master sync状态时,可以随机选择退避区间[0,31]中的任一个退避数去竞争发送sync beacon消息,并携带当前设置后的current anchor master record中的信息。于是,在不同角色和状态的设置下,根据不同的退避窗口随机选择的退避数,可以进一步有效降低Cluster2中处于sync状态下的多个NAN设备竞争发送sync beacon消息时的冲突问题。
进一步的,第一设备在加入到第二簇中后,会接收到第二簇中的其它NAN设备发送的sync beacon消息,因此,上述方法还包括:
308、第一设备在接收到第二簇中的其它设备发送的同步信标消息时,以主设备的角色根据该同步信标消息设置第一设备自身的锚主信息。
具体的,NAN设备A在接收到Cluster2中的其它NAN设备发送的sync beacon消息时,会将接收到的sync beacon消息中的信息与NAN设备A设置后自身的信息进行比对,以确定是否还作为主设备,并修改自身的锚主信息,以与Cluster2中的其它NAN设备保持同步。
示例性的,若sync beacon消息中的AMR值大于NAN设备A自身的AMR值,则NAN设备A将不再作为master角色,需要更新自身的角色为non master,并更新自身的current anchor master record中的一项或多项信息:更新AMR为sync beacon消息中的AMR;更新TSF的值为sync beacon消息中的TSF的值;更新AMBTT的值为sync beacon消息中的AMBTT;更新HC值为sync beacon消息中的HC值加1。同时,NAN设备A设置自身的last anchor master record:设置AMR为未更新前的current anchor master record中的AMR;设置AMBTT为未更新前的current anchor master record中的 AMBTT;
若sync beacon消息中的AMR小于NAN设备A设置后的AMR,则NAN设备A不做处理;若sync beacon消息中的AMR等于NAN设备A设置后的AMR,则NAN设备也不做处理,或者,NAN设备A比较sync beacon消息中的AMBTT的值与NAN设备A设置后的自身的AMBTT的值,如果NAN设备A自身的AMBTT的值小于sync beacon消息中的AMBTT的值,则将NAN设备A自身的AMBTT的值更新为sync beacon消息中的AMBTT的值;如果NAN设备A自身的AMBTT的值大于sync beacon消息中的AMBTT的值,则NAN设备A不做处理。
此外,与步骤305类似的,若sync beacon消息中携带的MR值大于NAN设备A自身的MR值,则当NAN设备A当前为master角色时,需要更新自身的角色为non-master角色,状态依然为sync状态,当NAN设备A当前为non-master角色,状态为sync状态时,需要更新自身的角色为non-master角色,状态为non-sync状态;或
若sync beacon消息中携带的HC值小于NAN设备A自身当前的HC值,则当NAN设备A当前为master角色时,需要更新自身的角色为non-master角色,状态依然为sync状态,当NAN设备A当前为non-master角色,状态为sync状态时,需要更新自身的角色为non-master角色,状态为non-sync状态;或
若sync beacon消息中携带的AMBTT值大于NAN设备A自身当前的AMBTT值,则当NAN设备A当前为master角色时,需要更新自身的角色为non-master角色,状态依然为sync状态,当NAN设备A当前为non-master角色,状态为sync状态时,需要更新自身的角色为non-master角色,状态为non-sync状态。
如果步骤303中设置第一设备的角色为主设备,状态为同步状态时,如图7所示,图7为本发明实施例提供的一种NAN设备设置信息后的信标发送和锚主信息设置的方法流程示意图;上述步骤 304~305或步骤306~308也可以替换为步骤309~310:
309、当设置第一设备的角色为主设备,状态为同步状态时,第一设备修改退避区间后加入第二簇,并在第二簇中发送同步信标消息。
示例性的,当NAN设备A离开Cluster1加入到Cluster2中时,设置NAN设备A的角色为master,状态为sync状态时,可以采用新定义的退避区间,新定义的退避区间大于修改前的退避区间[0,15],例如[0,50]或者其他更大的区间[0,X],其中X大于15或大于31,但X小于DW的长度值,使得新定义后的退避区间大于修改前的退避区间。这样一来,即使NAN设备A加入到Cluster2中后的角色为master,其状态默认为sync状态,Cluster1中的多个NAN设备由于接收到NAN设备A发送的beacon消息也以master角色加入到Cluster2中,使得Cluster2中多个master角色的NAN设备竞争发送sync beacon消息,但是由于采用新定义的更大一些的退避区间,可使得多个master角色随机选取的退避数重复的概率降低,可以有效降低sync beacon发送时的冲突问题。
其中,第一设备在发送sync beacon消息时携带步骤303中设置后的current anchor master record中信息。
进一步的,第一设备在加入到第二簇中后,会接收到第二簇中的其它NAN设备发送的sync beacon消息,因此,上述方法还包括:
310、第一设备在接收到第二簇中的其它设备发送的同步信标消息时,以主设备的角色根据该同步信标消息设置第一设备自身的锚主信息。
步骤310的具体实现方式同步骤308类似,此处不再赘述。
再进一步的,现有技术中,当第一设备接收到的是包括第二簇的簇信息的同步信标消息或发现信标消息时,第一设备会以广播形式在第一簇的DW中发送sync beacon消息,该sync beacon消息中 包括第二簇的簇信息,以便第一簇中听到该sync beacon消息的设备也可以加入到第二簇中。但是,由于第一簇中的第一设备接收到来自第二簇的簇信息时,可能来自第二簇中的第二设备发送的同步信标消息或发现信标消息,也可能来自第一簇中的第三设备发送的NDC消息,或者接收到第一簇中的第四设备发送的包括第二簇的第一簇信息的消息。现有技术仅以广播形式扩散第二簇的簇信息,可能使得第一簇中的某些NAN设备接收不到消息,即传播范围有限,本申请中,如果第一设备接收到的是第二簇的第二设备发送的消息,且第一设备在第一簇中属于至少一个NDC,那么第一设备需要在该至少一个NDC中发送NDC消息,NDC消息包括第二簇的簇信息,以便第一簇中该至少一个NDC中听到该NDC消息的设备加入到第二簇中;或者,当第一设备接收到的自己所处的NDC中的第三设备发送的NDC消息时,第一设备也可以在自己所处的多个NDC中发送该NDC消息,以便该多个NDC中的设备加入到第二簇中;或者,该第一设备也可以在第一簇中广播第四设备发送的消息,因此,在第一设备加入到第二簇之前,如图8所示,图8为本发明实施例提供的一种NAN设备设置信息后的簇信息扩散方法的流程示意图。下述步骤311~313在上述步骤303之后执行,在上述步骤304~305或步骤306~308或步骤309~310之前执行,上述方法还包括:
311、若第一簇中的第一设备从第二簇的第二设备接收的第一簇信息,且第一设备处于至少一个NDC中,则第一设备确定在至少一个NDC中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
示例性的,Cluster1中的NAN设备A接收到Cluster2中的NAN设备B发送的sync beacon消息或discovery beacon消息,该消息中包括Cluster2的信息,即第一簇信息,具体包括ClusterID、AMR、TSF、AMBTT以及HC中的一项或多项。若NAN设备A在Cluster1中处于多个NDC中,则NAN设备A在根据第一簇信息设置NAN设备A自身的信息之后,NAN设备A在该多个NDC的管理窗口中 发送第二簇的第二簇信息,第二簇信息包括NAN设备A设置后的信息中的至少一项。其中NAN设备A发送第二簇信息的消息可以为sync beacon消息或announcement frame消息,NAN设备A在多个NDC管理窗口中发送即不仅要在NAN设备A所属的NDC1的管理窗口中发送,也要在NAN设备A所属的NDC2等的管理窗口中发送。
其中,sync beacon消息或announcement frame消息的格式可以是采用现有的sync beacon的消息格式、或action消息格式、或服务发现(service discovery frame,SDF)消息格式,或采用新定义的消息格式均可。
如果NAN设备A确定在NDC中准备发送Cluster2的信息时,接收到其它设备发送的Cluster2的信息,NAN设备A取消在NDC中发送Cluster2的信息,因此,该方法还包括:
312、若第一设备已接收到第一簇中的其它任一设备发送的第二簇的第二簇信息,则第一设备取消在至少一个NDC中的部分或全部NDC中发送第二簇信息。
这样,可以避免NAN设备A重复在Cluster1中发送Cluster2的信息,节省空口开销。
具体地,第一设备在确定是否要取消发送NDC消息时,可以通过比较该任一设备发送的第二簇信息中携带的信息与第一设备设置后的信息确定。例如,若步骤303中设置后的第一AMBTT小于第二簇信息中携带的第四AMBTT,或第一HC大于第二簇信息中携带的第四HC,或第一AMR小于第二簇信息中携带的第四AMR,或第一设备的设备排序MR小于任一设备的MR,或者,第一设备的HC大于该任一设备自身的HC,则第一设备取消在至少一个NDC中发送第一簇信息。
需要说明的是,第一设备确定在所处的NDC中发送第二簇信息时,该第二簇信息中还可以包括第一设备将要加入第二簇的时间信 息,或时间段信息,以通知NDC中的NAN设备该第一设备在该时间段信息到达时加入第二簇中,这样,可使得NDC中的设备同时加入到第二簇中。例如,第一设备正在和NDC中的其他设备正在通讯,比如正在聊天,当其他设备同时加入第二簇后将不影响正在进行的业务。
313、第一设备更新第一设备的NDC管理窗口、NDC数据链接NDL信息、组密钥以及设备标识中的至少一个。
例如当NAN设备A处于NDC中时,NAN设备A将自身的NDC管理窗口修改为Cluster2中的DW的管理窗口。原有的NDC管理窗口为NDC管理窗口的开始时间到Cluster1的DW的offset1,修改后的NDC管理窗口为NDC管理窗口的开始时间到Cluster2的DW的offset2。具体可以根据第一设备接收到的消息中的AMBTT(即Cluster2的AMBTT)和第一设备自身所处的Cluster1中的AMBTT进行修改,或根据接收到的消息中的TSF offset进行修改。该offset可以用位表(bitmap)的形式描述,位表中位图置为1表示这个时间单元是可用的,位图置0或置空表示NAN设备A在该时间单元指示的时间段进入休眠状态。如表1所示,以16个TU为设备在某个信道上工作的最小时间单元,在每个16TU内,NAN设备A处于休眠状态或工作在某个信道上,位表中位置为1的位置就作为NAN设备A的NDC管理窗口,NAN设备A要在这个时间段醒着。
表1
Figure PCTCN2016077566-appb-000001
由于NDL为NAN设备之间协商的时频资源,包括信道和时间, 当NAN设备A加入到Cluster2中时,需要重新修改或协商修改NDL的信息,即NDL schedule,具体可以按照NDC管理窗口的位表方式进行修改。
NAN设备A加入Cluster2中时,也需要更新组密钥(group key),以便于不同组之间的NAN设备进行通信。其中,NAN设备之间使用相同的组标识(group ID)的可以为一组,也可以是支持相同服务的NAN设备为一组,或者属于相同的地理位置的NAN设备为一组,或者多个NAN设备之间需要互相进行数据通信的为一组,本申请不做限定。组密钥可以基于TSF的前4个八位组(octet)即前4个字节生成的,具体可以结合TSF的前4个字节作为组密钥的一部分来更新组密钥。同时,NAN设备A加入到Cluster2中时,还需要更新NAN设备A在Cluster2中的设备标识(设备标识,service identity),具体可以至少结合TSF的部分信息和设备名称进行哈希运算生成新的SID,或者,至少结合组密钥的部分信息和设备名称进行哈希运算生成新的SID等,本申请不做限定。这样一来,NAN设备A在Cluster1中的NDC中扩散第二簇的簇信息后,扩大了第二簇的簇信息的传播范围,且通过NDC可以实现簇信息更快的传播。
可替换的,如图9所示,图9为本发明实施例提供的一种NAN设备设置信息后的簇信息扩散方法的流程示意图。上述步骤311~313也可以替换为314~316:
314、若第一簇中的第一设备从第一簇的第三设备接收的消息,则第一设备确定在第一设备所处的所有NDC中除第一NDC以外的其余NDC中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
由于步骤301中说明第三设备处于第一簇的第一NDC中,此时记为NDC1,也就是说,如果第一设备是通过设备自身所处的NDC1中的设备接收到的第一簇信息,第一设备在根据第一簇信息设置自身的信息之后,第一设备也需要在自己所处的NDC中除NDC1以外 的其余NDC(例如NDC2)中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。第一设备发送第二簇信息所采用的消息格式可以如步骤311中的阐述,此处不再赘述。
315、若第一设备已从其余NDC中的任一NDC接收到第二簇信息,则第一设备取消在其余NDC中发送第二簇信息。
这样,可以避免第二簇信息在第一设备所处的NDC中重复发送,节省了空口资源。
316、第一设备更新第一设备的NDC管理窗口、NDC数据链接NDL信息、组密钥以及设备标识中的至少一个。
该步骤的具体实现方式可以参考上述步骤313,此处不在赘述。
可替换的,如图10所示,图10为本发明实施例提供的一种NAN设备设置信息后的簇信息扩散方法的流程示意图,上述步骤311~313或步骤314~316也可以替换为步骤317~318:
317、若第一簇的第一设备从第一簇的第四设备接收的消息,则第一设备确定在第一簇中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
第四设备在第一簇中不属于任一NDC或者属于任一NDC时,如果第四设备接收到第一簇信息,第四设备可以在第一簇中广播该第一簇信息,第一设备接收到包括该第一簇信息的消息时,在根据第一簇信息设置自身的信息后,可以在第一簇中广播第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一个,使得接收到该第二簇信息的第一簇中的其它设备也可以加入到第二簇中,其中所采用的消息格式可以如步骤311中的阐述,此处不再赘述。
318、若第一设备已接收到第一簇中的任一设备发送的第二簇信息,则第一设备取消在第一簇中发送第二簇信息。
这样,可以避免第一簇信息在第一簇中重复发送,节省了空口 资源。
综上所述,本申请中,当第一簇中的第一设备接收到第二簇的第一簇信息时,可以根据第二簇的第一簇信息设置第一设备自身的信息,以便第一设备在加入到第二簇中后,可以及时与第二簇中的设备实现互联互通。进一步的,第一设备在加入到第二簇中后,是否要在第二簇中发送同步信标消息,是根据第一设备设置后的信息确定的,这样可以避免加入到第二簇的多个设备在第二簇中发送同步信标消息而发生冲突,导致第二簇中的设备接收不到消息。再进一步的,第一设备在设置自身的信息之后,也可以在第一簇中广播或在第一设备所处的NDC中发送设置后的信息,以便听到该信息的设备也加入到第二簇中,可以扩大第二簇的簇信息的传播范围,且通过NDC可以实现簇信息更快的传播。
本发明实施例还提供一种第一设备11,第一设备11处于临近感知网络NAN中,如图11所示,包括:
接收单元111,用于接收消息,消息包括第二簇的第一簇信息;
第一确定单元112,用于确定加入第二簇时,根据第一设备在第一簇中的角色和状态在第二簇中发送同步信标消息;
或发送单元113(图中未示出),用于在修改退避区间后在第二簇中发送所述同步信标消息。
可选的,第一确定单元112用于:若第一设备在第一簇中的角色和状态为主设备或非主设备,状态为同步状态,则第一设备在第二簇中发送同步信标消息。
还可以包括:
设置单元113,用于在所述第一设备发送同步信标消息之前,根据第一簇信息设置第一设备的信息。
可选的,接收单元111可以用于:
第二簇中的第二设备发送的消息,消息包括第二簇的第一簇信 息;或
接收第一簇中的第三设备发送的消息,第三设备处于第一簇的第一NAN数据簇NDC中,消息包括第二簇的第一簇信息;或
接收第一簇中的第四设备发送的消息,消息包括第二簇的第一簇信息;
其中,第一簇信息包括第二簇的簇标识、第一锚主设备排序AMR、第一锚主设备信标传输时间AMBTT、第一时间同步功能TSF和第一跳数HC中的至少一项。
可选的,设置单元113可以用于:
设置第一设备的簇标识、锚主信息、第二TSF和第一设备的角色和状态中的至少一项;
其中,第一设备的簇标识为第二簇的簇标识;
锚主信息包括第二AMR、第二AMBTT和第二HC中的至少一项,第二AMR的值与第一AMR的值相同,第二AMBTT的值与第一AMBTT的值相同,第二HC的值为第一HC的值加1;
第二TSF与第一TSF相同;
第一设备的角色为主设备,状态默认为同步状态;或者,第一设备的角色和状态与第一设备在第一簇中的角色和状态相同;或者第一设备设置后的角色和状态是根据第一设备设置前的信息中的至少一个与第一簇信息中的至少一个进行比较确定的,设置前的信息包括第一设备设置前的助主设备排名MR、设置前的HC和设置前的AMBTT。
可选的,接收单元111可以用于:
接收第二簇中的第二设备发送的消息,消息包括第二簇的第一簇信息;或
接收第一簇中的第三设备发送的消息,第三设备处于第一簇的 第一NAN数据簇NDC中,消息包括第二簇的第一簇信息;或
接收第一簇中的第四设备发送的消息,消息包括第二簇的第一簇信息。
可选的,在第一设备设置第一设备的信息之前,还包括获取单元114,用于:若所第一设备从第二设备接收的消息,则获取第二设备的MR;
若第一设备从第三设备接收的消息,则获取第三设备的MR;
若第一设备从第四设备接收的消息,则获取所述第四设备的MR。
可选的,第一确定单元112,用于第一设备在加入第二簇后,确定是否在第二簇中发送同步信标消息。
可选的,当设置第一设备的角色和状态与第一设备在第一簇中的角色和状态相同时,若设置后的角色为主设备或非主设备,状态为同步状态,则确定在第二簇中发送同步信标消息;
若设置后的角色为非主设备,且状态为不同步状态,则确定不在第二簇中发送同步信标消息。
可选的,当设置第一设备的角色为主设备时,还包括:
记录单元115,图中未示出,用于当设置第一设备的角色为主设备时,记录第一设备在第一簇中时的角色和状态;
第一确定单元112用于:
若第一设备在第一簇中时的角色为主设备或非主设备,状态为同步状态,则确定发送同步信标消息;
若第一设备在第一簇中时的角色为非主设备,且状态为不同步状态,则确定不在第二簇中发送同步信标消息。
可选的,发送单元113可以用于:当设置第一设备的角色为主设备时,修改退避区间,修改后的退避区间大于修改前的退避区间;
根据所述修改后的退避区间在所述第二簇中发送所述同步信标消息,同步信标消息携带第一设备设置后的信息中的至少一项。
可选的,还可以包括第二确定单元116,用于:
若第一设备接收到第二设备发送的第一簇信息,且第一设备处于至少一个NDC中,则第一设备确定在至少一个NDC中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
可选的,还可以包括:
第一取消单元117,用于若第一设备已接收到第一簇中的其它任一设备发送的第二簇信息,则取消在至少一个NDC中发送第二簇信息。
可选的,第一取消单元117可以用于:
比较任一设备发送的第二簇信息中携带的信息与第一设备设置后的信息;
若第一AMBTT小于第二簇信息中携带的第四AMBTT,或第一HC大于第二簇信息中携带的第四HC,或第一AMR小于第二簇信息中携带的第四AMR,或第一设备的设备排序MR小于任一设备的MR,则取消在至少一个NDC中发送第二簇信息。
可选的,如图12所示,还可以包括第三确定单元120,用于:
若第一设备从第三设备接收的消息,则确定在第一设备所处的所有NDC中除第一NDC以外的其余NDC中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
可选的,还可以包括:
第二取消单元121,用于若第一设备已从其余NDC中的任一NDC接收到第二簇信息,则取消在其余NDC中发送第二簇信息。
可选的,如图13所示,还可以包括第四确定单元130,用于:
若第一设备从第四设备接收的消息,则确定在第一簇中发送第二簇的第二簇信息,第二簇信息包括第一设备设置后的信息中的至少一项。
可选的,还包括第三取消单元131,用于:
若第一设备已接收到第一簇中的任一设备发送的第二簇信息,则取消在第一簇中发送第二簇信息。
可选的,设置单元113还可以用于:
更新第一设备的NDC管理窗口、NDC数据链接NDL信息、组密钥以及设备标识中的至少一个。
本发明实施例提供的第一设备接收到第二簇的第一簇信息时,可以根据第二簇的第一簇信息设置第一设备自身的信息,以便第一设备在加入到第二簇中后,可以及时与第二簇中的设备实现互联互通。进一步的,第一设备在加入到第二簇中后,是否要在第二簇中发送同步信标消息,是根据第一设备设置后的信息确定的,这样可以避免加入到第二簇的多个设备在第二簇中发送同步信标消息而发生冲突,导致第二簇中的设备接收不到消息。再进一步的,第一设备在设置自身的信息之后,也可以在第一簇中广播或在第一设备所处的NDC中发送设置后的信息,以便听到该信息的设备也加入到第二簇中,可以扩大第二簇的簇信息的传播范围,且通过NDC可以实现簇信息更快的传播。
图14示出了上述实施例中涉及到的第一设备的结构示意图。该第一设备可以是图1或图2所示的网络架构中的NAN设备。
该第一设备包括:控制器/处理器142用于对第一设备的动作进行控制管理。例如,控制器/处理器142用于支持第一设备执行图3中的过程301和302,图4过程中的301~303,图5过程中的301、303、304和305,图6过程中的301、303、306~308,图7过程中的301、303、309~310,图8过程中的301、303、311~313,图9过 程中的301、303、314~316,图10过程中的301、303、317~318,和/或用于本发明实施例中所描述的技术的其他过程。存储器141用于存储第一设备的程序代码和数据、网络接口143用于支持第一设备与第一簇或第二簇中的其设备进行通信。又例如,网络接口143用于支持第一设备与图1或图2中示出的各个NAN设备之间的通信。
本发明实施例提供的第一设备接收到第二簇的第一簇信息时,可以根据第二簇的第一簇信息设置第一设备自身的信息,以便第一设备在加入到第二簇中后,可以及时与第二簇中的设备实现互联互通。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
另外,在本发明各个实施例中的设备和系统中,各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。且上述的各单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (34)

  1. 一种临近感知网络NAN设备发送同步信标帧的方法,其特征在于,包括:
    所述NAN中处于第一簇中的第一设备接收消息,所述消息包括第二簇的第一簇信息;
    所述第一设备加入所述第二簇时,根据所述第一设备在所述第一簇中的角色和状态在所述第二簇中发送同步信标消息。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一设备在所述第一簇中的角色和状态在所述第二簇中发送同步信标消息包括:
    若所述第一设备在所述第一簇中的角色和状态为主设备或非主设备,状态为同步状态,则所述第一设备在所述第二簇中发送所述同步信标消息。
  3. 根据权利要求1所述的方法,其特征在于,在所述第一设备发送所述同步信标消息之前,所述方法还包括:
    所述第一设备根据所述第一簇信息设置所述第一设备的信息。
  4. 根据权利要求3所述的方法,其特征在于,所述第一簇信息包括所述第二簇的簇标识、第一锚主设备排序AMR、第一锚主设备信标传输时间AMBTT、第一时间同步功能TSF和第一跳数HC中的至少一项。
  5. 根据权利要求4所述的方法,其特征在于,所述第一设备根据所述第一簇信息设置所述第一设备的信息包括:
    所述第一设备设置所述第一设备的簇标识、锚主信息、第二TSF和所述第一设备的角色和状态中的至少一项;
    其中,所述第一设备的簇标识为所述第二簇的簇标识;
    所述锚主信息包括第二AMR、第二AMBTT和第二HC中的至少一项,所述第二AMR的值与所述第一AMR的值相同,所述第二AMBTT的值与所述第一AMBTT的值相同,所述第二HC的值为所述第一HC的值加1;
    所述第二TSF与所述第一TSF相同;
    所述第一设备的角色为主设备,状态默认为同步状态;或者,所述第一设备的角色和状态与所述第一设备在所述第一簇中的角色 和状态相同;或者所述第一设备设置后的角色和状态是根据所述第一设备设置前的信息中的至少一个与所述第一簇信息中的至少一个进行比较确定的,所述设置前的信息包括所述第一设备设置前的助主设备排名MR、设置前的HC和设置前的AMBTT。
  6. 根据权利要求5所述的方法,其特征在于,所述NAN中处于第一簇中的第一设备接收消息,所述消息包括第二簇的第一簇信息包括:
    所述第一设备接收所述第二簇中的第二设备发送的消息,所述消息包括所述第二簇的第一簇信息;或
    所述第一设备接收所述第一簇中的第三设备发送的消息,所述第三设备处于所述第一簇的第一NAN数据簇NDC中,所述消息包括所述第二簇的第一簇信息;或
    所述第一设备接收所述第一簇中的第四设备发送的消息,所述消息包括所述第二簇的第一簇信息。
  7. 根据权利要求6所述的方法,其特征在于,在所述第一设备设置所述第一设备的信息之前,所述方法还包括:
    若所述第一设备从所述第二设备接收的所述消息,则所述第一设备获取所述第二设备的MR;
    若所述第一设备从所述第三设备接收的所述消息,则所述第一设备获取所述第三设备的MR;
    若所述第一设备从所述第四设备接收的所述消息,则所述第一设备获取所述第四设备的MR。
  8. 根据权利要求5所述的方法,其特征在于,所述根据所述第一设备在所述第一簇中的角色和状态确定是否在第二簇中发送同步信标消息包括:
    当设置所述第一设备的角色和状态与所述第一设备在第一簇中的角色和状态相同时,若设置后的所述角色为所述主设备或非主设备,状态为同步状态,则所述第一设备确定在所述第二簇中发送所述同步信标消息;
    若设置后的所述角色为非主设备,且所述状态为不同步状态,则所述第一设备确定不在所述第二簇中发送所述同步信标消息。
  9. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    当设置所述第一设备的角色为所述主设备时,所述第一设备记录所述第一设备在所述第一簇中时的角色和状态;
    所述根据所述第一设备在所述第一簇中的角色和状态确定是否在所述第二簇中发送同步信标消息包括:
    若所述第一设备在所述第一簇中时的角色为所述主设备或非主设备,状态为同步状态,则所述第一设备确定发送所述同步信标消息;
    若所述第一设备在第一簇中时的角色为所述非主设备,且所述状态为不同步状态,则所述第一设备确定不在所述第二簇中发送所述同步信标消息。
  10. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    若所述第一设备接收到所述第二设备发送的所述消息,且所述第一设备处于至少一个NDC中,则所述第一设备确定在所述至少一个NDC中发送所述第二簇的第二簇信息,所述第二簇信息包括所述第一设备设置后的信息中的至少一项。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    若所述第一设备已接收到所述第一簇中的其它任一设备发送的所述第二簇信息,则所述第一设备取消在所述至少一个NDC中发送所述第二簇信息。
  12. 根据权利要求11所述的方法,其特征在于,所述第一设备取消在所述至少一个NDC中发送所述第二簇信息包括:
    所述第一设备比较所述任一设备发送的所述第二簇信息中携带的信息与所述第一设备设置后的信息;
    若所述第一AMBTT小于所述第二簇信息中携带的第四AMBTT,或所述第一HC大于所述第二簇信息中携带的第四HC,或所述第一AMR小于所述第二簇信息中携带的第四AMR,或所述第一设备的设备排序MR小于所述任一设备的MR,则所述第一设备取消在所述至少一个NDC中发送所述第二簇信息。
  13. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    若所述第一设备从所述第三设备接收的所述消息,则所述第一设备确定在所述第一设备所处的所有NDC中除所述第一NDC以外的其余NDC中发送所述第二簇的第二簇信息,所述第二簇信息包括所述第一设备设置后的信息中的至少一项。
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:
    若所述第一设备已从所述其余NDC中的任一NDC接收到所述第二簇信息,则所述第一设备取消在所述其余NDC中发送所述第二簇信息。
  15. 根据权利要求6或7所述的方法,其特征在于,所述方法还包括:
    若所述第一设备从所述第四设备接收的所述消息,则所述第一设备确定在所述第一簇中发送所述第二簇的第二簇信息,所述第二簇信息包括所述第一设备设置后的信息中的至少一项。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    若所述第一设备已接收到所述第一簇中的任一设备发送的所述第二簇信息,则所述第一设备取消在所述第一簇中发送所述第二簇信息。
  17. 根据权利要求10至16任一项所述的方法,其特征在于,所述方法还包括:
    所述第一设备更新所述第一设备的NDC管理窗口、NDC数据链接NDL信息、组密钥以及设备标识中的至少一个。
  18. 一种第一设备,所述第一设备处于临近感知网络NAN中,其特征在于,包括:
    接收单元,用于接收消息,所述消息包括第二簇的第一簇信息;
    第一确定单元,用于加入所述第二簇时,根据所述第一设备在所述第一簇中的角色和状态在所述第二簇中发送同步信标消息。
  19. 根据权利要求18所述的第一设备,其特征在于,所述第一确定单元用于:
    若所述第一设备在所述第一簇中的角色和状态为主设备或非主设备,状态为同步状态,则在所述第二簇中发送所述同步信标消息。
  20. 根据权利要求18所述的第一设备,其特征在于,还包括:
    设置单元,用于在所述第一设备发送所述同步信标消息之前,根据所述第一簇信息设置所述第一设备的信息。
  21. 根据权利要求20所述的第一设备,其特征在于,所述第一簇信息包括所述第二簇的簇标识、第一锚主设备排序AMR、第一锚主设备信标传输时间AMBTT、第一时间同步功能TSF和第一跳数HC中的至少一项。
  22. 根据权利要求21所述的第一设备,其特征在于,所述设置单元用于:
    设置所述第一设备的簇标识、锚主信息、第二TSF和所述第一设备的角色和状态中的至少一项;
    其中,所述第一设备的簇标识为所述第二簇的簇标识;
    所述锚主信息包括第二AMR、第二AMBTT和第二HC中的至少一项,所述第二AMR的值与所述第一AMR的值相同,所述第二AMBTT的值与所述第一AMBTT的值相同,所述第二HC的值为所述第一HC的值加1;
    所述第二TSF与所述第一TSF相同;
    所述第一设备的角色为主设备,状态默认为同步状态;或者,所述第一设备的角色和状态与所述第一设备在所述第一簇中的角色和状态相同;或者所述第一设备设置后的角色和状态是根据所述第一设备设置前的信息中的至少一个与所述第一簇信息中的至少一个进行比较确定的,所述设置前的信息包括所述第一设备设置前的助主设备排名MR、设置前的HC和设置前的AMBTT。
  23. 根据权利要求22所述的第一设备,其特征在于,所述接收单元用于:
    接收所述第二簇中的第二设备发送的消息,所述消息包括所述第二簇的第一簇信息;或
    接收所述第一簇中的第三设备发送的消息,所述第三设备处于所述第一簇的第一NAN数据簇NDC中,所述消息包括所述第二簇的第一簇信息;或
    接收所述第一簇中的第四设备发送的消息,所述消息包括所述第二簇的第一簇信息。
  24. 根据权利要求23所述的第一设备,其特征在于,在所述第一设备设置所述第一设备的信息之前,还包括获取单元,用于:
    若所述第一设备从所述第二设备接收的所述消息,则获取所述第二设备的MR;
    若所述第一设备从所述第三设备接收的所述消息,则获取所述第三设备的MR;
    若所述第一设备从所述第四设备接收的所述消息,则获取所述所述第四设备的MR。
  25. 根据权利要求22所述的第一设备,其特征在于,所述第一确定单元用于:
    当设置所述第一设备的角色和状态与所述第一设备在第一簇中的角色和状态相同时,若设置后的所述角色为所述主设备或非主设备,状态为同步状态,则确定在所述第二簇中发送所述同步信标消息;
    若设置后的所述角色为非主设备,且所述状态为不同步状态,则确定不在所述第二簇中发送所述同步信标消息。
  26. 根据权利要求22所述的第一设备,其特征在于,还包括:
    记录单元,用于当设置所述第一设备的角色为所述主设备时,记录所述第一设备在所述第一簇中时的角色和状态;
    所述第一确定单元用于:
    若所述第一设备在所述第一簇中时的角色为所述主设备或非主设备,状态为同步状态,则确定发送所述同步信标消息;
    若所述第一设备在第一簇中时的角色为非主设备,且所述状态为不同步状态,则确定不在所述第二簇中发送所述同步信标消息。
  27. 根据权利要求23或24所述的第一设备,其特征在于,还包括第二确定单元,用于:
    若所述第一设备接收到所述第二设备发送的第一簇信息,且所述第一设备处于至少一个NDC中,则所述第一设备确定在所述至少一个NDC中发送所述第二簇的第二簇信息,所述第二簇信息包括所述第一设备设置后的信息中的至少一项。
  28. 根据权利要求27所述的第一设备,其特征在于,还包括:
    第一取消单元,用于若所述第一设备已接收到所述第一簇中的 其它任一设备发送的所述第二簇信息,则取消在所述至少一个NDC中发送所述第二簇信息。
  29. 根据权利要求28所述的第一设备,其特征在于,所述第一取消单元用于:
    比较所述任一设备发送的所述第二簇信息中携带的信息与所述第一设备设置后的信息;
    若所述第一AMBTT小于所述第二簇信息中携带的第四AMBTT,或所述第一HC大于所述第二簇信息中携带的第四HC,或所述第一AMR小于所述第二簇信息中携带的第四AMR,或所述第一设备的设备排序MR小于所述任一设备的MR,则取消在所述至少一个NDC中发送所述第二簇信息。
  30. 根据权利要求23或24所述的第一设备,其特征在于,还包括第三确定单元,用于:
    若所述第一设备从所述第三设备接收的所述消息,则确定在所述第一设备所处的所有NDC中除所述第一NDC以外的其余NDC中发送所述第二簇的第二簇信息,所述第二簇信息包括所述第一设备设置后的信息中的至少一项。
  31. 根据权利要求30所述的第一设备,其特征在于,还包括:
    第二取消单元,用于若所述第一设备已从所述其余NDC中的任一NDC接收到所述第二簇信息,则取消在所述其余NDC中发送所述第二簇信息。
  32. 根据权利要求23或24所述的第一设备,其特征在于,还包第四确定单元,用于:
    若所述第一设备从所述第四设备接收的所述消息,则确定在所述第一簇中发送所述第二簇的第二簇信息,所述第二簇信息包括所述第一设备设置后的信息中的至少一项。
  33. 根据权利要求32所述的第一设备,其特征在于,还包括第三取消单元,用于:
    若所述第一设备已接收到所述第一簇中的任一设备发送的所述第二簇信息,则取消在所述第一簇中发送所述第二簇信息。
  34. 根据权利要求27至33任一项所述的第一设备,其特征在于,所述设置单元还用于:
    更新所述第一设备的NDC管理窗口、NDC数据链接NDL信息、组密钥以及设备标识中的至少一个。
PCT/CN2016/077566 2016-03-28 2016-03-28 一种nan设备发送同步信标消息的方法和设备 WO2017166032A1 (zh)

Priority Applications (10)

Application Number Priority Date Filing Date Title
CA3019360A CA3019360C (en) 2016-03-28 2016-03-28 Method for sending sync beacon message by nan device, and device
KR1020187031041A KR20180126050A (ko) 2016-03-28 2016-03-28 Nan 장치가 싱크 비콘 메시지를 송신하기 위한 방법, 및 장치
RU2018137577A RU2018137577A (ru) 2016-03-28 2016-03-28 Способ передачи сообщения маячка синхронизации посредством устройства nan и устройство
SG11201809571QA SG11201809571QA (en) 2016-03-28 2016-03-28 Method for sending sync beacon message by nan device, and device
US16/088,951 US11140644B2 (en) 2016-03-28 2016-03-28 Method for sending sync beacon message by NAN device, and device
AU2016401125A AU2016401125A1 (en) 2016-03-28 2016-03-28 Method for sending sync beacon message by nan device, and device
CN201680080776.6A CN108605300A (zh) 2016-03-28 2016-03-28 一种nan设备发送同步信标消息的方法和设备
EP16895813.0A EP3429283A4 (en) 2016-03-28 2016-03-28 METHOD AND DEVICE FOR NAN DEVICE FOR SENDING A SYNCHRONIZATION BEACON MESSAGE
PCT/CN2016/077566 WO2017166032A1 (zh) 2016-03-28 2016-03-28 一种nan设备发送同步信标消息的方法和设备
BR112018069734A BR112018069734A2 (pt) 2016-03-28 2016-03-28 método e dispositivo para enviar mensagem de beacon de sincronização por um dispositivo nan

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/077566 WO2017166032A1 (zh) 2016-03-28 2016-03-28 一种nan设备发送同步信标消息的方法和设备

Publications (1)

Publication Number Publication Date
WO2017166032A1 true WO2017166032A1 (zh) 2017-10-05

Family

ID=59962386

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/077566 WO2017166032A1 (zh) 2016-03-28 2016-03-28 一种nan设备发送同步信标消息的方法和设备

Country Status (10)

Country Link
US (1) US11140644B2 (zh)
EP (1) EP3429283A4 (zh)
KR (1) KR20180126050A (zh)
CN (1) CN108605300A (zh)
AU (1) AU2016401125A1 (zh)
BR (1) BR112018069734A2 (zh)
CA (1) CA3019360C (zh)
RU (1) RU2018137577A (zh)
SG (1) SG11201809571QA (zh)
WO (1) WO2017166032A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10575268B2 (en) * 2017-05-15 2020-02-25 Apple Inc. NAN solicited synchronization
US10721698B2 (en) * 2017-07-01 2020-07-21 ARRIS Enterprises, LLC Identifying a synchronization master for radio nodes
JP7130364B2 (ja) * 2017-10-31 2022-09-05 キヤノン株式会社 通信装置、制御方法、およびプログラム
JP2019083481A (ja) * 2017-10-31 2019-05-30 キヤノン株式会社 通信装置、制御方法、およびプログラム
CN111954194B (zh) * 2020-08-12 2023-12-05 深圳市蓝信物联科技有限公司 基于物联网的无线智能标签刷新控制方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015021780A1 (zh) * 2013-08-13 2015-02-19 华为终端有限公司 用于加入邻近感知网络设备群的方法、设备及系统
CN104780510A (zh) * 2014-01-14 2015-07-15 诺基亚公司 用于无线网络集群发现和并发管理的方法、装置和计算机程序产品
WO2015119440A1 (ko) * 2014-02-05 2015-08-13 엘지전자 주식회사 무선 통신 시스템에서 nan 단말의 신호 송수신 방법 및 장치

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9432925B2 (en) 2013-08-05 2016-08-30 Nokia Technologies Oy Method, apparatus, and computer program product for hop count usage in cluster selection
CN104053227B (zh) 2013-12-02 2017-06-27 华为终端有限公司 一种用于锚主设备选择的方法和设备
EP3749027B1 (en) 2015-08-18 2022-06-15 Huawei Technologies Co., Ltd. Anchor master am management method and node

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015021780A1 (zh) * 2013-08-13 2015-02-19 华为终端有限公司 用于加入邻近感知网络设备群的方法、设备及系统
CN104780510A (zh) * 2014-01-14 2015-07-15 诺基亚公司 用于无线网络集群发现和并发管理的方法、装置和计算机程序产品
WO2015119440A1 (ko) * 2014-02-05 2015-08-13 엘지전자 주식회사 무선 통신 시스템에서 nan 단말의 신호 송수신 방법 및 장치

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
SG11201809571QA (en) 2018-12-28
US20190124611A1 (en) 2019-04-25
KR20180126050A (ko) 2018-11-26
EP3429283A1 (en) 2019-01-16
CA3019360A1 (en) 2017-10-05
AU2016401125A1 (en) 2018-10-25
US11140644B2 (en) 2021-10-05
RU2018137577A3 (zh) 2020-04-29
EP3429283A4 (en) 2019-03-06
RU2018137577A (ru) 2020-04-29
CN108605300A (zh) 2018-09-28
BR112018069734A2 (pt) 2019-02-05
CA3019360C (en) 2020-03-10

Similar Documents

Publication Publication Date Title
US9480013B2 (en) Method, device, and system for joining neighbor awareness network cluster
WO2017166032A1 (zh) 一种nan设备发送同步信标消息的方法和设备
US20210306952A1 (en) Sleep method for terminal device and apparatus
JP4497222B2 (ja) 通信装置及び通信方法、並びにコンピュータ・プログラム
KR101972028B1 (ko) Nan을 위한 무선 자원 스케줄링 방법 및 장치
JP6449427B2 (ja) 近隣認識ネットワークデータリンクにおけるトラフィックの告知およびスケジューリング
US9854625B2 (en) Method and apparatus for transmitting signal by NAN terminal in wireless communication system
EP2844018A1 (en) Method and apparatus for discovering wireless network
EP2362707A1 (en) Negotiation method and device for master control node
US10225338B1 (en) Peer to peer ranging exchange
JP2018518095A (ja) 無線通信システムにおいてnanプロキシサーバーに登録する方法及び装置
US10575241B2 (en) Method for service discovery in neighbor awareness network NAN, and terminal device
KR20180030839A (ko) 이웃 인식 네트워크 데이터 링크 존재 표시
WO2017028205A1 (zh) 一种锚主节点am管理的方法及节点
EP3515122B1 (en) Communication device, communication method and program
US10193985B2 (en) Method and device for performing service discovery in wireless communication system
US10356720B2 (en) Data communication method between NAN devices operating in power save mode and data communication-performing NAN device operating in power save mode
JP2020127238A (ja) 無線システム、無線機器、通信プログラム、および通信方法
CN107852677B (zh) 网格网络中的增强型功率降低
WO2023070617A1 (zh) 通信方法及装置、存储介质、程序产品
JP2020108164A (ja) アンカーマスターam管理方法およびノード

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018551203

Country of ref document: JP

Kind code of ref document: A

Ref document number: 3019360

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2016895813

Country of ref document: EP

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112018069734

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2016895813

Country of ref document: EP

Effective date: 20181012

ENP Entry into the national phase

Ref document number: 2016401125

Country of ref document: AU

Date of ref document: 20160328

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20187031041

Country of ref document: KR

Kind code of ref document: A

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

Ref document number: 16895813

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 112018069734

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20180926