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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


