# US 2018/0027487 A1 · Method and apparatus for performing service discovery in neighbor awareness network nan

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0027487 A1
- Document ID: US20180027487A1
- Status: Published application
- Kind: A1
- Application number: 15/678,582
- Filed: 2017-08-16
- Published: 2018-01-25
- Earliest claimed: 2015-02-17
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Gaokun PANG; Ping FANG
- Web page: https://patentgrep.com/patent/US20180027487A1

## CPC

- H04W 48/16: Discovering, processing access restriction or access information
- H04L 67/51: Discovery or management thereof, e.g. service location protocol [SLP] or web services
- H04W 8/005: {Discovery of network devices, e.g. terminals}
- H04L 12/40: Bus networks
- H04W 48/10: using broadcasted information
- H04W 84/12: WLAN [Wireless Local Area Networks]
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Embodiments of the present invention provide a method and an apparatus for performing service discovery in a neighbor awareness network NAN. The method includes: obtaining, by a first device, change information in the NAN, and generating a first service identifier according to the change information and first service information, where the change information includes: global change information in the NAN, or change information of the first device; and sending a service message to a second device, where the service message includes the first service identifier. In the embodiments of the present invention, security can be improved.

## Claims

### Claim 1

A method for performing service discovery in a neighbor awareness network (NAN), comprising:
receiving, by a second device, a service message sent by a first device, wherein the service message comprises a first service identifier, the service message is used to query a service required by the first device or broadcast a service supported by the first device, the first service identifier is generated by the first device according to change information and first service information in the NAN, the first service information is information about the service queried by the first device or information about the service supported by the first device, and the change information comprises: global change information in the NAN, or change information of the first device;
obtaining, by the second device, the change information in the NAN, and generating a second service identifier according to the change information and second service information, wherein if the first service information is the information about the service supported by the first device, the corresponding second service information is information about a service queried by the second device, or if the first service information is the information about the service queried by the first device, the corresponding second service information is information about a service supported by the second device; and
matching, by the second device, the first service identifier and the second service identifier, and if the matching succeeds, sending, by the second device, a service response message to the first device; wherein
the first device and the second device are devices in the NAN.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the generating a second service identifier according to the change information and the second service information comprises:
generating, by the second device, a mapping value according to the change information and the second service information, and using the mapping value as the second service identifier; wherein
the second service information comprises: a service name, a hash value of the service name, or a service number of the service name.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the global change information comprises at least one of the following information: an anchor master rank (AMR), a master rank (MR), a master preference (MP), an anchor master preference (AMP), a random factor (RF), anchor master beacon transmission time (AMBTT), a time synchronization function (TSF) value, a cluster identifier, or a cluster grade (CG).

### Claim 4 (depends on 1)

The method according to claim 1, wherein the change information of the first device comprises at least one of the following information: an MR, an interface address, a TSF value, an MP, or an RF.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the change information is information that is agreed upon by the first device and the second device in advance and that dynamically changes.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the service message further comprises indication information, and the indication information is used to indicate that the first service identifier dynamically changes.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the indication information is further used to indicate that the first service identifier is generated according to the global change information or generated according to the change information of the first device.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the second service identifier comprises multiple service identifiers, and the multiple service identifiers are generated according to different second service information, and are used to query multiple services required by the second device or broadcast multiple services supported by the second device.

### Claim 9

A method for performing service discovery in a neighbor awareness network (NAN), comprising:
obtaining, by a first device, change information in the NAN, and generating a first service identifier according to the change information and first service information, wherein the first service information is information about a service supported by the first device or information about a service queried by the first device, and the change information comprises: global change information in the NAN, or change information of the first device; and
sending, by the first device, a service message to a second device, wherein the service message comprises the first service identifier, and the service message is used to query the service required by the first device or broadcast the service supported by the first device; wherein
the first device and the second device are devices in the NAN.

### Claim 10 (depends on 9)

The method according to claim 9, wherein the generating a first service identifier according to the change information and the first service information comprises:
generating, by the first device, a mapping value according to the change information and the first service information, and using the mapping value as the first service identifier; wherein
the first service information comprises: a service name, a hash value of the service name, or a service number of the service name.

### Claim 11 (depends on 9)

The method according to claim 9, wherein the global change information comprises at least one of the following information: an anchor master rank (AMR), a master rank (MR), a master preference (MP), an anchor master preference (AMP), a random factor (RF), anchor master beacon transmission time (AMBTT), a time synchronization function (TSF) value, a cluster identifier, or a cluster grade (CG).

### Claim 12 (depends on 9)

The method according to claim 9, wherein the change information of the first device comprises at least one of the following information: an MR, an interface address, a TSF value, an MP, or an RF.

### Claim 13 (depends on 9)

The method according to claim 9, wherein the change information is information that is agreed upon by the first device and the second device in advance and that dynamically changes.

### Claim 14 (depends on 9)

The method according to claim 9, wherein the service message further comprises indication information, and the indication information is used to indicate that the first service identifier dynamically changes.

### Claim 15 (depends on 14)

The method according to claim 14, wherein the indication information is further used to indicate that the first service identifier is generated according to the global change information or generated according to the change information of the first device.

### Claim 16 (depends on 9)

The method according to claim 9, wherein the first service identifier comprises multiple service identifiers, and the multiple service identifiers are generated according to different first service information, and are used to query multiple services required by the first device or broadcast multiple services supported by the first device.

### Claim 17 (depends on 9)

The method according to claim 9, before the sending, by the first device, the service message to the second device, further comprising:
generating, by the first device, a new interface address, and setting a transmitter address comprised in the service message as the new interface address.

### Claim 18 (depends on 1)

A second device, comprising:
a processor, a memory, and a communications interface, wherein the processor, the memory, and the communications interface communicate by using a bus, and the processor executes a computer instruction in the memory to implement the method according to claim 1.

### Claim 19 (depends on 10)

A first device, comprising:
a processor, a memory, and a communications interface, wherein the processor, the memory, and the communications interface communicate by using a bus, and the processor executes a computer instruction in the memory to implement the method according to claim 10.
