Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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 progress of the process and affect the operating efficiency of the Linux device

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

no. 1 example

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

[0027] S11, obtaining a process ID after the target process starts;

[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 object process contained in the target configuration file, and creates a session structure corresponding to the process ID of the session object process, wherein the session The structure includes the process ID of the session object process, and a socket descriptor associating the socket of the target process with the socket of the session object process; and

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

no. 2 example

[0042] Such as image 3 As shown, an 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 sending and receiving module 37 .

[0043] Wherein, the process ID acquisition module 31 is for example used to obtain the process ID after the target process is started; the creation and binding module 33 is used for the target process to create a socket based on the obtained 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 process ID associated with the session A session structure corresponding to the process ID of t...

no. 3 example

[0050] Such as Figure 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 may also have the following technical effects similar to the aforementioned first embodiment: 1) by assigning a process ID to a process and configuring a specific configuration file, it defines 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 associated processes; 3) The data packet adopts the combination of data header and data area, which is well written ...

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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products