# US 12,192,313 B2 · Method, device, system, and storage medium for establishing local communication link

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

- Number: US 12,192,313 B2
- Document ID: US12192313B2
- Status: Granted
- Kind: B2
- Application number: 17/519,296
- Filed: 2021-11-04
- Published: 2022-05-19
- Granted: 2025-01-07
- Earliest claimed: 2020-11-17
- Assignees: Shenzhen Chenbei Technology Co., Ltd.
- Applicants: Shenzhen Chenbei Technology Co., Ltd.
- Inventors: Guolin Li; Wei Zeng; Lei Luo
- Web page: https://patentgrep.com/patent/US12192313B2

## CPC

- H04L 69/161: {Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields}
- H04L 12/2818: {from a device located outside both the home and the home network (access arrangements H04L12/2856; for remote control or remote monitoring of applications H04L67/025; arrangements for transmitting signals characterised by the use of a wireless eletrical link G08C17/00; telephonic communication systems adapted for combination with remote control systems H04M11/007)}
- H04L 63/0435: {wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption (cryptographic mechanisms or cryptographic arrangements for symmetric key encryption H04L9/06)}
- H04L 63/0807: {using tickets, e.g. Kerberos (cryptographic mechanisms or cryptographic arrangements for entity authentication using tickets or tokens H04L9/3213)}
- H04L 63/083: {using passwords (cryptographic mechanisms or cryptographic arrangements for entity authentication using a predetermined code H04L9/3226)}
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- H04L 69/24: Negotiation of communication capabilities
- H04L 2012/285: {Generic home appliances, e.g. refrigerators}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method for establishing a local communication link includes: generating and sending a local communication negotiation request to a cloud server in response to detecting a first local communication operation between the client and a smart device. The local communication negotiation request is configured to instruct the smart device to allocate a TCP port and feed back a local communication negotiation response carrying a port number of the TCP port to the cloud server, and the local communication negotiation response is forwarded by the cloud server to the client. The method also includes after receiving the local communication negotiation response from the cloud server, sending a first link request carrying the port number to the smart device, and establishing a first TCP link with the smart device, the TCP link being a local communication link.

## Claims

### Claim 1

A method for establishing a local communication link, applied to a client, the method comprising:
generating and sending a local communication negotiation request to a cloud server in response to a first local communication operation between the client and a smart device, wherein the local communication negotiation request is forwarded by the cloud server to the smart device and configured to instruct the smart device to allocate a Transmission Control Protocol (TCP) port and feed back a local communication negotiation response carrying a port number of the TCP port to the cloud server, and the local communication negotiation response is forwarded by the cloud server to the client, and wherein the local communication negotiation response further carries an identity token corresponding to the port number;
after receiving the local communication negotiation response from the cloud server, sending a first link request carrying the port number to the smart device without the cloud server for forwarding, and establishing a first TCP link with the smart device, wherein the first TCP link is a local communication link;
generating a first authentication request according to the identity token, and sending the first authentication request to the smart device through the first TCP link, wherein the first authentication request is used by the smart device to authenticate the client and feed back a first authentication result through the first TCP link;
in response to an indication by the first authentication result that the client is authenticated, saving the port number and the identity token of the smart device;
after the first TCP link is disconnected, in response to a second local communication operation with the smart device, sending a second link request carrying the port number to the smart device, and establishing a second TCP link with the smart device; and
in response to an indication from the smart device that an authentication of the client has failed, deleting the port number and the identity token, and generating and sending another local communication negotiation request to the smart device through the cloud server.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises:
in response to a detection that a user performs a preset data acquisition operation or a control operation for controlling the smart device on an operation interface of the client, determining that the first local communication operation is detected.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
detecting an operation of clicking an icon of the smart device on an operation interface of the client, wherein the operation of clicking the icon of the smart device is regarded as the first local communication operation.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
after the first TCP link is disconnected, sending a second link request carrying the port number to the smart device; and
receiving a rejection when a time duration between a time when the first TCP link is disconnected and a time when the second link request is sent is greater than a preset time duration.

### Claim 5

A method for establishing a local communication link, applied to a smart device, comprising:
receiving a local communication negotiation request from a cloud server, wherein the local communication negotiation request is generated and sent to the cloud server by a client after detecting a first local communication operation between the client and the smart device;
allocating a TCP port and generating and feeding back a local communication negotiation response carrying a port number of the TCP port to the cloud server, wherein the local communication negotiation response is forwarded by the cloud server to the client, and wherein the local communication negotiation response further carries an identity token corresponding to the port number;
receiving a first link request carrying the port number from the client without the cloud server for forwarding, and establishing a first TCP link with the client, wherein the first link request is generated by the client after receiving the local communication negotiation response from the cloud server, and the first TCP link is a local communication link;
receiving a first authentication request sent by the client through the first TCP link;
in response to the first authentication request, authenticating the client according to the identity token, and feeding back a first authentication result to the client;
after the first TCP link is disconnected, in response to a second local communication operation with the smart device, receiving a second link request carrying the port number for a second TCP link to be established; and
in response to an indication from the smart device that an authentication of the client has failed, receiving another local communication negotiation request from the client through the cloud server, after the port number and the identity token is deleted by the client.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the method further comprises:
saving the identity token corresponding to the port number.

### Claim 7 (depends on 5)

The method according to claim 5, wherein the method further comprises:
generating a valid duration of a key, wherein the valid duration is a retention duration of the key after an authenticated TCP link is disconnected.

### Claim 8

A client, comprising: a memory storing a computer program; and
a processor configured to execute the computer program to perform:
in response to a first local communication operation between the client and a smart device, generating and sending a local communication negotiation request to a cloud server, wherein the local communication negotiation request is forwarded by the cloud server to the smart device and configured to instruct the smart device to allocate a Transmission Control Protocol (TCP) port and feed back a local communication negotiation response carrying a port number of the TCP port to the cloud server, and the local communication negotiation response is forwarded by the cloud server to the client, and wherein the local communication negotiation response further carries an identity token corresponding to the port number;
after receiving the local communication negotiation response from the cloud server, sending a first link request carrying the port number to the smart device without the cloud server for forwarding, and establishing a first TCP link with the smart device, wherein the first TCP link is a local communication link;
generating a first authentication request according to the identity token, and sending the first authentication request to the smart device through the first TCP link, wherein the first authentication request is used by the smart device to authenticate the client and feed back a first authentication result through the first TCP link;
in response to an indication by the first authentication result that the client is authenticated, saving the port number and the identity token of the smart device;
after the first TCP link is disconnected, in response to a second local communication operation with the smart device, sending a second link request carrying the port number to the smart device, and establishing a second TCP link with the smart device; and
in response to an indication from the smart device that an authentication of the client has failed, deleting the port number and the identity token, and generating and sending another local communication negotiation request to the smart device through the cloud server.

### Claim 9 (depends on 8)

The client according to claim 8, wherein the processor is further configured to perform:
in response to a detection that a user performs a preset data acquisition operation or a control operation for controlling the smart device on an operation interface of the client, determining that the first local communication operation is detected.

### Claim 10

A smart device, comprising: a memory storing a computer program; and a processor configured to execute the computer program to perform:
receiving a local communication negotiation request from a cloud server, wherein the local communication negotiation request is generated by a client after detecting a first local communication operation between the client and the smart device;
allocating a TCP port and generating and feeding back a local communication negotiation response carrying a port number of the TCP port to the cloud server, wherein the local communication negotiation response is forwarded by the cloud server to the client, and wherein the local communication negotiation response further carries an identity token corresponding to the port number; and
receiving a first link request carrying the port number from the client without the cloud server for forwarding, and establishing a first TCP link with the client, wherein the first link request is generated by the client after receiving the local communication negotiation response from the cloud server, and the first TCP link is a local communication link;
receiving a first authentication request sent by the client through the first TCP link;
in response to the first authentication request, authenticating the client according to the identity token, and feeding back a first authentication result to the client;
after the first TCP link is disconnected, in response to a second local communication operation with the smart device, receiving a second link request carrying the port number for a second TCP link to be established; and
in response to an indication from the smart device that an authentication of the client has failed, receiving another local communication negotiation request from the client through the cloud server, after the port number and the identity token is deleted by the client.

### Claim 11 (depends on 10)

The smart device according to claim 10, wherein the processor is further configured to perform:
generating a valid duration of a key, wherein the valid duration is a retention duration of the key after an authenticated TCP link is disconnected.

### Claim 12

A system for establishing a local communication link, comprising:
a cloud server, a client, and a smart device, wherein:
the client includes a first memory and a first processor coupled to the first memory, the first processor being configured to generate and send a local communication negotiation request to the cloud server in response to a first local communication operation between the client and the smart device;
the cloud server includes a second memory and a second processor coupled to the second memory, the second processor being configured to forward the local communication negotiation request to the smart device;
the smart device includes a third memory and a third processor coupled to the third memory, the third processor being configured to allocate a Transmission Control Protocol (TCP) port in response to receiving the local communication negotiation request, and feed back a local communication negotiation response carrying a port number of the TCP port to the cloud server;
the second processor is further configured to forward the local communication negotiation response to the client, and wherein the local communication negotiation response further carries an identity token corresponding to the port number;
the first processor is further configured to: after receiving the local communication negotiation response from the cloud server, send a first link request carrying the port number to the smart device without the cloud server for forwarding, and establish a first TCP link with the smart device, wherein the TCP link is a local communication link; and
the first processor is further configured to:
generate a first authentication request according to the identity token, and send the first authentication request to the smart device through the first TCP link, wherein the first authentication request is used by the smart device to authenticate the client and feed back a first authentication result through the first TCP link;
in response to an indication by the first authentication result that the client is authenticated, save the port number and the identity token of the smart device;
after the first TCP link is disconnected, in response to a second local communication operation with the smart device, send a second link request carrying the port number to the smart device, and establish a second TCP link with the smart device; and
in response to an indication from the smart device that an authentication of the client has failed, delete the port number and the identity token, and generate and send another local communication negotiation request to the smart device through the cloud server.
