Inter-process communication method and device and Linux equipment

An inter-process communication and process technology, which is applied in inter-program communication, multi-programming device, program control design, etc., can solve the problems affecting the operation efficiency of Linux devices, affecting the progress of the process, etc., so as to facilitate unified management and improve operation efficiency. , the effect of improving transmission efficiency

Pending Publication Date: 2021-01-05
XIAN NOVASTAR TECH
View PDF12 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If good communication cannot be achieved between processes, it will affect the

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
  • Inter-process communication method and device and Linux equipment
  • Inter-process communication method and device and Linux equipment
  • Inter-process communication method and device and Linux equipment

Examples

Experimental program
Comparison scheme
Effect test

Example

[0025][First Embodiment]

[0026]Such asfigure 1 As shown, the first embodiment of the present invention provides an inter-process communication method, which is suitable for Linux devices, which includes, for example, the following steps:

[0027]S11, the process ID is acquired after the target process is started;

[0028]S13, the target process creates a socket based on the acquired process ID, and binds the socket to the target configuration file;

[0029]S15. The target process parses the target configuration file to obtain the process ID of the session target process contained in the target configuration file, and creates a session structure corresponding to the process ID of the session target process, wherein the session The structure includes the process ID of the session target process, and a socket descriptor that associates the socket of the target process with the socket of the session target process; and

[0030]S17, data sending or data receiving, for example, when the target process...

Example

[0041][Second embodiment]

[0042]Such asimage 3 As shown, the inter-process communication device 30 provided by the second embodiment of the present invention is suitable for Linux devices and includes: a process ID acquisition module 31, a creation and binding module 33, an analysis and creation module 35, and a data transceiver module 37.

[0043]Wherein, the process ID acquisition module 31 is for example used for acquiring the process ID after the target process is started; the creation and binding module 33 is for example used for the target process to create a socket based on the acquired process ID, and make the socket The socket is bound to the target configuration file; the parsing and creation module 35 is used, for example, for the target process to parse the target configuration file to obtain the process ID of the session object process contained in the target configuration file, and to create the session The session structure corresponding to the process ID of the target pr...

Example

[0049][Third embodiment]

[0050]Such asFigure 5 As shown, the third embodiment of the present invention provides a Linux device 50, which includes a processor 51 and a memory 52; wherein the memory 52 stores instructions executed by the processor 51, and the instructions cause the processor 51 to perform operations such as The inter-process communication method described in the first embodiment.

[0051]The Linux device provided by the third embodiment of the present invention can also have the following technical effects similar to the foregoing first embodiment: 1) By assigning a process ID to a process and configuring a specific configuration file, it clarifies the communication object of each process, thereby Avoid the interference of other irrelevant processes; 2) Each process uses local sockets to communicate with each other, which is convenient for unified management of all related processes; 3) The data packet adopts the combination of data header and data area, and it is well wr...

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

An embodiment of the invention discloses an inter-process communication method and device and Linux equipment adopting the inter-process communication method. The multi-process communication method comprises the following steps: acquiring a process ID after a target process is started; creating a socket based on the obtained process ID, and binding the socket with a target configuration file; analyzing the target configuration file to obtain a process ID of a session object process contained in the target configuration file, and creating a session structure body corresponding to the process IDof the session object process; when data needs to be sent to the session object process, writing a target data packet into the socket descriptor in the session structure body; when monitoring that the session object process sends the data to the target process, reading the data packet from the socket descriptor in the session structure body. According to the method disclosed in the embodiment ofthe invention, efficient communication among a plurality of application programs in the embedded system can be realized.

Description

technical field [0001] The invention relates to the technical field of embedded devices, in particular to an inter-process communication method, an inter-process communication device and a Linux device. Background technique [0002] With the continuous advancement of technology and the open source of the Linux system, Linux devices have more and more applications. In a Linux device, different application processes have different divisions of labor, and data transmission is realized through communication between processes, that is, information is propagated or exchanged between processes. If good communication cannot be realized between the processes, the progress of the processes will be affected, and the operating efficiency of the Linux device will be affected. Contents of the invention [0003] In order to overcome the defects and deficiencies of the prior art, the embodiment of the present invention provides a Linux device and a communication method among multiple pro...

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
IPC IPC(8): G06F9/54
CPCG06F9/542
Inventor 李东青周晶晶李强国
Owner XIAN NOVASTAR TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products