US 11,750,541 B2
Method for transmitting live message, apparatus, electronic device and medium
Chi Zhang, Beijing (CN)
Assigned to BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD., Beijing (CN)
Filed by BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD., Beijing (CN)
Filed on Mar. 29, 2021, as Appl. No. 17/215,590.
Claims priority of application No. 202010463453.3 (CN), filed on May 27, 2020.
Prior Publication US 2021/0218693 A1, Jul. 15, 2021
Int. Cl. G06F 15/16 (2006.01); H04L 51/04 (2022.01); H04L 51/23 (2022.01); H04L 51/224 (2022.01)
CPC H04L 51/04 (2013.01) [H04L 51/23 (2022.05); H04L 51/224 (2022.05)] 14 Claims
OG exemplary drawing
 
1. A method for transmitting a live message, executed by a client end, and a persistent connection being established between the client end and a service end, the method comprising:
detecting periodically whether a second-type message sent by the service end through the persistent connection is received;
determining that the second-type message is not received for a period;
detecting a status of the persistent connection with the service end, in response to determining that the second-type message is not received for the period; and
in response to detecting that the persistent connection is in a disconnected status, re-establishing the persistent connection with the service end, and pulling a first-type message issued during disconnection of the persistent connection from the service end, wherein the pulling the first-type message during the disconnection of the persistent connection from the service end, comprises:
generating a request for pulling the first-type message, wherein the request for pulling the first-type message comprises a counted number of first-type messages that have been displayed at the client end; and
sending the request for pulling the first-type message to the service end, so that the service end returns the first-type message issued during the disconnection of the persistent connection, wherein the counted number of the first-type messages is compared with a first-type message identifier issued by a live stream room, and a first-type message corresponding to the first-type message identifier greater than the counted number and issued by the live stream room is determined as the first-type message returned by the service end.