Unlock instant, AI-driven research and patent intelligence for your innovation.

Data transmission method, electronic device and storage medium

A data transmission method and data technology, applied in the field of communication, can solve problems such as the small number of data interactions and the inability to well apply to scenarios with frequent data interactions

Inactive Publication Date: 2019-08-02
GUANGDONG OPPO MOBILE TELECOMM CORP LTD
View PDF6 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although the UDS communication scheme can transmit data in a timely manner, UDS is generally suitable for scenarios where the number of data interactions between different processes is small, but cannot be well suited for scenarios where data interactions between different processes are frequent

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data transmission method, electronic device and storage medium
  • Data transmission method, electronic device and storage medium
  • Data transmission method, electronic device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0034] This embodiment proposes a data transmission method, so that the UDS solution can be well applied to scenarios of frequent data interaction between different processes. Combine below figure 2 and image 3 The data transmission method of this embodiment is described, figure 2 is a schematic flow chart of the data transmission method of this embodiment, image 3 It is a schematic diagram of the UDS-based double-buffering data transmission framework of the present embodiment, and the data transmission method of the present embodiment includes:

[0035] Step 201, after the server process establishes a socket connection with the client process, the server process cyclically calls the sending function to send data to the client process;

[0036]In this embodiment, the server (Server) process and the client (Client) process are different processes on the same electronic device, and a UDS communication mechanism is used between them. Optionally, in this embodiment, the se...

no. 2 example

[0068] see Figure 4 , this embodiment provides a refined data transmission method, the method includes:

[0069] Step 401, after the server process establishes a socket connection with the client process, the server process cyclically calls the sending function to send data to the client process;

[0070] Step 402, the client process cyclically calls the receiving function to receive the data sent by the server process;

[0071] Step 403, the client process writes the received data into an unfilled sub-buffer in the target buffer, wherein the target buffer includes a first sub-buffer and a second sub-buffer;

[0072] Step 404, when the third-party process needs data, the third-party process reads data from the sub-buffer of the target buffer that stores data;

[0073] For the above steps 401-404, refer to steps 201-204 in the first embodiment, which will not be repeated here.

[0074]Step 405, if the third-party process and the client process concurrently read and write op...

no. 3 example

[0102] see Figure 5 , this embodiment provides an electronic device, the electronic device includes:

[0103] The server module 501 is used to call the sending function to send data to the client module in a loop after establishing a socket connection with the client module;

[0104] The client module 502 is used to call the receiving function to cyclically receive the data sent by the server module, and write the received data into the unfilled sub-buffers in the target buffer, wherein the target buffer includes the first sub-buffer and the second sub-buffer. Second sub-buffer;

[0105] The third-party process module 503 is used to read data from the sub-buffer of the target buffer where data is stored when data is needed, wherein, if the third-party process module and the client module concurrently read and write operations to the target buffer , then the third-party process module and the client module respectively monopolize a sub-buffer in the target buffer, and the th...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a data transmission method, an electronic device and a storage medium, and the method comprises the steps: enabling a server process to circularly send data to a client processafter the server process establishes socket connection with the client process; enabling the client process to circularly receive the data; after receiving the data, enabling the client process to write the data into sub-buffers which are not fully written in the target buffer; enabling a third-party process to read the data from a sub-buffer area in which the data is stored; enabling server-sideand client-side processes to circularly transmit and receive data, so that frequent data exchange is carried out between different processes; enabling writing operation of the client process to be independent from reading operation of the third-party process,due to configuration of double buffers and exclusive occupation of the third-party process and a client process on different sub-buffers during concurrent read-write operation so that the influence of the third-party process on the writing speed of the client process is greatly reduced, the adverse influence on receiving the data of the server process by the client process is reduced, and the UDS scheme can be favorably applied to a scene with frequent data interaction.

Description

technical field [0001] The present application relates to the technical field of communication, and in particular to a data transmission method, an electronic device and a storage medium. Background technique [0002] UDS (Unix Domain Socket, UNIX domain socket) is an IPC (Inter-Process Communication, inter-process communication) mechanism developed on the basis of the Socket framework. Compared with the network socket used for IPC communication, UDS does not need to go through the network protocol stack, does not need to be packaged and unpacked, etc., but only copies the application layer data from one process to another process, and the transmission is more reliable. Although the UDS communication scheme can transmit data in a timely manner, UDS is generally suitable for scenarios where the number of data interactions between different processes is small, but cannot be well suited for scenarios where data interactions between different processes are frequent. Contents o...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54
CPCG06F9/545G06F9/544
Inventor 方攀陈岩
Owner GUANGDONG OPPO MOBILE TELECOMM CORP LTD