Client Persistent Connection Status Detection and Reconnection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In live streaming scenarios, persistent connection disconnections lead to missing or inaccurate message transmission, affecting user experience due to the inability to regularly transmit messages during disconnections.

Innovation Solution

The client end periodically detects the status of the persistent connection with the service end, re-establishes the connection, and pulls first-type messages issued during disconnection to ensure timely and accurate message delivery, reducing pressure on the service end by using a second-type message as a heartbeat detection request.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the client end periodically detects the status of the persistent connection and re-establishes it when disconnected, then message transmission reliability is improved, but device complexity increases

Engineering Contradiction:
Improvemessage transmission reliabilityVSAvoidconnection management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The client end performs preliminary detection of the persistent connection status at regular intervals before actual message transmission is needed. This proactive approach allows the system to identify disconnections early and re-establish connections before they impact message delivery, thereby improving reliability without requiring complex reactive mechanisms

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements a feedback mechanism where the client end continuously monitors the persistent connection status and uses this information to trigger re-establishment actions. The detection module provides feedback about connection health, which the control logic uses to decide when to re-connect, creating a self-regulating system that improves message transmission reliability through automated response to connection changes

Inventive Principle:
Principle #23Feedback

2Reliability

If the client end pulls first-type messages issued during disconnection, then message accuracy is improved, but loss of time increases

Engineering Contradiction:
Improvemessage accuracyVSAvoidmessage retrieval time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The service end retains first-type messages in a buffer during connection disconnection periods, performing preliminary storage of these messages before the client end needs them. When the connection is re-established, the client end can quickly retrieve the buffered messages without experiencing the full delay of both disconnection and message generation, thereby improving message accuracy while minimizing time loss

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The service end acts as an intermediary by maintaining a message buffer that stores first-type messages during connection disconnections. This intermediary buffer decouples the message generation process at the service end from the message retrieval process at the client end, allowing messages to be preserved accurately without requiring the client end to experience the full duration of the disconnection delay

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If the service end sends heartbeat detection requests, then connection status detection is improved, but use of energy increases

Engineering Contradiction:
Improveconnection status detection accuracyVSAvoidenergy consumption for detection
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The system merges the heartbeat detection function with existing persistent connection maintenance mechanisms. Instead of implementing a separate heartbeat detection system that would consume additional energy, the solution combines connection status monitoring with the regular operation of the persistent connection protocol, thereby improving detection accuracy without proportionally increasing energy consumption

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The persistent connection mechanism serves multiple functions simultaneously: it maintains the communication channel for message transmission and also performs connection status detection through its inherent keep-alive or acknowledgment protocols. This multi-functionality eliminates the need for dedicated heartbeat detection requests, reducing energy consumption while maintaining accurate connection status monitoring

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11750541B2Method for transmitting live message, apparatus, electronic device and medium
Publication Date: 2023.09.05 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US11750541B2 patent drawing
  • US11750541B2 patent drawing
  • US11750541B2 patent drawing

AI summary

A method, apparatus, electronic device and medium for transmitting a live message are provided. An embodiment of the method executed by a client end may include: detecting periodically a status of a persistent connection with the service end; 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.