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

Method and device for inter-process communication

A technology of inter-process communication and process, applied in the field of communication control, can solve the problems of inconvenient multiplexing control, inability to perform multiplexing, and no access counting

Inactive Publication Date: 2017-12-22
COMBA TELECOM SYST CHINA LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] 1) Since the IPC structure works within the system and there is no access count, it is inconvenient to delete the communication message within the system;
[0004] 2) Since the IPC structure is not known by the file system by name, that is, it does not use file description operations, so multiplexing cannot be performed, which is inconvenient for multiplexing control

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
  • Method and device for inter-process communication
  • Method and device for inter-process communication
  • Method and device for inter-process communication

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0074] figure 2 A flow chart of a method for inter-process communication is provided for an embodiment of the present invention, such as figure 2 As shown, the following steps may be included:

[0075] 201: The first IPC module receives data sent by the first process.

[0076] Preferably, the first IPC module can receive the data sent by the first process through variable transmission.

[0077] 202: The first IPC module packs the data to form a data packet, the data packet includes a header and the data, and the header includes a source address, a port number of a source process, a destination address, and a port number of a destination process .

[0078] Wherein, the source address is the network address of the device where the process of sending data is located. In the embodiment of the present invention, it is the network address of the device where the first process is located. For example, the network address of the device where the first process is located is 192.16...

Embodiment 2

[0089] Figure 4 A flow chart of a method for inter-process communication provided by an embodiment of the present invention, such as Figure 4 As shown, the following steps may be included:

[0090] 401: The operating system receives a data packet sent by the first IPC module; wherein, the data packet includes a header and data, and the header includes a source address, a port number of a source process, a destination address, and a port number of a destination process, wherein the The destination address is the network loopback address.

[0091]402: The operating system queries the correspondence between the preset port number and the network socket according to the port number of the destination process in the data packet, and acquires the network socket corresponding to the port number of the destination process.

[0092] Wherein, the network socket is an integer type identifier identifying the IPC module, which is used to distinguish different IPC modules, and the netwo...

Embodiment 3

[0104] Figure 5 A flow chart of a method for inter-process communication provided by an embodiment of the present invention, such as Figure 5 As shown, the following steps may be included:

[0105] 501: The second IPC module receives a data packet sent by the operating system, wherein the data packet includes a header and the data, and the header includes a source address, a port number of a source process, a destination address, and a port number of a destination process, wherein , the destination address is a network loopback address.

[0106] Preferably, before this step, the method also includes:

[0107] The second IPC module receives the listening instruction sent by the second process, and starts listening to data packets sent by other IPC modules through the operating system.

[0108] 502: The second IPC module compares the port number of the destination process in the packet header with the port number of the second process according to the preset correspondence ...

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 embodiment of the invention provides an interprocess communication method and equipment, and relates to the field of communication control. Network socket loopback data transmission is used for conducting interprocess communication, communication messages can not work within a system range, and multiplexing or controlling can be facilitated. Meanwhile, a destination address is set to be a network loopback address, data forwarding is achieved on a protocol layer, and the speed of interprocess communication is improved. The interprocess communication method comprises the steps that a first IPC module receives data sent by a first process; the data is packaged to form a data package, the data package comprises a package head and data, and the package head comprises a source address, a port number of a source process, a network loopback address and a port number of a destination process; the data package is sent to an operation system, and the operation system is made to send the data package to a second process according to the destination address and the port number of the destination process; meanwhile, the second process can also sends data to the first process by the interprocess communication method.

Description

technical field [0001] The invention relates to the field of communication control, in particular to a method and device for inter-process communication. Background technique [0002] The user-mode process under the Linux system is the basic unit of dynamic execution of the operating system, and it is an execution process of the program. On the same platform (that is, the same host), each process runs within its own address range. Different processes are separated from each other, just like people in different cities, in order to work together, they need to communicate in some way. In order to solve this problem, the Linux operating system provides some commonly used inter-process communication (Inter-Process Communication, IPC for short) methods, such as pipes, named pipes, signals, message queues, shared memory and semaphores, etc. The communication method has the following two disadvantages: [0003] 1) Since the IPC structure works within the system and there is no acc...

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 Patents(China)
IPC IPC(8): G06F9/54
Inventor 凌兴锋黄健安
Owner COMBA TELECOM SYST CHINA LTD
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