IP Library Granted Patent US 10,152,277
Granted Patent B2
US 10,152,277 · App. 15/281,268 · Granted Dec 11, 2018

Data transmission method and system

Inventors: Liming Xia (Haidian District Beijing, CN); Jingchao Feng (Haidian District Beijing, CN); Quan Wang (Haidian District Beijing, CN); Ning Qu (Haidian District Beijing, CN); Zhuo Chen (Haidian District Beijing, CN)
Assignee: Beijing Baidu Netcom Science and Technology Co., Ltd.
G06F3/0659G06F3/0604G06F3/064G06F3/067H04L47/10G05D1/0246
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,152,277
App. No.
15/281,268
Granted
Dec 11, 2018
Kind
B2
Abstract

The present application discloses a data transmission method and system. A specific embodiment of the method includes: receiving a data transmission-instruction by a data sender, wherein the data transmission-instruction includes a thematic name indicative of a type of to-be-transmitted data required by a data receiver; creating a shared memory segment corresponding to the thematic name. It makes possible for the data sender and the data receiver to run in a separate memory space. When data is needed to be transmitted, a corresponding shared memory segment may be created for data transmission in accordance with any transmitting requirement, and the shared memory segment may be released when the transmission is done or appears abnormal. On one hand, it reduces the redundant operations of the data transmission system during data transmission, and improves the data transmission performance; on the other hand, the data transmitting procedure between the data sender and the data receiver, and other operations executed by the data sender or the data receiver are independent of each other, which improves the stability of the data transmission system.

Claims (40)

1. A data transmission method, comprising:

receiving, by a computer processor, a subscription request sent by a data receiver, wherein the subscription request includes a thematic name;

storing the thematic name and an identity of the data receiver correspondingly;

establishing a corresponding relationship between a data sender and the data receiver;

sending a data transmission-instruction to the data sender;

receiving, by the data sender, the data transmission-instruction, the received instruction includes the thematic name indicative of a type of to-be-transmitted data required by the data receiver; and

creating a shared memory segment corresponding to the thematic name so that the data sender and the data receiver transmit the to-be-transmitted data through the shared memory segment.

2. The method according to claim 1 , wherein the data sender is of a data sending process and the data receiver is of a data receiving process, and the method further comprises:

receiving, by the computer processor, an issuance request sent by the data sending process, wherein the issuance request includes the thematic name; and

storing the thematic name and an identity of the data sending process correspondingly.

3. The method according to claim 1 , wherein, after the shared memory segment corresponding to the thematic name is created, the method further comprises:

calling, by the data sending process, a preset operation interface of the shared memory segment to write the to-be-transmitted data into the shared memory segment; and

calling, by the data receiving process, the preset operation interface of the shared memory segment to read the to-be-transmitted data.

4. The method according to claim 3 , wherein, the method farther comprises:

storing, in a storage space corresponding to the shared memory segment, the attribute information including the thematic name, and an index of a shared memory block in the shared memory segment.

5. The method according to claim 4 , wherein, after the shared memory segment corresponding to the thematic name is created, the method, farther comprises:

memory-mapping, by the data sending process and the data receiving process, the shared memory segment to a corresponding storage space.

6. The method according to claim 5 , wherein, the method further comprises:

detecting if a transmission of the data transmitted by the data sending process and data receiving process is done or appears abnormal;

if yes, sending a releasing instruction to the data sending process and the data receiving process, so that the data sending process and data receiving process release the shared memory segment.

7. A data transmission system, wherein, the system comprises a computer processor, a data sender and a data receiver,

wherein the computer processor receives a subscription request sent by the data receiver, wherein the subscription request includes a thematic name, stores the thematic name and an identity of the data receiver correspondingly, establishes a corresponding relationship between the data sender and the data receiver, and sends a data transmission-instruction to the data sender; the data sender receives the data transmission-instruction including the thematic name indicative of a type of to-be-transmitted data required by the data receiver, and creates a shared memory segment corresponding to the thematic name so that the data sender and the data receiver transmit the to-be-transmitted data through the shared memory segment.

8. The system according to claim 7 , wherein, the data sender is of a data sending process and the data receiver is of a data receiving process,

wherein the computer processor receives an issuance request sent by the data sending process, wherein the issuance request includes the thematic name; and stores the thematic name and an identity of the data sending process correspondingly.

9. The system according to claim 7 , wherein, the data sending process is further used to call a presetted operation interface of the shared memory segment to write the to-be-transmitted data into the shared memory segment; and

the data receiving process is further used to call a presetted operation interface of the shared memory segment to read the to-be-transmitted data.

10. The system according to claim 9 , wherein, the system further comprises:

a storage unit storing, in a storage space corresponding to the shared memory segment, attribute information including the thematic name and an index of a shared memory block in the shared memory segment.

11. The system according to claim 10 , wherein, the data sending process is further used to map the shared memory segment corresponding to the thematic name in a storage space corresponding to the data sending process after the shared memory segment is created;

the data receiving process is further used to map the shared memory segment corresponding to the thematic name in a storage space corresponding to the data receiving process after the shared memory segment is created.

12. The system according to claim 11 , wherein, the system further comprises:

a detecting unit detects if a transmission of the to-be-transmitted data by the data sending process and the data receiving process is done or appears abnormal;

if so, the detecting unit sends a releasing instruction to the data sending process and the data receiving process so that the data sending process and the data receiving process release the shared memory segment.

13. A non-transitory storage medium storing one or more programs, the one or more programs when executed by an apparatus, causing the apparatus to perform a data transmission method, comprising:

receiving, by a computer processor, a subscription request sent by a data receiver, wherein the subscription request includes a thematic name;

storing the thematic name and an identity of the data receiver correspondingly;

establishing a corresponding relationship between a data sender and the data receiver;

sending a data transmission-instruction to the data sender;

receiving, by the data sender, the data transmission-instruction, the received instruction includes the thematic name indicative of a type of to-be-transmitted data required by the data receiver; and

creating a shared memory segment corresponding to the thematic name so that the data sender and the data receiver transmit the to-be-transmitted data through the shared memory segment.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2017
From: XIA, LIMING; FENG, JINGCHAO; WANG, QUAN; QU, NING; CHEN, ZHUO
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 043372/0160 →
Priority Claims (1)
CN 2016 1 0473409 · Jun 24, 2016 · national
Continuity (1)
Related Publication 20170371591A1 · Dec 28, 2017