WO2012059005A1 - 跨进程通信的方法和装置、计算机存储介质 - Google Patents

跨进程通信的方法和装置、计算机存储介质 Download PDF

Info

Publication number
WO2012059005A1
WO2012059005A1 PCT/CN2011/080904 CN2011080904W WO2012059005A1 WO 2012059005 A1 WO2012059005 A1 WO 2012059005A1 CN 2011080904 W CN2011080904 W CN 2011080904W WO 2012059005 A1 WO2012059005 A1 WO 2012059005A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication
cross
preset container
communication channel
model
Prior art date
Application number
PCT/CN2011/080904
Other languages
English (en)
French (fr)
Inventor
邓立波
陈祎
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to US13/882,651 priority Critical patent/US20130227587A1/en
Priority to EP11837531.0A priority patent/EP2637366B1/en
Priority to JP2013536988A priority patent/JP5793574B2/ja
Priority to KR1020137013508A priority patent/KR20130108613A/ko
Publication of WO2012059005A1 publication Critical patent/WO2012059005A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and apparatus for communicating across processes, and a computer storage medium.
  • Cross-process communication refers to the transmission or exchange of information between different processes. In programs such as QQ, it may be applied to Flash services or IE. Service, you need to start the cross-process communication between the QQ main process and the Flash process or the IE process. The way to handle this cross-process communication in the prior art is to establish the QQ main process and Flash. Share memory between processes and communicate by reading shared memory.
  • Embodiments of the present invention provide a method and apparatus for cross-process communication.
  • the technical solution is as follows:
  • a method of communicating across processes including:
  • a device for communicating across processes comprising:
  • a receiving module configured to receive a cross-process communication request initiated by the first process
  • a channel establishing module configured to create a communication channel with the first process according to the cross-process communication request
  • a loading module configured to load a service module corresponding to the cross-process communication request, and a preset container process loaded with the service module performs cross-process communication with the first process by using the communication channel.
  • the preset container process loaded with the service module performs cross-process communication with the first process through the communication channel.
  • FIG. 1 is a flowchart of a method for cross-process communication according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for cross-process communication according to an embodiment of the present invention
  • FIG. 3 is a structural diagram of an apparatus for cross-process communication according to an embodiment of the present invention.
  • FIG. 4 is a structural diagram of an apparatus for cross-process communication according to an embodiment of the present invention.
  • FIG. 5 is a structural diagram of an apparatus for cross-process communication according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for communicating across processes. Referring to FIG. 1, the method includes:
  • the communication channel between the first process and the first process is created according to the cross-process communication request, and includes:
  • the creating a communication channel with the first process according to the cross-process communication request includes:
  • the specified model in the preset container process is invoked to create a communication channel between the first process and the preset container process.
  • the preset container process includes: a system model, a process model, a session model, and a shared model.
  • the embodiment of the present invention only uses the process of initiating cross-process communication as the first process. Referring to FIG. 2, the method includes:
  • the first process initiates a cross-process communication request to the preset container process, where the cross-process communication request carries two GUIDs dynamically generated by the first process (Globally Unique Identifier, globally unique identifier), the two GUIDs
  • the first process identifier is used to identify a process that initiates cross-process communication
  • the second process identifier is used to identify a destination process that is a cross-process communication, that is, a preset container process.
  • the role is to identify the process and initialize the shared memory across the two ends of the process communication.
  • the second process ID GUID is used for communication memory from the first process to the preset container process direction.
  • the naming is shared by all the first processes.
  • the preset container process is allocated as soon as the memory is started, until the preset container process exits, and the communication memory from the preset container process to the first process belongs to the first The process is private.
  • the first process identifies the second process by a one-way channel from the first process to the preset container.
  • the GUID is passed to the preset container process.
  • the first process may be various main processes, such as QQ, IM. Etc, while the second process can be a preset container process.
  • the preset container is a container for cross-process communication according to an embodiment of the present invention, and the preset container is configured to establish a process from initiating communication to a request when receiving a request for cross-process communication. Describe the communication channel of the container process, and load the corresponding service module according to the type of the request.
  • the preset container process receives the request for cross-process communication, and extracts a model specified by the cross-process communication;
  • the preset container process includes a system model, a process model, a session model, or a shared model, and the model is any one or more of the above four models.
  • step 203 Determine whether the state of the preset container is ON. If yes, go to step 205. If no, go to step 204. ;
  • the channel between the first process and the preset container is initialized, so as to perform a subsequent channel establishment process.
  • the preset container process includes multiple models for serving different requests, but the preset container has a unified entry and exit.
  • the preset container provides the system with a preset container. The only entry only needs to receive the data of the portal, and perform preset operations according to the data of the portal, and output the processed data or operation from the unified data outlet.
  • This step 205 The method further includes: detecting whether there is a communication channel between the process that initiates the cross-process and the preset container, and if so, multiplexing the communication channel, and if not, creating the main process and the pre-processing according to the type of the request Set the communication channel between the containers.
  • This step can use the existing channel to communicate when the communication channel exists.
  • the service module When the service module is loaded, it can be loaded on the basis of the existing module, or the original service module can be uninstalled, and then the current request is loaded. Service module, this step omits the process of establishing a channel, further reducing the waste of code.
  • the container model is transparent and it does not care which container model is run.
  • the preset container is specifically an App
  • a container is a process that can load different service modules. The process can communicate with the main process of the application. Each container instance can load one or more service modules, and the service module can be dynamically loaded according to user needs.
  • Service module refers to the implementation of certain functions Dll, the dll exports the corresponding entry function as specified.
  • the preset container process loaded with the service module can perform cross-process communication with the first process through the communication channel.
  • the loading condition of the container needs to be checked, that is, the loading condition of the service module needs to be checked and judged.
  • the service module corresponding to the cross-process communication request is loaded, if not, the service module is loaded again, and the session is generated by the container ID and other identifiers, then send a response to the first process, and then execute the service module export function OnSessionCreate to notify the new session has been established.
  • the first process may call the waiting service process handle. If the service process ends, the first process closes the session, and then throws a session abnormal disconnect notification event, and the upper application may decide whether or not to Recreate the session. If the service module has A bug that crashes every time, causing the service process to crash and restart, resulting in a CPU usage of 100%. This affects the user experience. Therefore, the maximum number of restarts can be limited. The maximum number of restarts is preferably 3 Times. And the service module has a separate data receiving thread. After receiving the data, it is dispatched to the main thread where the service is located. Therefore, if the main thread is stuck, the data receiving thread can be known. If the main thread is found to be stuck, the first process is notified by a semaphore, and the first process can close the session, throw a session stuck event, and then the first process. Decide whether to recreate the session as needed.
  • the cross-process communication is specifically a shared memory communication or a Socket communication. If using Socket Communication, session streaming data communication and a bunch of multi-connection relationship management TCP The statement is more natural.
  • the shared memory communication is a data communication in which a circular queue has been completed based on the semaphore and the shared memory, and the specific content thereof is disclosed in the prior art, and details are not described herein.
  • the method provided by the present invention provides a communication container that initiates a communication process and a preset container process by providing a preset container that can load a plurality of different service modules, and establishes a communication channel for initiating a communication process and a preset container process.
  • the container process loads the service module, which simplifies the channel establishment process in the process of cross-process communication, saves code and improves communication efficiency.
  • an embodiment of the present invention provides a device for communicating across processes.
  • the device includes:
  • the receiving module 301 is configured to receive a cross-process communication request initiated by the first process
  • a channel establishing module 302 configured to create a communication channel with the first process according to the cross-process communication request
  • Loading module 303 And a service module corresponding to the cross-process communication request, where a preset container process loaded with the service module performs cross-process communication with the first process through the communication channel.
  • the load module 303 The method is further configured to check whether the service module is loaded, determine whether a service module corresponding to the cross-process communication request is loaded, and if not, load the service module again, and generate a session identifier by the container. Sending a response to the first process.
  • the device further includes:
  • Detection module 304 And detecting whether there is a communication channel with the first process, and if yes, multiplexing the communication channel, if not, triggering the channel establishment module to create and the first according to the cross-process communication request A communication channel between processes.
  • the channel establishment module 302 includes:
  • the extracting unit 302a is configured to extract a model specified by the cross-process communication from the cross-process communication request;
  • Opening unit 302b Used to invoke the specified model in the preset container process to create a communication channel between the first process and the preset container process;
  • the opening unit 302b It is also used to determine whether the state of the preset container is on, and if so, enter a step of calling a model specified in the preset container process, creating a communication channel between the first process and the preset container process, and if not, turning on Preset container.
  • the preset container process includes: a system model, a process model, a session model, and a shared model.
  • the cross-process communication is a shared memory communication or a Socket communication.
  • the device provided by the embodiment of the present invention is the same as the method embodiment, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • ROM read only memory
  • RAM random access memory
  • This invention also provides a computer storage medium storing computer executable instructions for performing the above-described method of displaying friend dynamics.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种跨进程通信的方法和装置,属于通讯技术领域。该方法包括:预设容器进程接收第一进程发起的跨进程通信请求;该预设容器进程根据该跨进程通信请求创建与该第一进程之间的通信通道;该预设容器进程加载与该跨进程通信请求相应的服务模块,使得加载了该服务模块的预设容器进程通过该通信通道与该第一进程进行跨进程通信。该装置包括:接收模块、通道建立模块和加载模块。本发明简化了跨进程通信过程中的通道建立过程,节约了代码,提高了通信效率。

Description

跨进程通信的方法和装置、计算机存储介质
技术领域
本发明涉及通讯技术领域,特别涉及一种跨进程通信的方法和装置、计算机存储介质。
背景技术
跨进程通信即是指在不同进程之间传播或交换信息,在 QQ 等程序中,可能会应用到 Flash 服务或 IE 服务,则需要启动 QQ 主进程与 Flash 进程或 IE 进程之间的跨进程通信,现有技术中处理这种跨进程通信的方式是采用建立 QQ 主进程和 Flash 进程之间的共享内存,并通过读取共享内存进行通信。
在对现有技术进行分析后,发明人发现现有技术至少具有如下缺点:
在现有技术中,每发起一个跨进程通信,都需创建该进程和目的进程之间的共享内存作为通信通道,每个目的进程需要分别加载服务模块,严重浪费内存的空间。
发明内容
本发明实施例提供了一种跨进程通信的方法和装置。所述技术方案如下:
一种跨进程通信的方法,包括:
接收第一进程发起的跨进程通信请求 ;
根据所述跨进程通信请求创建与所述第一进程之间的通信通道;
加载与所述跨进程通信请求相应的服务模块;
加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信。一种跨进程通信的装置,包括:
接收模块,用于接收第一进程发起的跨进程通信请求 ;
通道建立模块,用于根据所述跨进程通信请求创建与所述第一进程之间的通信通道;
加载模块,用于加载与所述跨进程通信请求相应的服务模块,加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信。
一种用于存储计算机可执行指令的计算机存储介质,所述计算机可执行指令用于控制计算机执行一种展示好友动态的方法,所述方法包括:
接收第一进程发起的跨进程通信请求 ;
根据所述跨进程通信请求创建与所述第一进程之间的通信通道;
加载与所述跨进程通信请求相应的服务模块;
加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信。
本发明实施例提供的技术方案的有益效果是:
通过提供一个可以加载多个不同服务模块的预设容器作为进程入口,并在建立跨进程通信通道时,只建立发起通信进程和预设容器进程的通信通道,再由预设容器进程加载服务模块,简化了跨进程通信过程中的通道建立过程,节约了代码,提高了通信效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图 1 是本发明实施例提供的一种跨进程通信的方法的流程图;
图 2 是本发明实施例提供的一种跨进程通信的方法的流程图;
图 3 是本发明实施例提供的一种跨进程通信的装置的结构图;
图 4 是本发明实施例提供的一种跨进程通信的装置的结构图;
图 5 是本发明实施例提供的一种跨进程通信的装置的结构图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
实施例 1
为了节约代码,本发明实施例提供了一种用于跨进程通信的方法,参见图 1 ,该方法包括:
101 :接收第一进程发起的跨进程通信请求 ;
102 :根据该跨进程通信请求创建与该第一进程之间的通信通道;
103 :加载与该跨进程通信请求相应的服务模块,使得加载了该服务模块的预设容器进程通过该通信通道与该第一进程进行跨进程通信。
其中,根据所述跨进程通信请求创建与所述第一进程之间的通信通道,之前包括:
检测与所述第一进程之间是否存在通信通道,如果是,则复用所述通信通道,如果否,则根据所述跨进程通信请求创建与所述第一进程之间的通信通道。
其中,根据所述跨进程通信请求创建与所述第一进程之间的通信通道,具体包括:
从所述跨进程通信请求中提取跨进程通信指定的模型;
调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道。
其中,所述预设容器进程包括:系统模型、进程模型、会话模型和共享模型。
通过提供一个可以加载多个不同服务模块的预设容器作为进程入口,并在建立跨进程通信通道时,只建立发起通信进程和预设容器进程的通信通道,再由预设容器进程加载服务模块,简化了跨进程通信过程中的通道建立过程,节约了代码,提高了通信效率。
实施例 2
为了节约代码,本发明实施例提供的一种用于跨进程通信的方法,本发明实施例仅以发起跨进程通信的进程为第一进程,参见图 2 ,该方法包括:
201 :第一进程向预设容器进程发起跨进程通信请求,该跨进程通信请求携带由第一进程动态生成的两个 GUID ( Globally Unique Identifier ,全球唯一标识符),该两个 GUID 包括第一进程标识和预设容器进程标识,该第一进程标识用于标识发起跨进程通信的进程,该第二进程标识用于标识跨进程通信的目的进程即预设容器进程;
具体地,该两个 GUID 的作用在于标识进程,并初始化跨进程通信两端的共享内存。从第一进程到预设容器进程方向的通信内存使用第二进程标识 GUID 命名,被所有的第一进程共享,预设容器进程一启动这块内存就已经分配好,直到预设容器进程退出才释放,而从预设容器进程到第一进程的通信内存属于该第一进程私有。为保证不冲突,第一进程则通过从第一进程到预设容器的单向通道把这个第二进程标识 GUID 传递给预设容器进程。
在本发明实施例中,第一进程可以为各种主进程,例如 QQ 、 IM 等,而第二进程可以为预设容器进程。需要说明的是,该预设容器为本发明实施例提出的一种用于跨进程通信的容器,该预设容器用于当接收到跨进程通信的请求时,建立从发起通信的进程到所述容器进程的通信通道,并根据所述请求的类型加载相应的服务模块。
202 :预设容器进程接收跨进程通信的请求,并提取跨进程通信指定的模型;
需要说明的是,该预设容器进程中包括系统模型、进程模型、会话模型或共享模型,而该模型即为上述四种模型中的任一种或几种。
203 :判断预设容器的状态是否为开启,如果是,则执行步骤 205 ,如果否,则执行步骤 204 ;
该判断的方法有多种,可以利用检测服务句柄的方式或服务进程的方式,本发明实施例不做具体限定。
204 :开启预设容器;
具体地,预设容器启动后,会对第一进程到预设容器间的通道进行初始化,以便进行后续的通道建立过程。
205 :调用预设容器进程中该指定的模型,创建第一进程与预设容器进程之间的通信通道;
本领域技术人员可以获知,预设容器进程包含多种模型,用以为不同的请求服务,但是该预设容器都有统一的入口和出口,为封装好的代码,该预设容器为系统提供了唯一的入口只需接收到入口的数据,并根据入口的数据进行预设的操作,从统一的数据出口输出处理后的数据或操作即可。
该步骤 205 之前还包括:检测发起跨进程通行的进程与所述预设容器之间是否存在通信通道,如果是,则复用所述通信通道,如果否,则根据所述请求的类型创建主进程与预设容器之间的通信通道。该步骤可以在存在通信通道时,利用已有的通道进行通信,在加载服务模块的时候,可在已有模块的基础上加载,也可以卸载原有服务模块后,再加载与当前请求相应的服务模块,该步骤省略了建立通道的过程,进一步的减少代码的浪费。
206 :根据跨进程通信请求,加载与该跨进程通信请求相应的服务模块。
对于服务模块来说,容器模型是透明的,它并不关心运行在哪种容器模型内。优选地,该预设容器具体为 App 容器,指可以加载不同服务模块的进程,该进程能和应用程序的主进程通信;每个容器实例可以加载一个或者多个服务模块,可以根据用户需要动态装载服务模块。服务模块是指实现某些特定功能的 dll ,该 dll 按规定导出相应的入口函数。
进一步地,经过上述步骤 201-206 ,该加载了服务模块的预设容器进程可以通过通信通道与第一进程进行跨进程通信等,此时需要对容器的加载情况进行检查,也即是需要对服务模块的加载情况进行检查,判断是否加载了与跨进程通信请求相应的服务模块,如果没有,则再次加载服务模块,并由该容器生成会话 ID 等标识,再向第一进程发送响应,然后,执行服务模块导出函数 OnSessionCreate 通知新会话已经建立。
需要说明的是,在服务模块运行期间,第一进程可调用等待服务进程句柄,如果服务进程结束,则第一进程关闭会话,然后抛出会话异常断开通知事件,上层应用可以视需要决定是否重新创建会话。如果服务模块有 bug ,每次都发生崩溃,就会使服务进程不断崩溃、重启,导致用户 CPU 占用率 100% ;影响用户体验,因此可以限定服务最大重启次数,该最大重启次数优选为 3 次。且服务模块有一个单独的数据接收线程,接收到数据后,派发到业务所在的主线程。因此如果主线程卡死,数据接收线程是可以获知的,如果发现主线程卡死,则用信号量通知第一进程,第一进程可关闭会话,抛出会话卡死事件,再由第一进程视需要决定是否重新创建会话。
在上述实施例中,该跨进程通信具体为共享内存通信或 Socket 通信。如果利用 Socket 通信,会话的流式数据通信和一堆多连接关系管理用 TCP 表述更为自然。其中,共享内存通信是基于信号量和共享内存实现一个循环队列已完成的数据通信,其具体内容为现有技术所公开,不再赘述。
本发明提供的方法,通过提供一个可以加载多个不同服务模块的预设容器作为进程入口,并在建立跨进程通信通道时,只建立发起通信进程和预设容器进程的通信通道,再由预设容器进程加载服务模块,简化了跨进程通信过程中的通道建立过程,节约了代码,提高了通信效率。
实施例 3
为了节约代码,本发明实施例提供了一种跨进程通信的装置,参见图 3 ,该装置包括:
接收模块 301 ,用于接收第一进程发起的跨进程通信请求 ;
通道建立模块 302 ,用于根据所述跨进程通信请求创建与所述第一进程之间的通信通道;
加载模块 303 ,用于加载与所述跨进程通信请求相应的服务模块,加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信。
在一个实施例中,加载模块 303 还用于对所述服务模块的加载情况进行检查,判断是否加载了与所述跨进程通信请求相应的服务模块,如果没有,则再次加载所述服务模块,并由所述容器生成会话标识,向所述第一进程发送响应。
参见图 4 ,所述装置还包括:
检测模块 304 ,用于检测与所述第一进程之间是否存在通信通道,如果是,则复用所述通信通道,如果否,则触发所述通道建立模块根据所述跨进程通信请求创建与所述第一进程之间的通信通道。
参见图 5 ,该通道建立模块 302 包括:
提取单元 302a ,用于从所述跨进程通信请求中提取跨进程通信指定的模型;
开启单元 302b ,用于调用所述预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道;
在一个实施例中,开启单元 302b 还用于判断预设容器的状态是否为开启,如果是,则进入调用预设容器进程中指定的模型,创建第一进程与预设容器进程之间的通信通道的步骤,如果否,则开启预设容器。
所述预设容器进程包括:系统模型、进程模型、会话模型和共享模型。
在一个实施例中,跨进程通信为共享内存通信或 Socket 通信。
本发明实施例提供的装置,与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
本发明实施例提供的上述技术方案的全部或部分可以通过程序指令相关的硬件来完成,所述程序可以存储在可读取的存储介质中,该存储介质包括: ROM 、 RAM 、磁碟或者光盘等各种可以存储程序代码的介质。
本 发明还提供了一种存储了计算机可执行指令的计算机存储介质,该计算机可执行指令用于执行上述展示好友动态的方法。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (21)

  1. 一种跨进程通信的方法,其特征在于,包括:
    接收第一进程发起的跨进程通信请求 ;
    根据所述跨进程通信请求创建与所述第一进程之间的通信通道;
    加载与所述跨进程通信请求相应的服务模块;
    加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信。
  2. 根据权利要求 1 所述的方法,其特征在于,所述加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信的步骤包括:
    对所述服务模块的加载情况进行检查,判断是否加载了与所述跨进程通信请求相应的服务模块,如果没有,则再次加载所述服务模块,并由所述容器生成会话标识,向所述第一进程发送响应。
  3. 根据权利要求 1 所述的方法,其特征在于,根据所述跨进程通信请求创建与所述第一进程之间的通信通道,之前包括:
    检测与所述第一进程之间是否存在通信通道,如果是,则复用所述通信通道,如果否,则根据所述跨进程通信请求创建与所述第一进程之间的通信通道。
  4. 根据权利要求 1 所述的方法,其特征在于,根据所述跨进程通信请求创建与所述第一进程之间的通信通道,具体包括:
    从所述跨进程通信请求中提取跨进程通信指定的模型;
    调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道。
  5. 根据权利要求 4 所述的方法,其特征在于,所述调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道的步骤之前还包括:
    判断预设容器的状态是否为开启,如果是,则进入所述调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道的步骤,如果否,则 开启所述预设容器。
  6. 根据权利要求 4 所述的方法,其特征在于,所述预设容器进程包括:系统模型、进程模型、会话模型和共享模型。
  7. 根据权利要求 1 所述的方法,其特征在于,所述跨进程通信为共享内存通信或 Socket 通信。
  8. 一种跨进程通信的装置,其特征在于,包括:
    接收模块,用于接收第一进程发起的跨进程通信请求 ;
    通道建立模块,用于根据所述跨进程通信请求创建与所述第一进程之间的通信通道;
    加载模块,用于加载与所述跨进程通信请求相应的服务模块,加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信。
  9. 权利要求 8 所述的装置,其特征在于,所述加载模块还用于对所述服务模块的加载情况进行检查,判断是否加载了与所述跨进程通信请求相应的服务模块,如果没有,则再次加载所述服务模块,并由所述容器生成会话标识,向所述第一进程发送响应。
  10. 根据权利要求 8 所述的装置,其特征在于,所述装置还包括:
    检测模块,用于检测与所述第一进程之间是否存在通信通道,如果是,则复用所述通信通道,如果否,则触发所述通道建立模块根据所述跨进程通信请求创建与所述第一进程之间的通信通道。
  11. 根据权利要求 8 所述的装置,其特征在于,所述通道建立模块包括:
    提取单元,用于从所述跨进程通信请求中提取跨进程通信指定的模型;
    开启单元,用于调用所述预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道。
  12. 根据权利要求 11 所述的装置,其特征在于,所述开启单元还用于判断预设容器的状态是否为开启,如果是,则进入所述调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道的步骤,如果否,则 开启所述预设容器。
  13. 根据权利要求 11 所述的装置,其特征在于,所述预设容器进程包括:系统模型、进程模型、会话模型和共享模型。
  14. 根据权利要求 8 所述的方法,其特征在于,所述跨进程通信为共享内存通信或 Socket 通信。
  15. 一种用于存储计算机可执行指令的计算机存储介质,所述计算机可执行指令用于控制计算机执行一种展示好友动态的方法,其特征在于,所述方法包括:
    接收第一进程发起的跨进程通信请求 ;
    根据所述跨进程通信请求创建与所述第一进程之间的通信通道;
    加载与所述跨进程通信请求相应的服务模块;
    加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信。
  16. 根据权利要求 15 所述的计算机存储介质,其特征在于,所述加载了所述服务模块的预设容器进程通过所述通信通道与所述第一进程进行跨进程通信的步骤包括:
    对所述服务模块的加载情况进行检查,判断是否加载了与所述跨进程通信请求相应的服务模块,如果没有,则再次加载所述服务模块,并由所述容器生成会话标识,向所述第一进程发送响应。
  17. 根据权利要求 15 所述的计算机存储介质,其特征在于,根据所述跨进程通信请求创建与所述第一进程之间的通信通道,之前包括:
    检测与所述第一进程之间是否存在通信通道,如果是,则复用所述通信通道,如果否,则根据所述跨进程通信请求创建与所述第一进程之间的通信通道。
  18. 根据权利要求 15 所述的计算机存储介质,其特征在于,根据所述跨进程通信请求创建与所述第一进程之间的通信通道,具体包括:
    从所述跨进程通信请求中提取跨进程通信指定的模型;
    调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道。
  19. 根据权利要求 18 所述的计算机存储介质,其特征在于,所述调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道的步骤之前还包括:
    判断预设容器的状态是否为开启,如果是,则进入所述调用预设容器进程中所述指定的模型,创建所述第一进程与所述预设容器进程之间的通信通道的步骤,如果否,则 开启所述预设容器。
  20. 根据权利要求 18 所述的计算机存储介质,其特征在于,所述预设容器进程包括:系统模型、进程模型、会话模型和共享模型。
  21. 根据权利要求 15 所述的计算机存储介质,其特征在于,所述跨进程通信为共享内存通信或 Socket 通信。
PCT/CN2011/080904 2010-05-11 2011-10-18 跨进程通信的方法和装置、计算机存储介质 WO2012059005A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US13/882,651 US20130227587A1 (en) 2010-05-11 2011-10-18 Method and apparatus for cross-process communication, and computer storage medium
EP11837531.0A EP2637366B1 (en) 2010-11-05 2011-10-18 Method and device for interprocess communication and computer storage medium
JP2013536988A JP5793574B2 (ja) 2010-11-05 2011-10-18 クロスプロセス通信のための方法および装置、ならびにコンピュータ記憶媒体
KR1020137013508A KR20130108613A (ko) 2010-11-05 2011-10-18 프로세스 간 통신을 위한 방법, 장치 및 컴퓨터 기록 매체

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010536671.1 2010-05-11
CN201010536671.1A CN102469035B (zh) 2010-11-05 2010-11-05 跨进程通信的方法和装置

Publications (1)

Publication Number Publication Date
WO2012059005A1 true WO2012059005A1 (zh) 2012-05-10

Family

ID=46024009

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/080904 WO2012059005A1 (zh) 2010-05-11 2011-10-18 跨进程通信的方法和装置、计算机存储介质

Country Status (6)

Country Link
US (1) US20130227587A1 (zh)
EP (1) EP2637366B1 (zh)
JP (1) JP5793574B2 (zh)
KR (1) KR20130108613A (zh)
CN (1) CN102469035B (zh)
WO (1) WO2012059005A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230153254A1 (en) * 2021-11-15 2023-05-18 Beijing Tusen Zhitu Technology Co., Ltd. Communication method, related computing system and storage medium

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577469B (zh) * 2012-08-03 2017-12-01 深圳市腾讯计算机系统有限公司 数据库连接复用方法和装置
US10810634B2 (en) * 2013-02-08 2020-10-20 The Nielsen Company (Us), Llc Methods and apparatus for efficient execution of modules
CN106681849B (zh) * 2015-11-10 2020-11-24 创新先进技术有限公司 数据处理方法及装置
US10305834B2 (en) * 2016-06-20 2019-05-28 Huawei Technologies Co., Ltd. System and method for messaging between operating system containers
CN107153583B (zh) * 2017-05-24 2020-11-17 太仓市昊博技术服务有限公司 一种跨进程交互处理方法、移动终端以及计算机可读存储介质
CN109426591B (zh) * 2017-09-04 2021-01-01 武汉斗鱼网络科技有限公司 守护windows单一程序的多个进程的方法及设备
CN107766162A (zh) * 2017-10-30 2018-03-06 北京明华联盟科技有限公司 一种操作指令的执行方法、装置及终端设备
CN108021459B (zh) * 2017-12-01 2022-03-04 麒麟合盛网络技术股份有限公司 跨进程发送打点日志的方法及装置
JP7094853B2 (ja) 2018-10-09 2022-07-04 Ykk Ap株式会社 建具、及び、建具の施工方法
JP7434039B2 (ja) 2020-04-08 2024-02-20 キヤノン株式会社 情報処理装置、及び情報処理装置におけるコンテナとプロセスとの間の通信を制御する制御方法
CN112835727B (zh) * 2021-01-29 2023-05-30 宝宝巴士股份有限公司 一种基于aop的跨进程通信的方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859327A (zh) * 2006-02-09 2006-11-08 华为技术有限公司 一种消息传递的方法、装置和系统
CN101448018A (zh) * 2008-12-26 2009-06-03 中兴通讯股份有限公司 进程间通信方法和装置
US20090254919A1 (en) * 2008-04-02 2009-10-08 Satya Jayaraman Sharing Operating System Sub-Processes Across Tasks
CN101572710A (zh) * 2009-06-03 2009-11-04 杭州华三通信技术有限公司 一种进程间通信方法和系统

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2149476A1 (en) * 1994-06-21 1995-12-22 James Michael Magee Capability engine method and apparatus for a microkernel data processing system
FI20001630A (fi) * 2000-06-30 2001-12-31 Nokia Mobile Phones Ltd Palvelun laadun määritys datavirroille
US7251816B2 (en) * 2002-08-08 2007-07-31 Hewlett-Packard Development Company, L.P. Method for increasing performance of select and poll applications without recompilation
CA2537280C (en) * 2003-08-29 2014-04-01 Rgb Networks, Inc. Advanced, self-balancing video multiplexer system
US7454758B2 (en) * 2004-02-05 2008-11-18 Aol Llc, A Delaware Limited Liability Company Inter-process communication on a computer
JP2005292981A (ja) * 2004-03-31 2005-10-20 Advanced Telecommunication Research Institute International メッセージ管理装置、データ処理システム及びそのためのコンピュータプログラム
US7594236B2 (en) * 2004-06-28 2009-09-22 Intel Corporation Thread to thread communication
US8020141B2 (en) * 2004-12-06 2011-09-13 Microsoft Corporation Operating-system process construction
JP2006164191A (ja) * 2004-12-10 2006-06-22 Matsushita Electric Ind Co Ltd プログラム取得実行装置、プログラム取得実行方法、プログラム取得実行プログラム記録媒体、およびプログラム取得実行プログラム
US7921216B2 (en) * 2005-02-01 2011-04-05 Microsoft Corporation System and method for building and using communication binding objects
US7882236B2 (en) * 2005-02-04 2011-02-01 Microsoft Corporation Communication channel model
US7549151B2 (en) * 2005-02-14 2009-06-16 Qnx Software Systems Fast and memory protected asynchronous message scheme in a multi-process and multi-thread environment
US7664067B2 (en) * 2005-12-15 2010-02-16 Microsoft Corporation Preserving socket connections over a wireless network
JP4577422B2 (ja) * 2008-07-14 2010-11-10 ソニー株式会社 情報処理システム及び情報処理方法、ロボットの制御システム及び制御方法、並びコンピュータ・プログラム
US20100162275A1 (en) * 2008-12-19 2010-06-24 Microsoft Corporation Way Controlling applications through inter-process communication

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859327A (zh) * 2006-02-09 2006-11-08 华为技术有限公司 一种消息传递的方法、装置和系统
US20090254919A1 (en) * 2008-04-02 2009-10-08 Satya Jayaraman Sharing Operating System Sub-Processes Across Tasks
CN101448018A (zh) * 2008-12-26 2009-06-03 中兴通讯股份有限公司 进程间通信方法和装置
CN101572710A (zh) * 2009-06-03 2009-11-04 杭州华三通信技术有限公司 一种进程间通信方法和系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230153254A1 (en) * 2021-11-15 2023-05-18 Beijing Tusen Zhitu Technology Co., Ltd. Communication method, related computing system and storage medium

Also Published As

Publication number Publication date
EP2637366B1 (en) 2021-01-06
KR20130108613A (ko) 2013-10-04
JP5793574B2 (ja) 2015-10-14
JP2014503867A (ja) 2014-02-13
EP2637366A4 (en) 2014-05-07
US20130227587A1 (en) 2013-08-29
CN102469035A (zh) 2012-05-23
CN102469035B (zh) 2016-01-20
EP2637366A1 (en) 2013-09-11

Similar Documents

Publication Publication Date Title
WO2012059005A1 (zh) 跨进程通信的方法和装置、计算机存储介质
US8693343B2 (en) Relay apparatus, virtual machine system, and relay method
US7516336B2 (en) System and method for power reduction by sequestering at least one device or partition in a platform from operating system access
WO2012043962A1 (ko) 단말기에 따른 적응적 화면 가상화 방법 및 시스템
WO2017101252A1 (zh) 基于 Docker 的容器登录方法、服务器和系统
CN108975118A (zh) 电梯监控方法、装置、终端、设备、监控平台及系统
WO2020098075A1 (zh) 金融数据处理方法、装置、设备和存储介质
EP3567483B1 (en) Method for processing service data, and network device
WO2018058835A1 (zh) 一种通话模式监控方法、系统及通信终端
WO2019218478A1 (zh) 一种通话服务的响应方法及设备
JP6195465B2 (ja) 同期サーバ側スクリプティングを用いた遠隔カードコンテンツ管理
CN101316203A (zh) 嵌入式ip终端网络连接状态监测方法
CN113778714B (zh) 一种Linux兼容Android的共享剪切板方法及装置
CN110795156B (zh) 移动存储器加载方法、瘦客户端、存储介质及装置
CN103701788B (zh) 一种跨平台软总线的通信装置及软总线
WO2023159956A1 (zh) 一种裸金属服务器检查及部署方法、装置、设备、介质
WO2017082633A1 (en) Method and apparatus for maintaining continuity of on-going session over wired or wireless interface
CN113760490B (zh) 对微服务处理的方法、装置、电子设备及存储介质
EP3404998A1 (en) Communication method and apparatus, electronic device, and program product
CN109472131A (zh) 一种基于bmc带安全认证的胶囊式uefi固件远程管控方法
WO2019210614A1 (zh) 实现页面功能复用的方法及装置
CN117407054A (zh) 中断处理方法、电子设备和存储介质
WO2012126212A1 (zh) 射频识别设备接口层的通信装置及方法
CN107835327B (zh) 信令网关的协议栈队列的维护方法、装置及系统
CN112162626A (zh) 一种应用程序处理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11837531

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13882651

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2013536988

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20137013508

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2011837531

Country of ref document: EP