WO2014063624A1 - Communication device and data communication method - Google Patents

Communication device and data communication method Download PDF

Info

Publication number
WO2014063624A1
WO2014063624A1 PCT/CN2013/085765 CN2013085765W WO2014063624A1 WO 2014063624 A1 WO2014063624 A1 WO 2014063624A1 CN 2013085765 W CN2013085765 W CN 2013085765W WO 2014063624 A1 WO2014063624 A1 WO 2014063624A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
random number
information
time synchronization
sender
Prior art date
Application number
PCT/CN2013/085765
Other languages
French (fr)
Chinese (zh)
Inventor
董贤东
刘峰
马莉
Original Assignee
东莞宇龙通信科技有限公司
宇龙计算机通信科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 东莞宇龙通信科技有限公司, 宇龙计算机通信科技(深圳)有限公司 filed Critical 东莞宇龙通信科技有限公司
Publication of WO2014063624A1 publication Critical patent/WO2014063624A1/en

Links

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
    • H04W92/00Interfaces specially adapted for wireless communication networks
    • H04W92/04Interfaces between hierarchically different network devices
    • H04W92/14Interfaces between hierarchically different network devices between access point controllers and backbone network device

Definitions

  • the present invention relates to the field of wireless communication technologies, and in particular to a communication device and a data communication method.
  • the content of the research is social network, mainly how the STA (terminal) discovers other common interests. STA and file sharing or other services after discovery. Before performing data communication services, it is necessary to ensure that STAs in the entire NAN network are synchronized in time to ensure normal communication.
  • the time synchronization between the STA and the AP is STA periodic. Listen to the Timestamp of the AP broadcast, and update if it finds that its own clock is different from Timestamp.
  • the technical problem to be solved by the present invention is to provide a new time synchronization mechanism suitable for a type of network such as NAN, which enables STAs in the network to ensure time synchronization after the network is set up, thereby ensuring normal communication and satisfying at the same time.
  • the NAN network has a large mobility.
  • the present invention provides a communication apparatus, including: a data generating module, generating a first message, where the first message includes at least first information determining a network time synchronization information provider; and a data transceiver module transmitting the first a message, and receiving a second message, where the second message includes at least second information determining the network time synchronization information provider; the comparison determining module compares the first information with the second information to obtain a comparison result, And determining, according to the comparison result, the network time synchronization information provider from the communication device and the sender of the second message.
  • the data generating module and the comparison determining module may be chip modules for data processing in the communication device, and the data transceiver module is equivalent to a signal transmitting and receiving device and an antenna, etc.
  • the sender of the second message is a network
  • the organizer can use the message of interaction between the two, a user is selected as the provider of the network time synchronization information, and the establishment initiator of the network is not used to broadcast the network time synchronization information, thereby reducing the cause.
  • the possibility that it leaves the network causes other devices to not hear network time synchronization information for time synchronization.
  • This solution is applicable to a variety of networks formed by STAs such as NAN.
  • the first information includes at least a first random number generated by the data generating module and/or a first medium access control address of the communication device;
  • the second information includes at least a second random number generated by the sender of the second message and/or a second medium access control address of the sender of the second message.
  • the first information may be a random number generated by the communication device, and the random number may be generated in any range from 1 to 10000, or the MAC address of the communication device;
  • the generation method is the same as the generation method of the first information, wherein the generation range of the random number may also be other ranges.
  • the comparison result is the first random number and/or the first medium access control address and the second random number and/or the second medium access
  • the comparison determining module determines the network time synchronization information provider from the communication device and the sender of the second message.
  • the value of the first random number is 10
  • the value of the second random number is 11, and both parties already know the value of the generated random number.
  • the two values are different, they can The provider of the network time synchronization information is determined; of course, the value of the MAC address is completely different, and the provider of the network time synchronization information can also be determined from the two.
  • the data transceiver module regenerates and sends the first message, and re-receives the Said the second message.
  • the first random number is 10 and the second random number is also 10
  • both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information
  • both A random number is generated and resent until the provider of the network time synchronization information is determined.
  • the comparison determination module determines the network time synchronization information provider from the communication device and the sender of the second message.
  • the first random number and the second random number we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number.
  • This method can also be used in the MAC address. The process is the same as the random number, and will not be described here.
  • the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame.
  • the probe request frame may include the first and second messages, and the first information and the second information may be known before the network is formed, and the network may be determined after the network is formed according to the first information and the second information.
  • the provider of the time synchronization information facilitates the normal operation of the subsequent communication; the same association request frame, device discovery frame or service discovery frame may also include the first and second messages, in addition to the message types exemplified above, those skilled in the art shall Understand that more types of messages for interaction are applicable to this technical solution.
  • the network time synchronization information includes at least a timestamp.
  • Information may be in the same format as the timestamp information, and is 8 bytes. Of course, the bytes may be other lengths of information.
  • the present invention also provides a data communication method, including: generating a first message, where the first message includes at least first information determining a network time synchronization information provider; transmitting the first message, and receiving a second message, The second message includes at least second information determining the network time synchronization information provider; comparing the first information with the second information to obtain a comparison result, and transmitting from the first message according to the comparison result And determining, by the party and the sender of the second message, the network time synchronization information provider.
  • the message exchanged between the two may be used to select one of the providers as the network time synchronization information.
  • the first information includes at least a first random number generated by a sender of the first message and/or a first medium access control address of a sender of the first message;
  • the second information includes at least a second random number generated by a sender of the second message and/or a second medium access control address of a sender of the second message.
  • the first information may be a random number generated by one of the network builders, and the random number may be generated by any integer from 1 to 10000, or the MAC address of the network constructor.
  • the second information is generated in the same manner as the first information, wherein the generation range of the random number may be other ranges.
  • the comparison result is the first random number and/or the first medium access control address and the second random number and/or the second medium access control address
  • the network time synchronization information provider is determined from the sender of the first message and the sender of the second message.
  • the value of the first random number is 10
  • the value of the second random number is 11, and both parties already know the value of the random number generated by each, as long as the two values are not the same, Determining the provider of the network time synchronization information; of course, the value of the MAC address is completely different, and the network time synchronization letter can also be determined from the two. Provider of interest.
  • the method further includes: regenerating and transmitting, when the comparison result is that the first random number and/or the first medium access control address is the same as the second random number Describe the first message, and re-receive the second message.
  • the first random number is 10 and the second random number is also 10
  • both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information
  • both A random number is generated and resent until the provider of the network time synchronization information is determined.
  • the network time synchronization information provider is determined by the sender of the first message and the sender of the second message.
  • the first random number and the second random number we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number.
  • the same method can also be used in the MAC address, the process is the same as the random number, and will not be described here.
  • the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame.
  • the probe request frame may include the first and second messages, and the first information and the second information may be known before the network is formed, and the network may be determined after the network is formed according to the first information and the second information.
  • the provider of the time synchronization information facilitates the normal operation of the subsequent communication; the same association request frame, device discovery frame or service discovery frame may also include the first and second messages, in addition to the message types exemplified above, those skilled in the art shall Understand that more types of messages for interaction are applicable to this technical solution.
  • the network time synchronization information includes at least time stamp information.
  • the network time synchronization information may be in the same format as the timestamp information, and is 8 bytes. Of course, the bytes may be other lengths of information.
  • the above technical solution can realize a communication device and a data communication method, which can enable STAs in the network to ensure time synchronization after the network is established, thereby ensuring normal communication and satisfying the NAN.
  • FIG. 1 is a block diagram of a communication device in accordance with one embodiment of the present invention.
  • FIG. 2 is a flow chart of a data communication method in accordance with one embodiment of the present invention.
  • FIG. 3 is a schematic diagram of the principle of a data communication method according to an embodiment of the present invention.
  • FIG. 4 is a data interaction diagram of a data communication method according to an embodiment of the present invention.
  • FIG. 1 is a block diagram of a communication device in accordance with one embodiment of the present invention.
  • the present invention provides a communication device 100, including: a data generating module 102, generating a first message, where the first message includes at least first information for determining a network time synchronization information provider; and the data transceiver module 104 Transmitting the first message, and receiving the second message, where the second message includes at least second information determining the network time synchronization information provider; the comparison determining module 106, comparing the first information with the first The second information is compared, and the network time synchronization information provider is determined from the communication device and the sender of the second message according to the comparison result.
  • the data generating module 102 and the comparison determining module 106 may be chip modules for data processing in the communication device, and the data transceiver module 104 is equivalent to a signal transmitting and receiving device and an antenna, etc., in the sending of the communication device and the second message.
  • the party is a network organizer, it can use the message of interaction between the two to select one as the provider of the network time synchronization information, and not the fixed initiator of the network to broadcast the network time synchronization information. It reduces the possibility of time synchronization because other devices can't hear network time synchronization information because they leave the network.
  • This solution is applicable to a variety of networks formed by STAs such as NAN.
  • the first information includes at least the data generating module 102 Generating a first random number and/or a first medium access control address of the communication device;
  • the second information includes at least a second random number generated by a sender of the second message and/or the second The second medium access control address of the sender of the message.
  • the first information may be a random number generated by the communication device, and the random number may be generated in any range from 1 to 10000, or the MAC address of the communication device;
  • the generation method is the same as the generation method of the first information, wherein the generation range of the random number may also be other ranges.
  • the comparison determination module 106 determines the network time synchronization information provider from the communication device and the sender of the second message.
  • the value of the first random number is 10
  • the value of the second random number is 11, and both parties already know the value of the random number generated by each, as long as the two values are not the same.
  • the provider of the network time synchronization information is determined; of course, the value of the MAC address is completely different, and the provider of the network time synchronization information can also be determined from the two.
  • the data transceiver module 104 regenerates and sends the first message, and re-receives the first Two messages.
  • the first random number is 10 and the second random number is also 10
  • both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information
  • both A random number is generated and resent until the provider of the network time synchronization information is determined.
  • the comparison is determined.
  • the module 106 determines the network time synchronization information provider from the communication device and the sender of the second message.
  • the first random number and the second random number we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number.
  • this method can also be used in MAC addresses, processes with The same as random numbers, we will not repeat them here.
  • the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame.
  • the probe request frame may include the first and second messages, and the first information and the second information may be known before the network is formed, and the network may be determined after the network is formed according to the first information and the second information.
  • the provider of the time synchronization information facilitates the normal operation of the subsequent communication; the same association request frame, device discovery frame or service discovery frame may also include the first and second messages, in addition to the message types exemplified above, those skilled in the art shall Understand that more types of messages for interaction are applicable to this technical solution.
  • the network time synchronization information includes at least timestamp information.
  • the network time synchronization information may be in the same format as the timestamp information,
  • FIG. 2 is a flow chart of a data communication method in accordance with one embodiment of the present invention.
  • the present invention further provides a data communication method, including: Step 202: Generate a first message, where the first message includes at least first information that determines a network time synchronization information provider; Step 204, Determining a first message, and receiving a second message, where the second message includes at least determining second information of the network time synchronization information provider; Step 206, comparing the first information with the second information to obtain a comparison result And determining, according to the comparison result, the network time synchronization information provider from a sender of the first message and a sender of the second message.
  • the message exchanged between the two may be used to select one of the providers as the network time synchronization information.
  • the possibility of time synchronization due to the fact that other devices cannot hear the network time synchronization information due to leaving the network is reduced.
  • This solution is applicable to a variety of networks formed by STAs such as NAN.
  • the first information includes at least a first random number generated by a sender of the first message and/or a first medium access control address of a sender of the first message;
  • the second information includes at least a second random number generated by the sender of the second message and/or a second medium access control address of the sender of the second message.
  • the first information may be a random number generated by one of the network builders, and the random number may be generated from any integer between 1 and 10000, or the MAC address of the network constructor;
  • the generation method is the same as the generation method of the first information, wherein the generation range of the random number may also be other ranges.
  • the step 206 includes: the comparing result is the first random number and/or the first medium access control address and the second random number and/or the second medium
  • the network time synchronization information provider is determined from the sender of the first message and the sender of the second message.
  • the value of the first random number is 10
  • the value of the second random number is 11, and both parties already know the value of the random number generated by each, as long as the two values are not the same.
  • the provider of the network time synchronization information is determined; of course, the value of the MAC address is completely different, and the provider of the network time synchronization information can also be determined from the two.
  • the method further includes: regenerating and transmitting the first when the comparison result is that the first random number and/or the first medium access control address is the same as the second random number a message, and re-receiving the second message.
  • the first random number is 10 and the second random number is also 10
  • both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information
  • both A random number is generated and resent until the provider of the network time synchronization information is determined.
  • the step 206 includes: when the first random number is greater than or less than the second random number, and/or the first medium access control address is greater than or less than the second medium access control address And determining, by the sender of the first message and the sender of the second message, the network time synchronization information provider.
  • the first random number and the second random number are different, we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number.
  • the same method can also be used in the MAC address, the process is the same as the random number, and will not be described here.
  • the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame.
  • the probe request The frame may include first and second messages, and the first information and the second information may be known before the network is formed, and the provider of the network time synchronization information may be determined after the network is formed according to the first information and the second information, which is beneficial to the network.
  • the subsequent communication is normally performed; the same association request frame, device discovery frame or service discovery frame may also contain the first and second messages.
  • the interactive messages are applicable to this technical solution.
  • the network time synchronization information includes at least timestamp information.
  • the network time synchronization information may be in the same format as the timestamp information,
  • the main idea of the present invention is: When the NAN network is initially established, the initiating STA established by the NAN network negotiates with the responding STA, and determines one STA as the Timestamp in the NAN network, as a specific time.
  • the provider of the synchronization information due to the channel monopoly in Wi-Fi technology, it is only possible that the initiator and a response STA negotiate the Timestamp).
  • Scheme 1 STA A and STA B can randomly generate a random number between [1, 100000]. If any STA generates a random number that is small/large, it can be used as a provider of NAN network time synchronization information Timestamp. As shown in Figure 3 below, where xl is the random number generated by STA A and x2 is the random number generated by STA B.
  • Step 302 determining whether xl and x2 are equal
  • Step 304 When x1 and x2 are equal, both STA A and STA B regenerate the random number.
  • Step 308 using STA B as a timestamp provider
  • step 310 STA A is used as a timestamp provider.
  • STA B can also be used as a timestamp provider when xl is greater than x2, and STA A is used as a timestamp provider when xl is less than x2. In both ways, the randomness of the Timestamp provider can be increased.
  • Solution 2 According to the comparison of the MAC address values of STA A and STA B, determining, according to the comparison result, one STA is provided as the time synchronization information Timestamp in the NAN network. The specific process is similar to that of Option 1.
  • STA A is ready for random number 1 or MAC address 1, where STA B is ready for random number 2 or MAC address 2;
  • the initiator of the network establishment (if it is STA A) sends the first signaling Timestamp provider request message, and carries the random number 1 or MAC address 1 in this message;
  • STA B replies to the response message of the Timestamp provider request message, which carries the random number 2 or the MAC address 2;
  • the subsequent STAs join the Timestamp information broadcast by the provider of Timestamp as the time synchronization information in the NAN network, and no longer need to continue the process of negotiating the Timestamp provider negotiation; If the provider of Timestamp is to leave the NAN network, it can designate any STA in the NAN network to be the provider of Timestamp before leaving the NAN network and broadcast it before leaving the NAN network.
  • a communication device and a data communication method are implemented to avoid that a certain NAN network organizer leaves the NAN network, and other devices in the network cannot detect the Timestamp.
  • Time synchronization solves the problem that the existing time synchronization mechanism cannot meet the characteristics of the NAN network, and ensures normal communication of devices in the NAN network.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Provided are a communication device and data communication method, the communication device comprising: a data generation module for generating a first message, the first message containing at least the first information for determining the provider of network time synchronization information; a data transceiving module for transmitting the first message and receiving a second message, the second message containing at least the second information for determining the provider of the network time synchronization information; and a comparison and determination module for comparing the first information with the second information to obtain a comparison result, and determining from the communication device and the transmitter of the second message the provider of the network time synchronization information according to the comparison result. The present invention can ensure an STA on a network to synchronize the time after the network is established, thus ensuring normal communication.

Description

通信装置和数据通信方法 技术领域  Communication device and data communication method
本发明涉及无线通信技术领域, 具体而言, 涉及一种通信装置和一种 数据通信方法。  The present invention relates to the field of wireless communication technologies, and in particular to a communication device and a data communication method.
背景技术  Background technique
在 WFA(Wi-Fi Alliance)中, 成立了新的研究组 NAN(Neighbor Awareness Networking, 邻居感知网络), 它研究的内容是社交网络, 主要 是 STA (终端) 怎样发现其它的有共同兴趣爱好的 STA 以及发现之后进 行文件共享或是其它业务, 在进行数据通信业务之前, 必需保证整个 NAN网络中的 STA时间上同步, 才能保证通信的正常进行。  In the WFA (Wi-Fi Alliance), a new research group NAN (Neighbor Awareness Networking) was established. The content of the research is social network, mainly how the STA (terminal) discovers other common interests. STA and file sharing or other services after discovery. Before performing data communication services, it is necessary to ensure that STAs in the entire NAN network are synchronized in time to ensure normal communication.
在现有技术中, 时间同步的方法如下:  In the prior art, the method of time synchronization is as follows:
1、 在传统的 AP (接入点) 与 STA 构成的网络 (IBBS , infrastructure basis service set, 基础基本服务集)中, STA与 AP (接入点)之间的时间 同步, 是 STA周期性的听 AP广播的 Timestamp (时间戳) , 如果发现自 己的时钟与 Timestamp的信息不一样, 则更新。  1. In a traditional AP (access point) and STA-based network (IBBS, infrastructure basis service set), the time synchronization between the STA and the AP (access point) is STA periodic. Listen to the Timestamp of the AP broadcast, and update if it finds that its own clock is different from Timestamp.
2、 在 p2p(independent basis service set, 独立基本服务集)网终中, 存 在一个 Group Owner (组所有者) , STA相互之间保持时间同步的方式是 听取 Group Owner广播的 Timestamp„  2. In the p2p (independent basis service set) network, there is a Group Owner. The STA keeps time synchronization with each other by listening to the Timestamp broadcast by the Group Owner.
由于在 NAN 网络中, 不存在 Group Owner的概念, 也不像 IBSS 中 有 AP 的存在, 那么现有技术时间同步的机制是不适用 NAN 网络中的; 所以, 考虑到 NAN网络的特点, NAN网络中设备的流动性相当大, 可能 每个 STA只在 NAN网络中停留几分钟就离开 NAN网络, 所以需要一种 新的机制提供一种选取 NAN 网络中的网络时间同步信息提供者的方法, 能够满足 NAN网络的特点。 发明内容 Since there is no concept of Group Owner in the NAN network, and there is no AP in the IBSS, the mechanism of the prior art time synchronization is not applicable in the NAN network; therefore, considering the characteristics of the NAN network, the NAN network The mobility of the device is quite large. It is possible that each STA leaves the NAN network only after staying in the NAN network for a few minutes. Therefore, a new mechanism is needed to provide a method for selecting a network time synchronization information provider in the NAN network. Meet the characteristics of the NAN network. Summary of the invention
本发明所要解决的技术问题在于, 提供一种适用于 NAN 等类型网络 的新的时间同步机制, 能够使得网络组建后, 网络中的 STA 能够保证时 间上同步, 从而保证通信的正常进行, 同时满足了 NAN 网络流动性大的 特点。  The technical problem to be solved by the present invention is to provide a new time synchronization mechanism suitable for a type of network such as NAN, which enables STAs in the network to ensure time synchronization after the network is set up, thereby ensuring normal communication and satisfying at the same time. The NAN network has a large mobility.
有鉴于此, 本发明提供一种通信装置, 包括: 数据生成模块, 生成第 一消息, 所述第一消息至少包含确定网络时间同步信息提供者的第一信 息; 数据收发模块, 发送所述第一消息, 以及接收第二消息, 所述第二消 息至少包含确定所述网络时间同步信息提供者的第二信息; 对比确定模 块, 对比所述第一信息和所述第二信息得到对比结果, 并根据所述对比结 果从所述通信装置和所述第二消息的发送方中确定所述网络时间同步信息 提供者。 在该技术方案中, 数据生成模块、 对比确定模块可以是通信装置 中数据处理的芯片模块, 而数据收发模块则相当于信号收发装置以及天线 等, 在通信装置、 第二消息的发送方是网络组建者时, 则可以利用二者之 间交互的消息, 从二者之间选择一个作为网络时间同步信息的提供者, 而 并非固定使用网络的组建发起者来广播网络时间同步信息, 降低了因其离 开网络导致其它设备无法侦听到网络时间同步信息来进行时间同步的可能 性。 本方案适用于 NAN等多种由 STA组建而成的网络。  In view of the above, the present invention provides a communication apparatus, including: a data generating module, generating a first message, where the first message includes at least first information determining a network time synchronization information provider; and a data transceiver module transmitting the first a message, and receiving a second message, where the second message includes at least second information determining the network time synchronization information provider; the comparison determining module compares the first information with the second information to obtain a comparison result, And determining, according to the comparison result, the network time synchronization information provider from the communication device and the sender of the second message. In the technical solution, the data generating module and the comparison determining module may be chip modules for data processing in the communication device, and the data transceiver module is equivalent to a signal transmitting and receiving device and an antenna, etc., in the communication device, the sender of the second message is a network When the organizer can use the message of interaction between the two, a user is selected as the provider of the network time synchronization information, and the establishment initiator of the network is not used to broadcast the network time synchronization information, thereby reducing the cause. The possibility that it leaves the network causes other devices to not hear network time synchronization information for time synchronization. This solution is applicable to a variety of networks formed by STAs such as NAN.
在上述技术方案中, 优选地, 所述第一信息至少包含所述数据生成模 块所生成的第一随机数和 /或所述通信装置的第一媒介访问控制地址; 所 述第二信息至少包含所述第二消息的发送方所生成的第二随机数和 /或所 述第二消息的发送方的第二媒介访问控制地址。 在该技术方案中, 第一信 息可以是由通信装置产生的随机数, 这个随机数产生的范围可以是从 1 至 10000 之间的任何一个整数, 或是通信装置的 MAC 地址; 同样第二信息 的产生方法与第一信息的产生方法一样, 其中, 随机数的产生范围也可以 是其它的范围。 本领域技术人员应当理解, 更多类型的可互相比较的信息 都适用于本技术方案。  In the above technical solution, preferably, the first information includes at least a first random number generated by the data generating module and/or a first medium access control address of the communication device; the second information includes at least a second random number generated by the sender of the second message and/or a second medium access control address of the sender of the second message. In this technical solution, the first information may be a random number generated by the communication device, and the random number may be generated in any range from 1 to 10000, or the MAC address of the communication device; The generation method is the same as the generation method of the first information, wherein the generation range of the random number may also be other ranges. Those skilled in the art will appreciate that more types of mutually comparable information are applicable to the present technical solution.
在上述技术方案中, 优选地, 在所述对比结果为所述第一随机数和 / 或所述第一媒介访问控制地址与所述第二随机数和 /或所述第二媒介访问 控制地址不同时, 所述对比确定模块从所述通信装置和所述第二消息的发 送方中确定所述网络时间同步信息提供者。 在该技术方案中, 第一随机数 的值为 10, 第二随机数的值为 11 , 双方都已经知道各自产生的随机数的 值, 只要这两个值不相同, 就可以从二者中确定网络时间同步信息的提供 者; 当然 MAC 地址的值是完全不一样的, 也可以从二者中确定网络时间 同步信息的提供者。 In the above technical solution, preferably, the comparison result is the first random number and/or the first medium access control address and the second random number and/or the second medium access When the control addresses are different, the comparison determining module determines the network time synchronization information provider from the communication device and the sender of the second message. In the technical solution, the value of the first random number is 10, and the value of the second random number is 11, and both parties already know the value of the generated random number. As long as the two values are different, they can The provider of the network time synchronization information is determined; of course, the value of the MAC address is completely different, and the provider of the network time synchronization information can also be determined from the two.
在上述技术方案中, 优选地, 在所述对比结果为所述第一随机数与所 述第二随机数相同时, 所述数据收发模块重新生成并发送所述第一消息, 以及重新接收所述第二消息。 在该技术方案中, 当第一随机数为 10 , 第 二随机数也为 10 时, 双方都知道所产生的随机数是相同的, 不能够确定 网络时间同步信息的提供者, 那么二者重新产生随机数并且重新发送, 直 至确定网络时间同步信息的提供者。  In the above technical solution, preferably, when the comparison result is that the first random number is the same as the second random number, the data transceiver module regenerates and sends the first message, and re-receives the Said the second message. In this technical solution, when the first random number is 10 and the second random number is also 10, both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information, then both A random number is generated and resent until the provider of the network time synchronization information is determined.
在上述技术方案中, 优选地, 在所述第一随机数大于或小于所述第二 随机数时, 和 /或第一媒介访问控制地址大于或小于所述第二媒介访问控 制地址时, 所述对比确定模块从所述通信装置和所述第二消息的发送方中 确定所述网络时间同步信息提供者。 在该技术方案中, 只要是第一随机数 和第二随机数不相同, 我们可以根据谁产生的随机数大, 谁就是网络时间 同步信息的提供者, 当然也可以是谁产生的随机数小谁就是网络时间同步 信息的提供者的机制来确定。 同样此方法也可以用于 MAC 地址中, 过程 与随机数一样, 这里不再赘述。  In the above technical solution, preferably, when the first random number is greater than or less than the second random number, and/or the first medium access control address is greater than or less than the second medium access control address, The comparison determination module determines the network time synchronization information provider from the communication device and the sender of the second message. In this technical solution, as long as the first random number and the second random number are different, we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number. Who is the mechanism for the provider of network time synchronization information to determine. This method can also be used in the MAC address. The process is the same as the random number, and will not be described here.
在上述技术方案中, 优选地, 所述第一消息和 /或所述第二消息为探 测请求帧、 关联请求帧、 设备发现帧或服务发现帧。 在该技术方案中, 探 测请求帧可以包含第一和第二消息, 在网络组建之前时就可以知道第一信 息和第二信息, 根据第一信息和第二信息在网络组建之后就可以确定网络 时间同步信息的提供者, 利于后续通信的正常进行; 同样关联请求帧、 设 备发现帧或服务发现帧也可包含第一和第二消息, 除了上述示例出的消息 类型外, 本领域技术人员应当理解, 更多类型的用于交互的消息, 都适用 于本技术方案。  In the above technical solution, preferably, the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame. In the technical solution, the probe request frame may include the first and second messages, and the first information and the second information may be known before the network is formed, and the network may be determined after the network is formed according to the first information and the second information. The provider of the time synchronization information facilitates the normal operation of the subsequent communication; the same association request frame, device discovery frame or service discovery frame may also include the first and second messages, in addition to the message types exemplified above, those skilled in the art shall Understand that more types of messages for interaction are applicable to this technical solution.
在上述技术方案中, 优选地, 所述网络时间同步信息至少包括时间戳 信息。 在该技术方案中, 网络时间同步信息可以采用与时间戳信息同样的 格式, 为 8个字节, 当然也可以采用字节为其它长度的信息。 In the above technical solution, preferably, the network time synchronization information includes at least a timestamp. Information. In this technical solution, the network time synchronization information may be in the same format as the timestamp information, and is 8 bytes. Of course, the bytes may be other lengths of information.
本发明还提供一种数据通信方法, 包括: 生成第一消息, 所述第一消 息至少包含确定网络时间同步信息提供者的第一信息; 发送所述第一消 息, 以及接收第二消息, 所述第二消息至少包含确定所述网络时间同步信 息提供者的第二信息; 对比所述第一信息和所述第二信息得到对比结果, 并根据所述对比结果从所述第一消息的发送方和所述第二消息的发送方中 确定所述网络时间同步信息提供者。 在该技术方案中, 在第一消息、 第二 消息的发送方是网络组建者时, 则可以利用二者之间交互的消息, 从二者 之间选择一个作为网络时间同步信息的提供者, 而并非固定使用网络的组 建发起者来广播网络时间同步信息, 降低了因其离开网络导致其它设备无 法侦听到网络时间同步信息来进行时间同步的可能性。 本方案适用于 NAN等多种由 STA组建而成的网络。  The present invention also provides a data communication method, including: generating a first message, where the first message includes at least first information determining a network time synchronization information provider; transmitting the first message, and receiving a second message, The second message includes at least second information determining the network time synchronization information provider; comparing the first information with the second information to obtain a comparison result, and transmitting from the first message according to the comparison result And determining, by the party and the sender of the second message, the network time synchronization information provider. In the technical solution, when the sender of the first message and the second message is a network organizer, the message exchanged between the two may be used to select one of the providers as the network time synchronization information. Instead of using the establishment initiator of the fixed network to broadcast the network time synchronization information, the possibility of time synchronization due to the fact that other devices cannot hear the network time synchronization information due to leaving the network is reduced. This solution is applicable to a variety of networks formed by STAs such as NAN.
在上述技术方案中, 优选地, 所述第一信息至少包含所述第一消息的 发送方所产生的第一随机数和 /或所述第一消息的发送方的第一媒介访问 控制地址; 所述第二信息至少包含所述第二消息的发送方所产生的第二随 机数和 /或所述第二消息的发送方的第二媒介访问控制地址。 在该技术方 案中, 第一信息可以是由网络组建者之一产生的随机数, 这个随机数产生 的范围可以是从 1 至 10000 之间的任何一个整数, 或是该网络组建者的 MAC 地址; 同样第二信息的产生方法与第一信息的产生方法一样, 其 中, 随机数的产生范围也可以是其它的范围。 本领域技术人员应当理解, 更多类型的可互相比较的信息都适用于本技术方案。  In the above technical solution, preferably, the first information includes at least a first random number generated by a sender of the first message and/or a first medium access control address of a sender of the first message; The second information includes at least a second random number generated by a sender of the second message and/or a second medium access control address of a sender of the second message. In the technical solution, the first information may be a random number generated by one of the network builders, and the random number may be generated by any integer from 1 to 10000, or the MAC address of the network constructor. Similarly, the second information is generated in the same manner as the first information, wherein the generation range of the random number may be other ranges. Those skilled in the art will appreciate that more types of mutually comparable information are applicable to the present technical solution.
在上述技术方案中, 优选地, 在所述对比结果为所述第一随机数和 / 或所述第一媒介访问控制地址与所述第二随机数和 /或所述第二媒介访问 控制地址不同时, 从所述第一消息的发送方和所述第二消息的发送方中确 定所述网络时间同步信息提供者。 在该技术方案中, 第一随机数的值为 10 , 第二随机数的值为 11 , 双方都已经知道各自产生的随机数的值, 只 要这两个值不相同, 就可以从二者中确定网络时间同步信息的提供者; 当 然 MAC 地址的值是完全不一样的, 也可以从二者中确定网络时间同步信 息的提供者。 In the above technical solution, preferably, the comparison result is the first random number and/or the first medium access control address and the second random number and/or the second medium access control address The network time synchronization information provider is determined from the sender of the first message and the sender of the second message. In the technical solution, the value of the first random number is 10, and the value of the second random number is 11, and both parties already know the value of the random number generated by each, as long as the two values are not the same, Determining the provider of the network time synchronization information; of course, the value of the MAC address is completely different, and the network time synchronization letter can also be determined from the two. Provider of interest.
在上述技术方案中, 优选地, 还包括: 在所述对比结果为所述第一随 机数和 /或所述第一媒介访问控制地址与所述第二随机数相同时, 重新生 成并发送所述第一消息, 以及重新接收所述第二消息。 在该技术方案中, 当第一随机数为 10, 第二随机数也为 10 时, 双方都知道所产生的随机数 是相同的, 不能够确定网络时间同步信息的提供者, 那么二者重新产生随 机数并且重新发送, 直至确定网络时间同步信息的提供者。  In the above technical solution, preferably, the method further includes: regenerating and transmitting, when the comparison result is that the first random number and/or the first medium access control address is the same as the second random number Describe the first message, and re-receive the second message. In this technical solution, when the first random number is 10 and the second random number is also 10, both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information, then both A random number is generated and resent until the provider of the network time synchronization information is determined.
在上述技术方案中, 优选地, 在所述第一随机数大于或小于所述第二 随机数时, 和 /或第一媒介访问控制地址大于或小于所述第二媒介访问控 制地址时, 从所述第一消息的发送方和所述第二消息的发送方中确定所述 网络时间同步信息提供者。 在该技术方案中, 只要是第一随机数和第二随 机数不相同, 我们可以根据谁产生的随机数大, 谁就是网络时间同步信息 的提供者, 当然也可以是谁产生的随机数小谁就是网络时间同步信息的提 供者的机制来确定。 同样此方法也可以用于 MAC 地址中, 过程与随机数 一样, 这里不再赘述。  In the above technical solution, preferably, when the first random number is greater than or less than the second random number, and/or the first medium access control address is greater than or less than the second medium access control address, The network time synchronization information provider is determined by the sender of the first message and the sender of the second message. In this technical solution, as long as the first random number and the second random number are different, we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number. Who is the mechanism for the provider of network time synchronization information to determine. The same method can also be used in the MAC address, the process is the same as the random number, and will not be described here.
在上述技术方案中, 优选地, 所述第一消息和 /或所述第二消息为探 测请求帧、 关联请求帧、 设备发现帧或服务发现帧。 在该技术方案中, 探 测请求帧可以包含第一和第二消息, 在网络组建之前时就可以知道第一信 息和第二信息, 根据第一信息和第二信息在网络组建之后就可以确定网络 时间同步信息的提供者, 利于后续通信的正常进行; 同样关联请求帧、 设 备发现帧或服务发现帧也可包含第一和第二消息, 除了上述示例出的消息 类型外, 本领域技术人员应当理解, 更多类型的用于交互的消息, 都适用 于本技术方案。  In the above technical solution, preferably, the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame. In the technical solution, the probe request frame may include the first and second messages, and the first information and the second information may be known before the network is formed, and the network may be determined after the network is formed according to the first information and the second information. The provider of the time synchronization information facilitates the normal operation of the subsequent communication; the same association request frame, device discovery frame or service discovery frame may also include the first and second messages, in addition to the message types exemplified above, those skilled in the art shall Understand that more types of messages for interaction are applicable to this technical solution.
在上述技术方案中, 优选地, 所述网络时间同步信息至少包括时间戳 信息。 在该技术方案中, 网络时间同步信息可以采用与时间戳信息同样的 格式, 为 8个字节, 当然也可以采用字节为其它长度的信息。  In the above technical solution, preferably, the network time synchronization information includes at least time stamp information. In this technical solution, the network time synchronization information may be in the same format as the timestamp information, and is 8 bytes. Of course, the bytes may be other lengths of information.
综上所述, 通过以上技术方案, 可以实现一种通信装置和一种数据通 信方法, 能够使得网络组建后, 网络中的 STA 能够保证时间上同步, 从 而保证通信的正常进行, 同时满足了 NAN网络流动性大的特点。 附图说明 In summary, the above technical solution can realize a communication device and a data communication method, which can enable STAs in the network to ensure time synchronization after the network is established, thereby ensuring normal communication and satisfying the NAN. The characteristics of large network mobility. DRAWINGS
图 1是根据本发明的一个实施例的通信装置的框图;  1 is a block diagram of a communication device in accordance with one embodiment of the present invention;
图 2是根据本发明的一个实施例的数据通信方法的流程图;  2 is a flow chart of a data communication method in accordance with one embodiment of the present invention;
图 3是根据本发明的一个实施例的数据通信方法的原理示意图; 图 4是根据本发明的一个实施例的数据通信方法的数据交互图。 具体实施方式  3 is a schematic diagram of the principle of a data communication method according to an embodiment of the present invention; and FIG. 4 is a data interaction diagram of a data communication method according to an embodiment of the present invention. detailed description
为了能够更清楚地理解本发明的上述目的、 特征和优点, 下面结合附 图和具体实施方式对本发明进行进一步的详细描述。 需要说明的是, 在不 沖突的情况下, 本申请的实施例及实施例中的特征可以相互组合。  The above described objects, features and advantages of the present invention will be more fully understood from the following detailed description. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments of the present application may be combined with each other.
在下面的描述中阐述了很多具体细节以便于充分理解本发明, 但是, 本发明还可以采用其他不同于在此描述的其他方式来实施, 因此, 本发明 的保护范围并不受下面公开的具体实施例的限制。  In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the invention may be practiced otherwise than as described herein. Limitations of the embodiments.
图 1是根据本发明的一个实施例的通信装置的框图。  1 is a block diagram of a communication device in accordance with one embodiment of the present invention.
如图 1 所示, 本发明提供一种通信装置 100 , 包括: 数据生成模块 102 , 生成第一消息, 所述第一消息至少包含确定网络时间同步信息提供 者的第一信息; 数据收发模块 104 , 发送所述第一消息, 以及接收第二消 息, 所述第二消息至少包含确定所述网络时间同步信息提供者的第二信 息; 对比确定模块 106 , 对比所述第一信息和所述第二信息得到对比结 果, 并根据所述对比结果从所述通信装置和所述第二消息的发送方中确定 所述网络时间同步信息提供者。 在该技术方案中, 数据生成模块 102、 对 比确定模块 106可以是通信装置中数据处理的芯片模块, 而数据收发模块 104 则相当于信号收发装置以及天线等, 在通信装置、 第二消息的发送方 是网络组建者时, 则可以利用二者之间交互的消息, 从二者之间选择一个 作为网络时间同步信息的提供者, 而并非固定使用网络的组建发起者来广 播网络时间同步信息, 降低了因其离开网络导致其它设备无法侦听到网络 时间同步信息来进行时间同步的可能性。 本方案适用于 NAN 等多种由 STA组建而成的网络。  As shown in FIG. 1 , the present invention provides a communication device 100, including: a data generating module 102, generating a first message, where the first message includes at least first information for determining a network time synchronization information provider; and the data transceiver module 104 Transmitting the first message, and receiving the second message, where the second message includes at least second information determining the network time synchronization information provider; the comparison determining module 106, comparing the first information with the first The second information is compared, and the network time synchronization information provider is determined from the communication device and the sender of the second message according to the comparison result. In the technical solution, the data generating module 102 and the comparison determining module 106 may be chip modules for data processing in the communication device, and the data transceiver module 104 is equivalent to a signal transmitting and receiving device and an antenna, etc., in the sending of the communication device and the second message. When the party is a network organizer, it can use the message of interaction between the two to select one as the provider of the network time synchronization information, and not the fixed initiator of the network to broadcast the network time synchronization information. It reduces the possibility of time synchronization because other devices can't hear network time synchronization information because they leave the network. This solution is applicable to a variety of networks formed by STAs such as NAN.
在上述技术方案中, 所述第一信息至少包含所述数据生成模块 102所 生成的第一随机数和 /或所述通信装置的第一媒介访问控制地址; 所述第 二信息至少包含所述第二消息的发送方所生成的第二随机数和 /或所述第 二消息的发送方的第二媒介访问控制地址。 在该技术方案中, 第一信息可 以是由通信装置产生的随机数, 这个随机数产生的范围可以是从 1 至 10000 之间的任何一个整数, 或是通信装置的 MAC 地址; 同样第二信息 的产生方法与第一信息的产生方法一样, 其中, 随机数的产生范围也可以 是其它的范围。 本领域技术人员应当理解, 更多类型的可互相比较的信息 都适用于本技术方案。 In the above technical solution, the first information includes at least the data generating module 102 Generating a first random number and/or a first medium access control address of the communication device; the second information includes at least a second random number generated by a sender of the second message and/or the second The second medium access control address of the sender of the message. In this technical solution, the first information may be a random number generated by the communication device, and the random number may be generated in any range from 1 to 10000, or the MAC address of the communication device; The generation method is the same as the generation method of the first information, wherein the generation range of the random number may also be other ranges. Those skilled in the art will appreciate that more types of mutually comparable information are applicable to the present technical solution.
在上述技术方案中, 在所述对比结果为所述第一随机数和 /或所述第 一媒介访问控制地址与所述第二随机数和 /或所述第二媒介访问控制地址 不同时, 所述对比确定模块 106从所述通信装置和所述第二消息的发送方 中确定所述网络时间同步信息提供者。 在该技术方案中, 第一随机数的值 为 10 , 第二随机数的值为 11 , 双方都已经知道各自产生的随机数的值, 只要这两个值不相同, 就可以从二者中确定网络时间同步信息的提供者; 当然 MAC 地址的值是完全不一样的, 也可以从二者中确定网络时间同步 信息的提供者。  In the above technical solution, when the comparison result is that the first random number and/or the first medium access control address is different from the second random number and/or the second medium access control address, The comparison determination module 106 determines the network time synchronization information provider from the communication device and the sender of the second message. In the technical solution, the value of the first random number is 10, and the value of the second random number is 11, and both parties already know the value of the random number generated by each, as long as the two values are not the same, The provider of the network time synchronization information is determined; of course, the value of the MAC address is completely different, and the provider of the network time synchronization information can also be determined from the two.
在上述技术方案中, 在所述对比结果为所述第一随机数与所述第二随 机数相同时, 所述数据收发模块 104重新生成并发送所述第一消息, 以及 重新接收所述第二消息。 在该技术方案中, 当第一随机数为 10 , 第二随 机数也为 10 时, 双方都知道所产生的随机数是相同的, 不能够确定网络 时间同步信息的提供者, 那么二者重新产生随机数并且重新发送, 直至确 定网络时间同步信息的提供者。  In the above technical solution, when the comparison result is that the first random number is the same as the second random number, the data transceiver module 104 regenerates and sends the first message, and re-receives the first Two messages. In this technical solution, when the first random number is 10 and the second random number is also 10, both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information, then both A random number is generated and resent until the provider of the network time synchronization information is determined.
在上述技术方案中, 在所述第一随机数大于或小于所述第二随机数 时, 和 /或第一媒介访问控制地址大于或小于所述第二媒介访问控制地址 时, 所述对比确定模块 106从所述通信装置和所述第二消息的发送方中确 定所述网络时间同步信息提供者。 在该技术方案中, 只要是第一随机数和 第二随机数不相同, 我们可以根据谁产生的随机数大, 谁就是网络时间同 步信息的提供者, 当然也可以是谁产生的随机数小谁就是网络时间同步信 息的提供者的机制来确定。 同样此方法也可以用于 MAC 地址中, 过程与 随机数一样, 这里不再赘述。 In the above technical solution, when the first random number is greater than or less than the second random number, and/or the first medium access control address is greater than or less than the second medium access control address, the comparison is determined. The module 106 determines the network time synchronization information provider from the communication device and the sender of the second message. In this technical solution, as long as the first random number and the second random number are different, we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number. Who is the mechanism for the provider of network time synchronization information to determine. Again this method can also be used in MAC addresses, processes with The same as random numbers, we will not repeat them here.
在上述技术方案中, 所述第一消息和 /或所述第二消息为探测请求 帧、 关联请求帧、 设备发现帧或服务发现帧。 在该技术方案中, 探测请求 帧可以包含第一和第二消息, 在网络组建之前时就可以知道第一信息和第 二信息, 根据第一信息和第二信息在网络组建之后就可以确定网络时间同 步信息的提供者, 利于后续通信的正常进行; 同样关联请求帧、 设备发现 帧或服务发现帧也可包含第一和第二消息, 除了上述示例出的消息类型 外, 本领域技术人员应当理解, 更多类型的用于交互的消息, 都适用于本 技术方案。  In the above technical solution, the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame. In the technical solution, the probe request frame may include the first and second messages, and the first information and the second information may be known before the network is formed, and the network may be determined after the network is formed according to the first information and the second information. The provider of the time synchronization information facilitates the normal operation of the subsequent communication; the same association request frame, device discovery frame or service discovery frame may also include the first and second messages, in addition to the message types exemplified above, those skilled in the art shall Understand that more types of messages for interaction are applicable to this technical solution.
在上述技术方案中, 所述网络时间同步信息至少包括时间戳信息。 在 该技术方案中, 网络时间同步信息可以采用与时间戳信息同样的格式, 为 In the above technical solution, the network time synchronization information includes at least timestamp information. In the technical solution, the network time synchronization information may be in the same format as the timestamp information,
8个字节, 当然也可以采用字节为其它长度的信息。 8 bytes, of course, bytes can also be used for other lengths of information.
图 2是根据本发明的一个实施例的数据通信方法的流程图。  2 is a flow chart of a data communication method in accordance with one embodiment of the present invention.
如图 2所示, 本发明还提供一种数据通信方法, 包括: 步骤 202 , 生 成第一消息, 所述第一消息至少包含确定网络时间同步信息提供者的第一 信息; 步骤 204 , 发送所述第一消息, 以及接收第二消息, 所述第二消息 至少包含确定所述网络时间同步信息提供者的第二信息; 步骤 206 , 对比 所述第一信息和所述第二信息得到对比结果, 并根据所述对比结果从所述 第一消息的发送方和所述第二消息的发送方中确定所述网络时间同步信息 提供者。 在该技术方案中, 在第一消息、 第二消息的发送方是网络组建者 时, 则可以利用二者之间交互的消息, 从二者之间选择一个作为网络时间 同步信息的提供者, 而并非固定使用网络的组建发起者来广播网络时间同 步信息, 降低了因其离开网络导致其它设备无法侦听到网络时间同步信息 来进行时间同步的可能性。 本方案适用于 NAN等多种由 STA组建而成的 网络。  As shown in FIG. 2, the present invention further provides a data communication method, including: Step 202: Generate a first message, where the first message includes at least first information that determines a network time synchronization information provider; Step 204, Determining a first message, and receiving a second message, where the second message includes at least determining second information of the network time synchronization information provider; Step 206, comparing the first information with the second information to obtain a comparison result And determining, according to the comparison result, the network time synchronization information provider from a sender of the first message and a sender of the second message. In the technical solution, when the sender of the first message and the second message is a network organizer, the message exchanged between the two may be used to select one of the providers as the network time synchronization information. Instead of using the establishment initiator of the fixed network to broadcast the network time synchronization information, the possibility of time synchronization due to the fact that other devices cannot hear the network time synchronization information due to leaving the network is reduced. This solution is applicable to a variety of networks formed by STAs such as NAN.
在上述技术方案中, 所述第一信息至少包含所述第一消息的发送方所 产生的第一随机数和 /或所述第一消息的发送方的第一媒介访问控制地 址; 所述第二信息至少包含所述第二消息的发送方所产生的第二随机数和 /或所述第二消息的发送方的第二媒介访问控制地址。 在该技术方案中, 第一信息可以是由网络组建者之一产生的随机数, 这个随机数产生的范围 可以是从 1至 10000之间的任何一个整数, 或是该网络组建者的 MAC地 址; 同样第二信息的产生方法与第一信息的产生方法一样, 其中, 随机数 的产生范围也可以是其它的范围。 本领域技术人员应当理解, 更多类型的 可互相比较的信息都适用于本技术方案。 In the above technical solution, the first information includes at least a first random number generated by a sender of the first message and/or a first medium access control address of a sender of the first message; The second information includes at least a second random number generated by the sender of the second message and/or a second medium access control address of the sender of the second message. In this technical solution, The first information may be a random number generated by one of the network builders, and the random number may be generated from any integer between 1 and 10000, or the MAC address of the network constructor; The generation method is the same as the generation method of the first information, wherein the generation range of the random number may also be other ranges. Those skilled in the art will appreciate that more types of mutually comparable information are applicable to the present technical solution.
在上述技术方案中, 所述步骤 206 包括: 在所述对比结果为所述第一 随机数和 /或所述第一媒介访问控制地址与所述第二随机数和 /或所述第二 媒介访问控制地址不同时, 从所述第一消息的发送方和所述第二消息的发 送方中确定所述网络时间同步信息提供者。 在该技术方案中, 第一随机数 的值为 10 , 第二随机数的值为 11 , 双方都已经知道各自产生的随机数的 值, 只要这两个值不相同, 就可以从二者中确定网络时间同步信息的提供 者; 当然 MAC 地址的值是完全不一样的, 也可以从二者中确定网络时间 同步信息的提供者。  In the above technical solution, the step 206 includes: the comparing result is the first random number and/or the first medium access control address and the second random number and/or the second medium When the access control addresses are different, the network time synchronization information provider is determined from the sender of the first message and the sender of the second message. In the technical solution, the value of the first random number is 10, and the value of the second random number is 11, and both parties already know the value of the random number generated by each, as long as the two values are not the same, The provider of the network time synchronization information is determined; of course, the value of the MAC address is completely different, and the provider of the network time synchronization information can also be determined from the two.
在上述技术方案中, 还包括: 在所述对比结果为所述第一随机数和 / 或所述第一媒介访问控制地址与所述第二随机数相同时, 重新生成并发送 所述第一消息, 以及重新接收所述第二消息。 在该技术方案中, 当第一随 机数为 10 , 第二随机数也为 10 时, 双方都知道所产生的随机数是相同 的, 不能够确定网络时间同步信息的提供者, 那么二者重新产生随机数并 且重新发送, 直至确定网络时间同步信息的提供者。  In the above technical solution, the method further includes: regenerating and transmitting the first when the comparison result is that the first random number and/or the first medium access control address is the same as the second random number a message, and re-receiving the second message. In this technical solution, when the first random number is 10 and the second random number is also 10, both parties know that the generated random numbers are the same, and cannot determine the provider of the network time synchronization information, then both A random number is generated and resent until the provider of the network time synchronization information is determined.
在上述技术方案中, 所述步骤 206 包括: 在所述第一随机数大于或小 于所述第二随机数时, 和 /或第一媒介访问控制地址大于或小于所述第二 媒介访问控制地址时, 从所述第一消息的发送方和所述第二消息的发送方 中确定所述网络时间同步信息提供者。 在该技术方案中, 只要是第一随机 数和第二随机数不相同, 我们可以根据谁产生的随机数大, 谁就是网络时 间同步信息的提供者, 当然也可以是谁产生的随机数小谁就是网络时间同 步信息的提供者的机制来确定。 同样此方法也可以用于 MAC 地址中, 过 程与随机数一样, 这里不再赘述。  In the foregoing technical solution, the step 206 includes: when the first random number is greater than or less than the second random number, and/or the first medium access control address is greater than or less than the second medium access control address And determining, by the sender of the first message and the sender of the second message, the network time synchronization information provider. In this technical solution, as long as the first random number and the second random number are different, we can be based on who generates the random number, who is the provider of the network time synchronization information, and of course, who can generate the random number. Who is the mechanism for the provider of network time synchronization information to determine. The same method can also be used in the MAC address, the process is the same as the random number, and will not be described here.
在上述技术方案中, 所述第一消息和 /或所述第二消息为探测请求 帧、 关联请求帧、 设备发现帧或服务发现帧。 在该技术方案中, 探测请求 帧可以包含第一和第二消息, 在网络组建之前时就可以知道第一信息和第 二信息, 根据第一信息和第二信息在网络组建之后就可以确定网络时间同 步信息的提供者, 利于后续通信的正常进行; 同样关联请求帧、 设备发现 帧或服务发现帧也可包含第一和第二消息, 除了上述示例出的消息类型 外, 本领域技术人员应当理解, 更多类型的用于交互的消息, 都适用于本 技术方案。 In the foregoing technical solution, the first message and/or the second message is a probe request frame, an association request frame, a device discovery frame, or a service discovery frame. In this technical solution, the probe request The frame may include first and second messages, and the first information and the second information may be known before the network is formed, and the provider of the network time synchronization information may be determined after the network is formed according to the first information and the second information, which is beneficial to the network. The subsequent communication is normally performed; the same association request frame, device discovery frame or service discovery frame may also contain the first and second messages. In addition to the above-described example message types, those skilled in the art will appreciate that more types are used for The interactive messages are applicable to this technical solution.
在上述技术方案中, 所述网络时间同步信息至少包括时间戳信息。 在 该技术方案中, 网络时间同步信息可以采用与时间戳信息同样的格式, 为 In the above technical solution, the network time synchronization information includes at least timestamp information. In the technical solution, the network time synchronization information may be in the same format as the timestamp information,
8个字节, 当然也可以采用字节为其它长度的信息。 8 bytes, of course, bytes can also be used for other lengths of information.
本发明的主要思想是: 在初始建立 NAN网络时, NAN网络建立的发 起 STA和响应 STA进行协商, 从二者中确定一个 STA作为 NAN网络中 Timestamp (时间戳, 在此作为一种具体的时间同步信息) 的提供者 (由 于 Wi-Fi 技术中信道独占, 这里只可能是发起者和一个响应 STA 进行 Timestamp的协商 ) 。  The main idea of the present invention is: When the NAN network is initially established, the initiating STA established by the NAN network negotiates with the responding STA, and determines one STA as the Timestamp in the NAN network, as a specific time. The provider of the synchronization information (due to the channel monopoly in Wi-Fi technology, it is only possible that the initiator and a response STA negotiate the Timestamp).
方案 1 : STA A和 STA B可以随机产生一个 [1 , 100000]之间的随机 数, 如果哪个 STA产生的随机数小 /大, 就可以作为 NAN 网络时间同步 信息 Timestamp 的提供者, 其具体示意图如下图 3 所示, 其中, xl 是 STA A产生的随机数, x2是 STA B产生的随机数。  Scheme 1: STA A and STA B can randomly generate a random number between [1, 100000]. If any STA generates a random number that is small/large, it can be used as a provider of NAN network time synchronization information Timestamp. As shown in Figure 3 below, where xl is the random number generated by STA A and x2 is the random number generated by STA B.
步骤 302 , 判断 xl与 x2是否相等;  Step 302, determining whether xl and x2 are equal;
步骤 304, 在 xl与 x2相等时, STA A和 STA B均重新生成随机数; 步骤 306, 在 xl与 x2不等时, 判断 xl是否小于 x2 , 在 xl 小于 x2 时, 进入步骤 308, 在 xl大于 x2时, 进入步骤 310;  Step 304: When x1 and x2 are equal, both STA A and STA B regenerate the random number. Step 306: When xl and x2 are not equal, determine whether xl is smaller than x2. When xl is less than x2, proceed to step 308, where xl If it is greater than x2, proceed to step 310;
步骤 308 , 将 STA B作为时间戳提供者;  Step 308, using STA B as a timestamp provider;
步骤 310, 将 STA A作为时间戳提供者。  In step 310, STA A is used as a timestamp provider.
需要注意的是在本流程中, 也可以在 xl 大于 x2时, 将 STA B作为 时间戳提供者, 在 xl 小于 x2时, 将 STA A作为时间戳提供者。 通过这 两种方式, 都能增加 Timestamp提供者的随机性。  It should be noted that in this process, STA B can also be used as a timestamp provider when xl is greater than x2, and STA A is used as a timestamp provider when xl is less than x2. In both ways, the randomness of the Timestamp provider can be increased.
方案 2: 根据 STA A与 STA B的 MAC地址值的大小来比较, 根据比 较结果确定一个 STA作为 NAN 网络中时间同步信息 Timestamp 的提供 者, 其具体流程与方案 1相似。 Solution 2: According to the comparison of the MAC address values of STA A and STA B, determining, according to the comparison result, one STA is provided as the time synchronization information Timestamp in the NAN network. The specific process is similar to that of Option 1.
以下是两个 STA 完成发现和关联后, 所进行的 Timestamp提供者的 协商过程, 具体如图 4所示。  The following is the negotiation process of the Timestamp provider after the two STAs complete the discovery and association, as shown in Figure 4.
1、 其中 STA A准备好随机数 1或是 MAC地址 1 , 其中 STA B准备 好随机数 2或是 MAC地址 2;  1. STA A is ready for random number 1 or MAC address 1, where STA B is ready for random number 2 or MAC address 2;
2、 一般有网络建立的发起者 (此时假如是 STA A )发出第一条信令 Timestamp提供者请求消息, 在这条消息里面带上随机数 1 或是 MAC地 址 1 ;  2. Generally, the initiator of the network establishment (if it is STA A) sends the first signaling Timestamp provider request message, and carries the random number 1 or MAC address 1 in this message;
3、 STA B 回复 Timestamp提供者请求消息的响应消息, 里面带上随 机数 2或是 MAC地址 2;  3. STA B replies to the response message of the Timestamp provider request message, which carries the random number 2 or the MAC address 2;
4、 双方得到比较结果, 协商出 Timestamp的提供者。  4. The two parties obtained the comparison result and negotiated the provider of Timestamp.
只要 Timestamp的提供者还在 NAN网络中, 后续的 STA加入进来都 是以 Timestamp的提供者广播的 Timestamp信息作为在 NAN网络中时间 同步的信息, 不再需要继续协商 Timestamp提供者协商的过程; 另外如果 Timestamp的提供者要离开 NAN网络, 在离开 NAN网络之前, 它可以指 定在 NAN 网络中的任意一个 STA 为 Timestamp 的提供者, 并且在离开 NAN网络之前广播出来。  As long as the provider of Timestamp is still in the NAN network, the subsequent STAs join the Timestamp information broadcast by the provider of Timestamp as the time synchronization information in the NAN network, and no longer need to continue the process of negotiating the Timestamp provider negotiation; If the provider of Timestamp is to leave the NAN network, it can designate any STA in the NAN network to be the provider of Timestamp before leaving the NAN network and broadcast it before leaving the NAN network.
综上所述, 通过本发明的技术方案, 实现一种通信装置和一种数据通 信方法, 尽量避免由于某个 NAN 网络组建者离开 NAN 网络, 而导致其 网络中其它设备无法侦听到 Timestamp来进行时间同步解决了现有时间同 步机制不能够满足 NAN 网络的特点, 保证了 NAN 网络中设备的正常通 信。  In summary, with the technical solution of the present invention, a communication device and a data communication method are implemented to avoid that a certain NAN network organizer leaves the NAN network, and other devices in the network cannot detect the Timestamp. Time synchronization solves the problem that the existing time synchronization mechanism cannot meet the characteristics of the NAN network, and ensures normal communication of devices in the NAN network.
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于 本领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精 神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明 的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

权 利 要 求 书 claims
1、 一种通信装置, 其特征在于, 包括: 1. A communication device, characterized in that it includes:
数据生成模块, 生成第一消息, 所述第一消息至少包含确定网络时间 同步信息提供者的第一信息; The data generation module generates a first message, where the first message at least contains first information that determines the network time synchronization information provider;
数据收发模块, 发送所述第一消息, 以及接收第二消息, 所述第二消 息至少包含确定所述网络时间同步信息提供者的第二信息; A data transceiver module sends the first message, and receives a second message, where the second message at least contains second information that determines the network time synchronization information provider;
对比确定模块, 对比所述第一信息和所述第二信息得到对比结果, 并 根据所述对比结果从所述通信装置和所述第二消息的发送方中确定所述网 络时间同步信息提供者。 A comparison determination module, compares the first information and the second information to obtain a comparison result, and determines the network time synchronization information provider from the communication device and the sender of the second message based on the comparison result. .
2、 根据权利要求 1 所述的通信装置, 其特征在于, 所述第一信息至 少包含所述数据生成模块所生成的第一随机数和 /或所述通信装置的第一 媒介访问控制地址; 2. The communication device according to claim 1, wherein the first information includes at least a first random number generated by the data generation module and/or a first medium access control address of the communication device;
所述第二信息至少包含所述第二消息的发送方所生成的第二随机数和 /或所述第二消息的发送方的第二媒介访问控制地址。 The second information at least includes a second random number generated by the sender of the second message and/or a second medium access control address of the sender of the second message.
3、 根据权利要求 2 所述的通信装置, 其特征在于, 在所述对比结果 为所述第一随机数和 /或所述第一媒介访问控制地址与所述第二随机数和 / 或所述第二媒介访问控制地址不同时, 所述对比确定模块从所述通信装置 和所述第二消息的发送方中确定所述网络时间同步信息提供者。 3. The communication device according to claim 2, wherein the comparison result is the first random number and/or the first medium access control address and the second random number and/or the When the second medium access control address is different, the comparison determination module determines the network time synchronization information provider from the communication device and the sender of the second message.
4、 根据权利要求 3 所述的通信装置, 其特征在于, 在所述对比结果 为所述第一随机数与所述第二随机数相同时, 所述数据收发模块重新生成 并发送所述第一消息, 以及重新接收所述第二消息。 4. The communication device according to claim 3, wherein when the comparison result is that the first random number and the second random number are the same, the data transceiver module regenerates and sends the first random number. a message, and re-receiving the second message.
5、 根据权利要求 3 所述的通信装置, 其特征在于, 在所述第一随机 数大于或小于所述第二随机数时, 和 /或第一媒介访问控制地址大于或小 于所述第二媒介访问控制地址时, 所述对比确定模块从所述通信装置和所 述第二消息的发送方中确定所述网络时间同步信息提供者。 5. The communication device according to claim 3, wherein when the first random number is greater than or less than the second random number, and/or the first medium access control address is greater than or less than the second random number. When the media access control address is specified, the comparison determination module determines the network time synchronization information provider from the communication device and the sender of the second message.
6、 根据权利要求 1 至 5 中任一项所述的通信装置, 其特征在于, 所 述第一消息和 /或所述第二消息为探测请求帧、 关联请求帧、 设备发现帧 或服务发现帧。 6. The communication device according to any one of claims 1 to 5, characterized in that the first message and/or the second message is a detection request frame, an association request frame, a device discovery frame or a service discovery frame.
7、 根据权利要求 1 至 5 中任一项所述的通信装置, 其特征在于, 所 述网络时间同步信息至少包括时间戳信息。 7. The communication device according to any one of claims 1 to 5, characterized in that the network time synchronization information at least includes timestamp information.
8、 一种数据通信方法, 其特征在于, 包括: 8. A data communication method, characterized by including:
生成第一消息, 所述第一消息至少包含确定网络时间同步信息提供者 的第一信息; Generate a first message, the first message containing at least first information that determines the network time synchronization information provider;
发送所述第一消息, 以及接收第二消息, 所述第二消息至少包含确定 所述网络时间同步信息提供者的第二信息; Send the first message, and receive a second message, where the second message at least contains second information that determines the network time synchronization information provider;
对比所述第一信息和所述第二信息得到对比结果, 并根据所述对比结 果从所述第一消息的发送方和所述第二消息的发送方中确定所述网络时间 同步信息提供者。 Comparing the first information and the second information to obtain a comparison result, and determining the network time synchronization information provider from the sender of the first message and the sender of the second message based on the comparison result .
9、 根据权利要求 8 所述的数据通信方法, 其特征在于, 所述第一信 息至少包含所述第一消息的发送方所产生的第一随机数和 /或所述第一消 息的发送方的第一媒介访问控制地址; 9. The data communication method according to claim 8, wherein the first information at least includes a first random number generated by the sender of the first message and/or the sender of the first message. The first media access control address;
所述第二信息至少包含所述第二消息的发送方所产生的第二随机数和 /或所述第二消息的发送方的第二媒介访问控制地址。 The second information at least includes a second random number generated by the sender of the second message and/or a second medium access control address of the sender of the second message.
10、 根据权利要求 9所述的数据通信方法, 其特征在于, 在所述对比 结果为所述第一随机数和 /或所述第一媒介访问控制地址与所述第二随机 数和 /或所述第二媒介访问控制地址不同时, 从所述第一消息的发送方和 所述第二消息的发送方中确定所述网络时间同步信息提供者。 10. The data communication method according to claim 9, wherein the comparison result is the first random number and/or the first medium access control address and the second random number and/or When the second medium access control address is different, the network time synchronization information provider is determined from the sender of the first message and the sender of the second message.
11、 根据权利要求 10所述的数据通信方法, 其特征在于, 还包括: 在所述对比结果为所述第一随机数和 /或所述第一媒介访问控制地址 与所述第二随机数相同时, 重新生成并发送所述第一消息, 以及重新接收 所述第二消息。 11. The data communication method according to claim 10, further comprising: when the comparison result is the first random number and/or the first medium access control address and the second random number At the same time, the first message is regenerated and sent, and the second message is re-received.
12、 根据权利要求 10 所述的数据通信方法, 其特征在于, 在所述第 一随机数大于或小于所述第二随机数时, 和 /或第一媒介访问控制地址大 于或小于所述第二媒介访问控制地址时, 从所述第一消息的发送方和所述 第二消息的发送方中确定所述网络时间同步信息提供者。 12. The data communication method according to claim 10, characterized in that when the first random number is greater than or less than the second random number, and/or the first medium access control address is greater than or less than the third random number. When there are two media access control addresses, the network time synchronization information provider is determined from the sender of the first message and the sender of the second message.
13、 根据权利要求 8 至 12 中任一项所述的数据通信方法, 其特征在 于, 所述第一消息和 /或所述第二消息为探测请求帧、 关联请求帧、 设备 发现帧或服务发现帧。 13. The data communication method according to any one of claims 8 to 12, characterized in that the first message and/or the second message are a detection request frame, an association request frame, a device Discovery frame or service discovery frame.
14、 根据权利要求 8 至 12 中任一项所述的数据通信方法, 其特征在 于, 所述网络时间同步信息至少包括时间戳信息。 14. The data communication method according to any one of claims 8 to 12, characterized in that the network time synchronization information at least includes timestamp information.
PCT/CN2013/085765 2012-10-26 2013-10-23 Communication device and data communication method WO2014063624A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210419052.3 2012-10-26
CN201210419052.3A CN102946634B (en) 2012-10-26 2012-10-26 Communicator and data communications method

Publications (1)

Publication Number Publication Date
WO2014063624A1 true WO2014063624A1 (en) 2014-05-01

Family

ID=47729528

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/085765 WO2014063624A1 (en) 2012-10-26 2013-10-23 Communication device and data communication method

Country Status (2)

Country Link
CN (1) CN102946634B (en)
WO (1) WO2014063624A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946634B (en) * 2012-10-26 2016-06-08 东莞宇龙通信科技有限公司 Communicator and data communications method
CN105075376B (en) * 2013-04-09 2019-07-16 英特尔Ip公司 The systems, devices and methods in networking (NAN) using sync beacon are perceived on periphery
CN107182121B (en) 2013-12-02 2020-08-07 华为终端有限公司 Method and equipment for selecting anchor master equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227267A (en) * 2006-12-21 2008-07-23 美国博通公司 Method and system for transmitting data
US20090010192A1 (en) * 2007-07-04 2009-01-08 Realtek Semiconductor Corp. Sink device
CN102946634A (en) * 2012-10-26 2013-02-27 东莞宇龙通信科技有限公司 Communicator and data communication method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227267A (en) * 2006-12-21 2008-07-23 美国博通公司 Method and system for transmitting data
US20090010192A1 (en) * 2007-07-04 2009-01-08 Realtek Semiconductor Corp. Sink device
CN102946634A (en) * 2012-10-26 2013-02-27 东莞宇龙通信科技有限公司 Communicator and data communication method

Also Published As

Publication number Publication date
CN102946634B (en) 2016-06-08
CN102946634A (en) 2013-02-27

Similar Documents

Publication Publication Date Title
JP6906565B2 (en) Schedule selection and connection setup between devices participating in NAN datalinks
JP6026675B2 (en) Wireless network size monitoring
US9451440B2 (en) System and method for pre-association discovery
JP2015503859A (en) Apparatus, system and method for IP address discovery for tunnel direct link setup
JP6377761B2 (en) Method and apparatus for data path based on independent basic service set for neighbor aware network
JP2019036971A (en) Systems and methods for effective access point discovery
WO2020088314A1 (en) Information transmission method and node device
JP5973659B2 (en) System and method for reducing signaling overhead
WO2016131195A1 (en) Data transmission method and device
WO2014063624A1 (en) Communication device and data communication method
CN105657040B (en) intranet communication method and system between devices
US9413601B2 (en) Channel reuse among communication networks sharing a communication channel
TWI400898B (en) Channel status determination method and related wireless local area network system and direct link setup method
WO2014067300A1 (en) Cluster information transmission method, and corresponding cluster terminal and access point
CN115669051A (en) Method, apparatus and computer program for selecting channel in wireless communication system and recording medium thereof
WO2014186985A1 (en) Communication device and wireless communication method

Legal Events

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

Ref document number: 13848229

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16/10/2015)

122 Ep: pct application non-entry in european phase

Ref document number: 13848229

Country of ref document: EP

Kind code of ref document: A1