US 12,192,313 B2
Method, device, system, and storage medium for establishing local communication link
Guolin Li, Shenzhen (CN); Wei Zeng, Shenzhen (CN); and Lei Luo, Shenzhen (CN)
Assigned to SHENZHEN CHENBEI TECHNOLOGY CO., LTD., Shenzhen (CN)
Filed by SHENZHEN CHENBEI TECHNOLOGY CO., LTD., Shenzhen (CN)
Filed on Nov. 4, 2021, as Appl. No. 17/519,296.
Claims priority of application No. 202011297817.1 (CN), filed on Nov. 17, 2020.
Prior Publication US 2022/0159103 A1, May 19, 2022
Int. Cl. H04L 69/16 (2022.01); H04L 9/40 (2022.01); H04L 12/28 (2006.01)
CPC H04L 69/161 (2013.01) [H04L 12/2818 (2013.01); H04L 63/0435 (2013.01); H04L 63/0807 (2013.01); H04L 2012/285 (2013.01)] 12 Claims
OG exemplary drawing
 
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.