Message Queue Segmentation for Data Packet Synchronization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current servers face challenges in processing data packets in the correct order, leading to errors during game operations between clients and servers.

Innovation Solution

The implementation of a data packet synchronization method where each logical thread is assigned a corresponding message queue, allowing data packets to be processed and written into the correct queue based on thread identifiers and frame identifiers, ensuring correct order and reducing memory occupancy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If multiple logical threads share a single message queue, then device complexity is reduced, but write conflicts occur and data processing reliability deteriorates

Engineering Contradiction:
Improvemessage queue management complexityVSAvoiddata packet processing reliability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent divides the single message queue into multiple logical thread-specific queues, where each logical thread has its own dedicated message queue. This segmentation eliminates write conflicts between threads while maintaining manageable complexity through structured organization. The server allocates specific message queues to specific logical threads, ensuring that data packets are processed in the correct order without interference from other threads.

Inventive Principle:
Principle #1Segmentation

2Reliability

If each logical thread is assigned a dedicated message queue, then data processing reliability is improved, but server memory usage increases

Engineering Contradiction:
Improvedata packet processing reliabilityVSAvoidserver memory occupancy
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent implements a pooling mechanism where message queues are created once and then shared across multiple logical threads through reference sharing. Instead of creating separate queue instances for each thread, the same message queue object can be referenced by multiple threads, reducing overall memory consumption while still maintaining the benefit of dedicated queue assignment for each logical thread.

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

3Quantity of substance

If data packets are processed without thread-specific queues, then memory usage is reduced, but data packet ordering errors increase

Engineering Contradiction:
Improveserver memory occupancyVSAvoiddata packet processing order accuracy
Core Design Contradiction:
Quantity of substanceVSManufacturing precision

Solution Approach 1:

The patent performs preliminary assignment of message queues to logical threads before data packet processing begins. This pre-allocation ensures that each logical thread knows its dedicated queue in advance, preventing ordering errors from the outset. The server establishes the thread-to-queue mapping relationship beforehand, so that when data packets arrive, they can be immediately routed to the correct queue without confusion or ordering issues.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12201899B2Data packet synchronization method and apparatus, device, and storage medium
Publication Date: 2025.01.21 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12201899B2 patent drawing
  • US12201899B2 patent drawing
  • US12201899B2 patent drawing

AI summary

Disclosed in this application are a data packet synchronization method and apparatus, a device, and a storage medium, relating to the field of data communication. The method includes receiving a data packet transmitted by a client, the data packet including a thread identifier and a frame identifier, the thread identifier being added by the client according to a logical operation type required by the data packet, the frame identifier being used for identifying a picture frame triggering the data packet; writing, after the data packet is transmitted to a logical thread corresponding to the thread identifier for a logical operation, a data packet obtained after the operation into a message queue corresponding to the logical thread; and reading the data packet obtained after the operation from the message queue according to the frame identifier, and synchronizing the data packet obtained after the operation to an associated client.