Data transmission method and device based on cross-thread communication, electronic equipment and storage medium

By dynamically switching cross-thread communication methods and utilizing batch-processed structured cloning, serialization, and circular queue transmission, the problems of high copying overhead, high memory consumption, and long synchronization delay in multi-threaded communication on the Web side are solved, achieving efficient data transmission.

CN122394741APending Publication Date: 2026-07-14SHENZHEN LEXIN SOFTWARE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN LEXIN SOFTWARE TECH CO LTD
Filing Date
2026-04-17
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies suffer from high copying overhead, high memory consumption, long synchronization latency, and lack of flow control and adaptation strategies in multi-threaded communication on the web in scenarios with large data volumes, resulting in wasted performance.

Method used

By calculating the amount of message data transmitted across threads, different communication methods are dynamically switched according to preset thresholds and message data volume. Batch processing structured cloning, serialization into binary files, and circular queue transmission are adopted, combined with a lock-free synchronization mechanism to achieve efficient transmission of cross-thread communication.

Benefits of technology

It reduces CPU consumption, memory usage, and latency in cross-thread communication, and improves data transmission efficiency, especially achieving parallel read and write operations when transmitting large volumes of messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122394741A_ABST
    Figure CN122394741A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data transmission, and discloses a data transmission method based on cross-thread communication, which comprises the following steps: obtaining one or more pieces of to-be-transmitted messages generated by a first thread and calculating the message data volume required to be transmitted per second by the first thread; when the message data volume is less than a first threshold, performing batch processing structured cloning on the to-be-transmitted messages and then transmitting the to-be-transmitted messages to a second thread; when the message data volume is greater than or equal to the first threshold and less than a second threshold, serializing the to-be-transmitted messages into a binary file, constructing a transferable data object of the binary file and transmitting the transferable data object to the second thread; and when the message data volume is greater than or equal to the second threshold, sequentially writing the to-be-transmitted messages into a preset ring buffer and notifying the second thread to read the stored messages from the ring buffer according to the message writing sequence. The data transmission method can dynamically switch different transmission modes according to the message data volume, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art