[go: up one dir, main page]

CN109933444A - An instant communication method between boarding applications - Google Patents

An instant communication method between boarding applications Download PDF

Info

Publication number
CN109933444A
CN109933444A CN201910172844.7A CN201910172844A CN109933444A CN 109933444 A CN109933444 A CN 109933444A CN 201910172844 A CN201910172844 A CN 201910172844A CN 109933444 A CN109933444 A CN 109933444A
Authority
CN
China
Prior art keywords
application
host application
running
instant messaging
host
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201910172844.7A
Other languages
Chinese (zh)
Inventor
崔英林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lianshang Network Technology Co Ltd
Original Assignee
Shanghai Lianshang Network Technology Co Ltd
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 Shanghai Lianshang Network Technology Co Ltd filed Critical Shanghai Lianshang Network Technology Co Ltd
Priority to CN201910172844.7A priority Critical patent/CN109933444A/en
Publication of CN109933444A publication Critical patent/CN109933444A/en
Priority to PCT/CN2020/077897 priority patent/WO2020177731A1/en
Pending legal-status Critical Current

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)

Abstract

This application provides the instant communication methods between a kind of boarding application, and the call instruction sent the method includes receiving the first boarding application operated on default running stack by instant messaging api interface, the call instruction includes the second boarding application identification information;According to the call instruction, the second boarding application is run on auxiliary running stack;The communication message between the first boarding application and the second boarding application is forwarded by instant messaging api interface.It can be realized the message transmission between the boarding application on the running stack for operating in host's application, realize real-time interaction.

Description

一种寄宿应用间的即时通讯方法An instant communication method between boarding applications

【技术领域】【Technical field】

本申请涉及互联网应用领域,尤其涉及一种寄宿应用间的即时通讯推荐方法。The present application relates to the field of Internet applications, in particular to an instant messaging recommendation method between boarding applications.

【背景技术】【Background technique】

小程序等寄宿应用是一种新的开放能力,开发者可以快速地开发一个小程序。小程序可以在微信、百度App等宿主应用内被便捷地获取和传播,同时具有出色的使用体验。小程序开发者可以在小程序内提供便捷、丰富的服务,如预定、商品购买、游戏等。因此,得到了越来越广泛的应用。Homestay applications such as Mini Programs are a new open capability, and developers can quickly develop a Mini Program. Mini Programs can be easily acquired and disseminated in host applications such as WeChat and Baidu App, and at the same time have an excellent user experience. Mini Program developers can provide convenient and rich services within Mini Programs, such as reservations, commodity purchases, and games. Therefore, it has been more and more widely used.

但是,目前的宿主应用中,同时只能运行一个寄宿应用,无法实现不同寄宿应用间的消息传递,实现即时交互。However, in the current host application, only one host application can run at the same time, and it is impossible to realize message transfer between different host applications and realize instant interaction.

【发明内容】[Content of the invention]

本申请的多个方面提供一种寄宿应用间的即时通讯方法,用于解决寄宿应用之间无法实现即时交互的问题。Various aspects of the present application provide an instant communication method between boarding applications, which is used to solve the problem that instant interaction cannot be realized between boarding applications.

本申请的一方面,提供一种寄宿应用间的即时通讯方法,应用于宿主应用,所述宿主应用包括多个用于运行寄宿应用的运行栈;包括通过即时通讯API接口接收运行在默认运行栈上的第一寄宿应用发送的调用指令,所述调用指令包括第二寄宿应用标识信息;根据所述调用指令,在辅助运行栈上运行所述第二寄宿应用;通过即时通讯API接口转发所述第一寄宿应用与所述第二寄宿应用间的通讯消息。In one aspect of the present application, an instant messaging method between host applications is provided, which is applied to a host application, where the host application includes a plurality of running stacks for running the host application; the method includes receiving an instant messaging API interface running on a default running stack. The calling instruction sent by the first boarding application on the server, the calling instruction includes the identification information of the second boarding application; according to the calling instruction, the second boarding application is run on the auxiliary running stack; the instant messaging API interface is used to forward the A communication message between the first hosting application and the second hosting application.

本申请的另一方面,提供一种寄宿应用间的即时通讯方法,应用于第一寄宿应用,所述第一寄宿应用运行于宿主应用的默认运行栈上;包括通过即时通讯API接口发送调用指令,所述调用指令包括第二寄宿应用标识信息;以便所述宿主应用根据所述调用指令在辅助运行栈上运行所述第二寄宿应用;其中,所述宿主应用包括多个用于运行寄宿应用的运行栈;通过即时通讯API接口接收由所述宿主应用转发的所述第二寄宿应用发送的执行所述调用指令后返回的执行结果。Another aspect of the present application provides an instant messaging method between host applications, which is applied to a first host application, where the first host application runs on a default running stack of the host application; including sending a calling instruction through an instant messaging API interface , the call instruction includes the identification information of the second host application; so that the host application runs the second host application on the auxiliary running stack according to the call instruction; wherein, the host application includes a plurality of host applications for running the host application Receive the execution result returned after executing the calling instruction and sent by the second host application forwarded by the host application through the instant messaging API interface.

本申请的另一方面,提供一种寄宿应用间的即时通讯方法,应用于第二寄宿应用,所述第二寄宿应用运行于宿主应用的辅助运行栈上;包括通过即时通讯API接口接收并执行由宿主应用转发的运行于默认运行栈的所述第一寄宿应用发送的调用指令;其中,所述宿主应用包括多个用于运行寄宿应用的运行栈;通过即时通讯API接口返回执行结果,以便所述宿主应用将执行结果返回给所述第一寄宿应用。Another aspect of the present application provides an instant messaging method between host applications, which is applied to a second host application, where the second host application runs on an auxiliary running stack of the host application; the method includes receiving and executing an instant messaging API interface through an instant messaging API interface. The calling instruction sent by the first host application running on the default running stack forwarded by the host application; wherein, the host application includes a plurality of running stacks for running the host application; the execution result is returned through the instant messaging API interface, so that The host application returns the execution result to the first host application.

本申请的另一方面,提供一种设备,所述设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现任一上述的方法。Another aspect of the present application provides an apparatus, the apparatus comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more programs The execution of the one or more processors causes the one or more processors to implement any of the above-described methods.

本申请的另一方面,提供一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现任一上述的方法。Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, any one of the above methods is implemented.

由所述技术方案可知,本申请的上述实施例中,能够在实现寄宿应用间的即时通信。As can be seen from the technical solutions, in the above-mentioned embodiments of the present application, instant communication between boarding applications can be realized.

【附图说明】【Description of drawings】

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that are required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are from the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本申请一些实施例提供的一种应用于宿主应用的寄宿应用间即时通讯方法的流程示意图;FIG. 1 is a schematic flowchart of a method for instant messaging between host applications applied to a host application provided by some embodiments of the present application;

图2为本申请一些实施例提供的一种应用于第一寄宿应用的寄宿应用间即时通讯方法的流程示意图;2 is a schematic flowchart of a method for instant messaging between boarding applications applied to a first boarding application provided by some embodiments of the present application;

图3为本申请一些实施例提供的一种应用于第二寄宿应用的寄宿应用间即时通讯方法的流程示意图;3 is a schematic flowchart of a method for instant messaging between boarding applications applied to a second boarding application provided by some embodiments of the present application;

图4为适于用来实现本发明的一些实施例的示例性计算机系统/服务器的框图。Figure 4 is a block diagram of an exemplary computer system/server suitable for use in implementing some embodiments of the present invention.

【具体实施方式】【Detailed ways】

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请的一些实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的全部其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in some embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described The embodiments are some of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

另外,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。In addition, the term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, There are three cases of B alone. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship.

图1为本申请一些实施例提供的一种寄宿应用间的即时通讯方法的流程示意图,所述方法应用于宿主应用,所述宿主应用包括多个用于运行寄宿应用的运行栈;包括以下步骤:1 is a schematic flowchart of a method for instant messaging between host applications provided by some embodiments of the present application. The method is applied to a host application, and the host application includes a plurality of runtime stacks for running the host application; including the following steps :

步骤S11、通过即时通讯API接口接收运行在默认运行栈上的第一寄宿应用发送的调用指令,所述调用指令包括第二寄宿应用标识信息;Step S11, receiving a calling instruction sent by the first hosting application running on the default running stack through the instant messaging API interface, where the calling instruction includes the identification information of the second hosting application;

步骤S12、根据所述调用指令,在辅助运行栈上运行第二寄宿应用;Step S12, run the second boarding application on the auxiliary running stack according to the calling instruction;

步骤S13、通过即时通讯API接口转发第一寄宿应用与第二寄宿应用间的通讯。Step S13: Forward the communication between the first hosting application and the second hosting application through the instant messaging API interface.

在一些实施例中,宿主应用为安装在无线设备上的应用(APP)客户端,例如微信,或无线设备的操作系统;寄宿应用为依赖于宿主应用运行的应用,例如微信中的小程序等。所述宿主应用包括多个用于运行寄宿应用的运行栈,例如用于运行第一寄宿应用的默认运行栈,用于运行第二寄宿应用的辅助运行栈。In some embodiments, the host application is an application (APP) client installed on a wireless device, such as WeChat, or the operating system of the wireless device; the host application is an application that depends on the host application to run, such as a small program in WeChat, etc. . The host application includes a plurality of run stacks for running the host application, such as a default run stack for running the first host application, and an auxiliary run stack for running the second host application.

其中,所述无线设备包括但不限于任何一种可与用户进行人机交互并能够实现无线通信功能的智能终端设备,如智能手机、平板电脑、笔记本电脑等,当然,还可以为其他具有类似功能的设备,本实施例对此不加以限制。所述智能终端设备可以采用任意操作系统,如Android操作系统、iOS操作系统、Windows操作系统等。Wherein, the wireless device includes but is not limited to any intelligent terminal device that can perform human-computer interaction with the user and can realize wireless communication functions, such as smart phones, tablet computers, notebook computers, etc. Of course, it can also be other devices with similar functional device, which is not limited in this embodiment. The intelligent terminal device may adopt any operating system, such as Android operating system, iOS operating system, Windows operating system, and the like.

在步骤S11的一种优选实现方式中,In a preferred implementation of step S11,

所述宿主应用通过即时通讯API接口接收运行在默认运行栈上的第一寄宿应用发送的调用指令,所述调用指令包括第二寄宿应用标识信息。The host application receives a call instruction sent by the first host application running on the default running stack through the instant messaging API interface, where the call instruction includes the identification information of the second host application.

优选地,第一寄宿应用运行于寄宿应用的第一运行栈上;所述第一运行栈为宿主应用的默认运行栈。Preferably, the first host application runs on the first run stack of the host application; the first run stack is the default run stack of the host application.

优选地,所述宿主应用响应于用户对第一寄宿应用的触发,启动第一运行栈,在所述第一运行栈上运行第一寄宿应用。Preferably, the host application starts a first run stack in response to a user triggering the first host application, and runs the first host application on the first run stack.

优选地,所述宿主应用接收到运行在运行栈上的第一寄宿应用发出的调用指令,所述调用指令用于指示调用第二寄宿应用。Preferably, the host application receives a call instruction issued by the first host application running on the running stack, where the call instruction is used to instruct the second host application to be called.

优选地,所述调用指令结构如下:指令头、分隔符、数据;其中,Preferably, the calling instruction structure is as follows: instruction header, delimiter, data; wherein,

所述指令头部分用于标记所述第二寄宿应用,以便宿主应用运行所述第二寄宿应用;优选地,所述指令头为所述第二寄宿应用的AppID,不同寄宿应用通过其AppID进行标识;The instruction header part is used to mark the second hosted application, so that the host application runs the second hosted application; preferably, the instruction header is the AppID of the second hosted application, and different hosted applications use their AppIDs to perform operations. identification;

所述数据部分用于指示所述第二寄宿应用执行对应操作。The data part is used to instruct the second hosting application to perform a corresponding operation.

优选地,所述第一寄宿应用通过其即时通讯API接口发送调用指令给第二寄宿应用;所述宿主应用通过其即时通讯API接口接收调用指令并进行处理。对于第一寄宿应用,只需通过其即时通讯API接口发出调用指令即可,无需了解所述调用指令的具体接收、转发流程。Preferably, the first host application sends a call instruction to the second host application through its instant messaging API interface; the host application receives and processes the call instruction through its instant messaging API interface. For the first boarding application, it is only necessary to issue a calling instruction through its instant messaging API interface, and there is no need to know the specific receiving and forwarding process of the calling instruction.

在步骤S12的一种优选实现方式中,In a preferred implementation of step S12,

所述宿主应用根据所述调用指令,在辅助运行栈上运行第二寄宿应用;The host application runs the second host application on the auxiliary operating stack according to the calling instruction;

所述宿主应用根据所述调用指令,启动辅助运行栈;所述辅助运行栈用于在默认运行栈运行第一寄宿应用的同时,在所述辅助运行栈运行第二寄宿应用。优选地,所述宿主应用所能启动的辅助运行栈为一个或多个,以便在所述一个或多个辅助运行栈分别运行不同的寄宿应用;即可以实现多个寄宿应用之间的即时通讯。The host application starts the auxiliary running stack according to the calling instruction; the auxiliary running stack is used to run the second hosting application on the auxiliary running stack while the default running stack runs the first hosting application. Preferably, there are one or more auxiliary operating stacks that can be started by the host application, so that different boarding applications can be respectively run on the one or more auxiliary operating stacks; that is, instant communication between multiple boarding applications can be realized. .

优选地,在所述辅助运行栈启动之后,将所述调用指令标记的第二寄宿应用运行在所述辅助运行栈上。Preferably, after the auxiliary running stack is started, the second hosted application marked by the calling instruction is run on the auxiliary running stack.

优选地,所述宿主应用通过所述即时通讯API接口接收第一寄宿应用发送的消息,通过解析所述消息,判断其具体类型;若所述消息的结构包括指令头、分隔符、数据,则表明其为调用指令;若所述消息非调用指令,则按正常流程进行处理。Preferably, the host application receives the message sent by the first host application through the instant messaging API interface, and determines its specific type by parsing the message; if the structure of the message includes an instruction header, a separator, and data, then Indicates that it is a calling instruction; if the message is not a calling instruction, it is processed according to the normal flow.

在本申请的一个优选实施例中,宿主应用所能启动的辅助运行栈为一个或多个,在对某一寄宿应用的调用结束后,并不停止所述寄宿应用,而是在其对应的辅助运行栈上继续运行所述寄宿应用;以便能够随时调用所述寄宿应用而无需重新运行。In a preferred embodiment of the present application, there are one or more auxiliary operating stacks that can be started by the host application, and after the call to a certain host application ends, the host application is not stopped, but the corresponding host application is not stopped. The host application continues to run on the auxiliary runtime stack; so that the host application can be called at any time without re-running.

优选地,所述宿主应用接收到所述调用指令后,根据所述调用指令中包括的AppID,检查是否在辅助运行栈上运行有对应的第二寄宿应用;Preferably, after receiving the call instruction, the host application checks whether there is a corresponding second host application running on the auxiliary operating stack according to the AppID included in the call instruction;

若已在辅助运行栈中运行对应的第二寄宿应用,则可以将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令;If the corresponding second host application is already running in the auxiliary running stack, the call instruction may be forwarded to the second host application, so that the second host application executes the call instruction;

若未在辅助运行栈上运行对应的第二寄宿应用,则启动辅助运行栈,在所述辅助运行栈中运行第二寄宿应用,将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令。If the corresponding second hosted application is not running on the auxiliary running stack, the auxiliary running stack is started, the second hosted application is run in the auxiliary running stack, and the calling instruction is forwarded to the second hosted application, so that all The second host application executes the calling instruction.

在本申请的一个优选实施例中,调用结束后,所述宿主应用停止寄宿应用,清空而非销毁辅助运行栈,可以在所述辅助运行栈上迅速运行所需的寄宿应用。In a preferred embodiment of the present application, after the call ends, the host application stops the host application, clears the auxiliary running stack instead of destroying it, and can quickly run the required host application on the auxiliary running stack.

优选地,若未启动第二寄宿应用,判断是否存在已启动的且清空的辅助运行栈;如果存在,则直接在所述辅助运行栈上运行第二寄宿应用;如果不存在,则启动辅助运行栈,在所述辅助运行栈上运行第二寄宿应用。Preferably, if the second boarding application is not started, it is judged whether there is an auxiliary running stack that has been started and emptied; if so, the second boarding application is directly run on the auxiliary running stack; if it does not exist, the auxiliary running stack is started. stack, and run the second host application on the auxiliary running stack.

优选地,所述宿主应用在后台调用所述第二寄宿应用,即所述第一寄宿应用的界面不变。Preferably, the host application calls the second host application in the background, that is, the interface of the first host application remains unchanged.

在步骤S13的一种优选实现方式中,In a preferred implementation of step S13,

所述宿主应用通过即时通讯API接口将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令。The host application forwards the calling instruction to the second hosting application through the instant messaging API interface, so that the second hosting application executes the calling instruction.

优选地,所述宿主应用将所述调用指令通过其即时通讯API接口转发给所述第二寄宿应用;以便所述第二寄宿应用通过统一默认的消息接收接口接收所述调用指令。Preferably, the host application forwards the calling instruction to the second hosting application through its instant messaging API interface; so that the second hosting application receives the calling instruction through a unified default message receiving interface.

优选地,所述统一默认的消息接收接口可以为所述第二寄宿应用的即时通讯API接口。Preferably, the unified default message receiving interface may be an instant messaging API interface of the second hosting application.

优选地,所述第二寄宿应用根据所述调用指令结构中的数据部分,执行对应操作,并通过统一默认的结果返回接口将操作结果返回给所述第一寄宿应用。Preferably, the second hosting application performs a corresponding operation according to the data part in the calling instruction structure, and returns the operation result to the first hosting application through a unified default result return interface.

优选地,所述数据部分可以是指示所述第二寄宿应用读取所述第一寄宿应用的数据共享区中数据的指令,实现所述第一寄宿应用与所述第二寄宿应用之间的数据传递。Preferably, the data part may be an instruction instructing the second hosting application to read the data in the data sharing area of the first hosting application, so as to realize the communication between the first hosting application and the second hosting application. data transfer.

所述宿主应用通过即时通讯API接口接收所述第二寄宿应用执行所述调用指令后返回的执行结果,将所述执行结果返回给所述第一寄宿应用。The host application receives the execution result returned by the second host application after executing the calling instruction through the instant messaging API interface, and returns the execution result to the first host application.

优选地,所述宿主应用通过统一默认的消息接收接口接收所述第二寄宿应用返回的操作结果;将所述操作结果通过结果返回接口转发给所述第一寄宿应用,由所述第一寄宿应用通过统一默认的消息接收接口接收所述操作结果。Preferably, the host application receives the operation result returned by the second host application through a unified default message receiving interface; forwards the operation result to the first host application through the result return interface, and the first host application The application receives the operation result through a unified default message receiving interface.

优选地,所述操作结果可以是所述第二寄宿应用根据所述调用指令结构中的数据部分,执行对应操作的操作结果;也可以是所述第二寄宿应用执行对应操作后返回的反馈信息,所述反馈信息用于指示所述第一寄宿应用操作已执行成功,或,执行失败。Preferably, the operation result may be the operation result of the second hosting application performing the corresponding operation according to the data part in the calling instruction structure; it may also be the feedback information returned by the second hosting application after performing the corresponding operation , the feedback information is used to indicate that the operation of the first hosting application has been successfully executed, or that the execution has failed.

优选地,所述统一默认的消息接收接口为即时通讯API接口;所述结果返回接口为即时通讯API接口。Preferably, the unified default message receiving interface is an instant messaging API interface; the result returning interface is an instant messaging API interface.

优选地,所述方法还包括:Preferably, the method further includes:

优选地,所述宿主应用接收到所述第二寄宿应用返回的执行结果后,停止所述第二寄宿应用。Preferably, the host application stops the second host application after receiving the execution result returned by the second host application.

优选地,所述第一寄宿应用接收到所述操作结果后,发出调用结束指令,所述调用结束指令用于指示停止对应的第二寄宿应用。所述调用结束指令包括第二寄宿应用标识信息。所述宿主应用接收到所述调用结束指令后,停止所述第二寄宿应用。Preferably, after receiving the operation result, the first host application sends a call end instruction, where the call end instruction is used to instruct to stop the corresponding second host application. The call end instruction includes the identification information of the second hosting application. After the host application receives the call end instruction, it stops the second host application.

优选地,所述第二寄宿应用标识信息为所述第二寄宿应用的AppID。Preferably, the identification information of the second hosting application is the AppID of the second hosting application.

优选地,所述宿主应用停止所述第二寄宿应用后,清空所述辅助运行栈。Preferably, after the host application stops the second host application, the auxiliary running stack is emptied.

在上述过程中,运行于默认运行栈上的所述第一寄宿应用不受影响。当所述宿主应用再次接收到所述第一寄宿应用发送的调用指令,则再次调用所述辅助运行栈,重复上述操作。In the above process, the first hosted application running on the default running stack is not affected. When the host application receives the calling instruction sent by the first host application again, it calls the auxiliary runtime stack again, and repeats the above operations.

在本实施例中,宿主应用启动辅助运行栈,在所述辅助运行栈上运行第二寄宿应用,并转发第一寄宿应用与第二寄宿应用之间的通讯消息,实现了寄宿应用间的即时通讯。In this embodiment, the host application starts the auxiliary running stack, runs the second hosting application on the auxiliary running stack, and forwards the communication message between the first hosting application and the second hosting application, so as to realize the instant connection between the hosting applications. communication.

图2为本申请一些实施例提供的一种寄宿应用间的即时通讯方法的流程示意图,所述方法应用于第一寄宿应用,所述第一寄宿应用运行于宿主应用的默认运行栈上;包括以下步骤:2 is a schematic flowchart of an instant messaging method between host applications provided by some embodiments of the present application, the method is applied to a first host application, and the first host application runs on the default running stack of the host application; including The following steps:

步骤S21、通过即时通讯API接口发送调用指令,所述调用指令包括第二寄宿应用标识信息;以便所述宿主应用根据所述调用指令在辅助运行栈上运行所述第二寄宿应用;其中,所述宿主应用包括多个用于运行寄宿应用的运行栈;Step S21, sending a calling instruction through the instant messaging API interface, where the calling instruction includes the identification information of the second hosting application; so that the host application runs the second hosting application on the auxiliary running stack according to the calling instruction; The host application includes a plurality of runtime stacks for running the host application;

步骤S22、通过即时通讯API接口接收由所述宿主应用转发的所述第二寄宿应用发送的执行所述调用指令后返回的执行结果。Step S22: Receive, through an instant messaging API interface, an execution result returned by the second host application and forwarded by the host application after executing the calling instruction.

在步骤S21的一种优选实现方式中,In a preferred implementation of step S21,

优选地,所述宿主应用响应于用户对第一寄宿应用的触发,启动第一运行栈,在所述第一运行栈上运行第一寄宿应用。所述第一运行栈为宿主应用的默认运行栈。Preferably, the host application starts a first run stack in response to a user triggering the first host application, and runs the first host application on the first run stack. The first run stack is the default run stack of the host application.

所述第一寄宿应用通过即时通讯API接口发送调用指令,所述调用指令用于指示调用第二寄宿应用。The first hosting application sends a calling instruction through an instant messaging API interface, where the calling instruction is used to instruct the second hosting application to be called.

优选地,所述调用指令结构如下:指令头、分隔符、数据;其中,Preferably, the calling instruction structure is as follows: instruction header, delimiter, data; wherein,

所述指令头部分用于标记所述第二寄宿应用,以便宿主应用运行所述第二寄宿应用;优选地,所述指令头为所述第二寄宿应用的AppID,不同寄宿应用通过其AppID进行标识;The instruction header part is used to mark the second hosted application, so that the host application runs the second hosted application; preferably, the instruction header is the AppID of the second hosted application, and different hosted applications use their AppIDs to perform operations. identification;

所述数据部分用于指示所述第二寄宿应用执行对应操作。The data part is used to instruct the second hosting application to perform a corresponding operation.

优选地,所述第一寄宿应用通过其即时通讯API接口发送调用指令给第二寄宿应用;所述宿主应用通过其即时通讯API接口接收调用指令并进行处理。对于第一寄宿应用,只需通过其即时通讯API接口发出调用指令即可,无需了解所述调用指令的具体接收、转发流程。Preferably, the first host application sends a call instruction to the second host application through its instant messaging API interface; the host application receives and processes the call instruction through its instant messaging API interface. For the first boarding application, it is only necessary to issue a calling instruction through its instant messaging API interface, and there is no need to know the specific receiving and forwarding process of the calling instruction.

所述宿主应用根据所述调用指令,在辅助运行栈上运行第二寄宿应用;所述宿主应用将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令。所述宿主应用接收所述第二寄宿应用执行所述调用指令后返回的执行结果,将所述执行结果返回给所述第一寄宿应用。The host application runs the second host application on the auxiliary operating stack according to the call instruction; the host application forwards the call instruction to the second host application, so that the second host application executes the call instruction. The host application receives an execution result returned by the second host application after executing the calling instruction, and returns the execution result to the first host application.

具体步骤可参照前述实施例的对应部分,在此不再赘述。For specific steps, reference may be made to the corresponding parts of the foregoing embodiments, which will not be repeated here.

在步骤S22的一种优选实现方式中,In a preferred implementation of step S22,

所述第一寄宿应用通过即时通讯API接口接收由所述宿主应用转发的所述第二寄宿应用发送的执行所述调用指令后返回的执行结果。The first host application receives, through an instant messaging API interface, an execution result returned by the second host application and sent by the host application after executing the calling instruction.

优选地,所述第一寄宿应用通过统一默认的消息接收接口接收所述操作结果。Preferably, the first hosting application receives the operation result through a unified default message receiving interface.

优选地,所述操作结果可以是所述第二寄宿应用根据所述调用指令结构中的数据部分,执行对应操作的操作结果;也可以是所述第二寄宿应用执行对应操作后返回的反馈信息,所述反馈信息用于指示所述第一寄宿应用操作已执行成功,或,执行失败。Preferably, the operation result may be the operation result of the second hosting application performing the corresponding operation according to the data part in the calling instruction structure; it may also be the feedback information returned by the second hosting application after performing the corresponding operation , the feedback information is used to indicate that the operation of the first hosting application has been successfully executed, or that the execution has failed.

优选地,所述统一默认的消息接收接口为即时通讯API接口;所述结果返回接口为即时通讯API接口。Preferably, the unified default message receiving interface is an instant messaging API interface; the result returning interface is an instant messaging API interface.

优选地,所述第一寄宿应用接收到所述操作结果后,发出调用结束指令,所述调用结束指令用于指示停止对应的第二寄宿应用。所述调用结束指令包括第二寄宿应用标识信息。所述宿主应用接收到所述调用结束指令后,停止所述第二寄宿应用。Preferably, after receiving the operation result, the first host application sends a call end instruction, where the call end instruction is used to instruct to stop the corresponding second host application. The call end instruction includes the identification information of the second hosting application. After the host application receives the call end instruction, it stops the second host application.

在本实施例中,第一寄宿应用发送针对第二寄宿应用的调用指令,由宿主应用启动辅助运行栈,在所述辅助运行栈上运行第二寄宿应用,并转发第一寄宿应用与第二寄宿应用之间的通讯消息,实现了第一寄宿应用与第二寄宿应用间的即时通讯。In this embodiment, the first hosted application sends a call instruction for the second hosted application, the host application starts an auxiliary running stack, runs the second hosted application on the auxiliary running stack, and forwards the first hosted application and the second hosted application The communication message between the boarding applications realizes the instant communication between the first boarding application and the second boarding application.

图3为本申请一些实施例提供的一种寄宿应用间的即时通讯方法的流程示意图,所述方法应用于第二寄宿应用,所述第二寄宿应用运行于宿主应用的辅助运行栈上;包括以下步骤:3 is a schematic flowchart of a method for instant messaging between host applications provided by some embodiments of the present application, the method is applied to a second host application, and the second host application runs on an auxiliary running stack of the host application; including The following steps:

步骤S31、通过即时通讯API接口接收并执行由宿主应用转发的运行于默认运行栈的第一寄宿应用发送的调用指令;其中,所述宿主应用包括多个用于运行寄宿应用的运行栈;Step S31, receiving and executing the calling instruction sent by the first host application running on the default running stack forwarded by the host application through the instant messaging API interface; wherein, the host application includes a plurality of running stacks for running the host application;

步骤S32、通过即时通讯API接口返回执行结果,以便所述宿主应用将执行结果返回给所述第一寄宿应用。Step S32, returning the execution result through the instant messaging API interface, so that the host application returns the execution result to the first host application.

在步骤S31的一种优选实现方式中,In a preferred implementation of step S31,

所述宿主应用根据所述第一寄宿应用发送的调用指令,在辅助运行栈上运行第二寄宿应用;The host application runs the second host application on the auxiliary operating stack according to the calling instruction sent by the first host application;

优选地,所述宿主应用根据所述调用指令,启动辅助运行栈;所述辅助运行栈用于在默认运行栈运行第一寄宿应用的同时,在所述辅助运行栈运行第二寄宿应用。优选地,所述宿主应用所能启动的辅助运行栈为一个或多个,以便在所述一个或多个辅助运行栈分别运行不同的寄宿应用;即可以实现多个寄宿应用之间的即时通讯。Preferably, the host application starts an auxiliary running stack according to the calling instruction; the auxiliary running stack is configured to run the second hosting application on the auxiliary running stack while the default running stack runs the first hosting application. Preferably, there are one or more auxiliary operating stacks that can be started by the host application, so that different boarding applications can be respectively run on the one or more auxiliary operating stacks; that is, instant communication between multiple boarding applications can be realized. .

优选地,在所述辅助运行栈启动之后,将所述调用指令标记的第二寄宿应用运行在所述辅助运行栈上。Preferably, after the auxiliary running stack is started, the second hosted application marked by the calling instruction is run on the auxiliary running stack.

优选地,所述宿主应用将所述调用指令通过其即时通讯API接口转发给所述第二寄宿应用;所述第二寄宿应用通过统一默认的消息接收接口接收所述调用指令。Preferably, the host application forwards the calling instruction to the second hosting application through its instant messaging API interface; the second hosting application receives the calling instruction through a unified default message receiving interface.

优选地,所述统一默认的消息接收接口可以为所述第二寄宿应用的即时通讯API接口。Preferably, the unified default message receiving interface may be an instant messaging API interface of the second hosting application.

优选地,所述第二寄宿应用根据所述调用指令结构中的数据部分,执行对应操作。Preferably, the second hosting application performs corresponding operations according to the data part in the calling instruction structure.

优选地,所述调用指令的数据部分可以是指示所述第二寄宿应用读取所述第一寄宿应用的数据共享区中数据的指令,实现所述第一寄宿应用与所述第二寄宿应用之间的数据传递。Preferably, the data part of the calling instruction may be an instruction instructing the second hosting application to read the data in the data sharing area of the first hosting application, so as to realize the first hosting application and the second hosting application data transfer between.

在步骤S32的一种优选实现方式中,In a preferred implementation of step S32,

所述第二寄宿应用通过统一默认的结果返回接口将根据所述调用指令结构中的数据部分,即执行对应操作的操作结果返回给所述第一寄宿应用。The second hosting application returns the operation result of executing the corresponding operation according to the data part in the calling instruction structure to the first hosting application through a unified default result return interface.

优选地,所述宿主应用通过统一默认的消息接收接口接收所述第二寄宿应用返回的操作结果;将所述操作结果通过结果返回接口转发给所述第一寄宿应用,由所述第一寄宿应用通过统一默认的消息接收接口接收所述操作结果。Preferably, the host application receives the operation result returned by the second host application through a unified default message receiving interface; forwards the operation result to the first host application through the result return interface, and the first host application The application receives the operation result through a unified default message receiving interface.

优选地,所述统一默认的消息接收接口为即时通讯API接口;所述结果返回接口为即时通讯API接口。Preferably, the unified default message receiving interface is an instant messaging API interface; the result returning interface is an instant messaging API interface.

优选地,所述操作结果可以是所述第二寄宿应用根据所述调用指令结构中的数据部分,执行对应操作的操作结果;也可以是所述第二寄宿应用执行对应操作后返回的反馈信息,所述反馈信息用于指示所述第一寄宿应用操作已执行成功,或,执行失败。Preferably, the operation result may be the operation result of the second hosting application performing the corresponding operation according to the data part in the calling instruction structure; it may also be the feedback information returned by the second hosting application after performing the corresponding operation , the feedback information is used to indicate that the operation of the first hosting application has been successfully executed, or that the execution has failed.

优选地,所述宿主应用接收到所述第二寄宿应用返回的执行结果后,停止所述第二寄宿应用。Preferably, the host application stops the second host application after receiving the execution result returned by the second host application.

优选地,所述第一寄宿应用接收到所述操作结果后,发出调用结束指令,所述调用结束指令用于指示停止对应的第二寄宿应用。所述调用结束指令包括第二寄宿应用标识信息。所述宿主应用接收到所述调用结束指令后,停止所述第二寄宿应用。Preferably, after receiving the operation result, the first host application sends a call end instruction, where the call end instruction is used to instruct to stop the corresponding second host application. The call end instruction includes the identification information of the second hosting application. After the host application receives the call end instruction, it stops the second host application.

在本实施例中,第一寄宿应用发送针对第二寄宿应用的调用指令,由宿主应用启动辅助运行栈,在所述辅助运行栈上运行第二寄宿应用。第二寄宿应用接收宿主应用转发的调用指令进行对应操作,并将执行结果通过宿主应用反馈给第一寄宿应用,实现了第一寄宿应用与第二寄宿应用间的即时通讯。In this embodiment, the first hosted application sends a call instruction for the second hosted application, the host application starts an auxiliary running stack, and the second hosted application runs on the auxiliary running stack. The second host application receives the calling instruction forwarded by the host application to perform corresponding operations, and feeds back the execution result to the first host application through the host application, thereby realizing instant communication between the first host application and the second host application.

图4示出了适于用来实现本发明实施方式的示例性计算机系统/服务器012的框图。图4显示的计算机系统/服务器012仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Figure 4 shows a block diagram of an exemplary computer system/server 012 suitable for use in implementing embodiments of the present invention. The computer system/server 012 shown in FIG. 4 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present invention.

如图4所示,计算机系统/服务器012以通用计算设备的形式表现。计算机系统/服务器012的组件可以包括但不限于:一个或者多个处理器或者处理单元016,系统存储器028,连接不同系统组件(包括系统存储器028和处理单元016)的总线018。As shown in FIG. 4, computer system/server 012 takes the form of a general-purpose computing device. Components of computer system/server 012 may include, but are not limited to, one or more processors or processing units 016, system memory 028, and bus 018 connecting various system components including system memory 028 and processing unit 016.

总线018表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。Bus 018 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.

计算机系统/服务器012典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机系统/服务器012访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Computer system/server 012 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer system/server 012, including both volatile and non-volatile media, removable and non-removable media.

系统存储器028可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)030和/或高速缓存存储器032。计算机系统/服务器012可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统034可以用于读写不可移动的、非易失性磁介质(图4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线018相连。存储器028可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。System memory 028 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 030 and/or cache memory 032 . Computer system/server 012 may further include other removable/non-removable, volatile/non-volatile computer system storage media. For example only, storage system 034 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in FIG. 4, a disk drive may be provided for reading and writing to removable non-volatile magnetic disks (eg "floppy disks"), as well as removable non-volatile optical disks (eg CD-ROM, DVD-ROM) or other optical media) to read and write optical drives. In these cases, each drive may be connected to bus 018 through one or more data media interfaces. Memory 028 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present invention.

具有一组(至少一个)程序模块042的程序/实用工具040,可以存储在例如存储器028中,这样的程序模块042包括——但不限于——操作系统、一个或者多个寄宿应用、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块042通常执行本发明所描述的实施例中的功能和/或方法。A program/utility 040 having a set (at least one) of program modules 042, which may be stored, for example, in memory 028, such program modules 042 including, but not limited to, an operating system, one or more hosted applications, other programs Modules and program data, each or some combination of these examples may include an implementation of a network environment. Program modules 042 generally perform the functions and/or methods of the described embodiments of the present invention.

计算机系统/服务器012也可以与一个或多个外部设备014(例如键盘、指向设备、显示器024等)通信,在本发明中,计算机系统/服务器012与外部雷达设备进行通信,还可与一个或者多个使得用户能与该计算机系统/服务器012交互的设备通信,和/或与使得该计算机系统/服务器012能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口022进行。并且,计算机系统/服务器012还可以通过网络适配器020与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图4所示,网络适配器020通过总线018与计算机系统/服务器012的其它模块通信。应当明白,尽管图4中未示出,可以结合计算机系统/服务器012使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The computer system/server 012 may also communicate with one or more external devices 014 (eg, keyboard, pointing device, display 024, etc.), in the present invention, the computer system/server 012 communicates with external radar devices, and may also communicate with one or more Multiple devices that enable a user to interact with the computer system/server 012, and/or any device (eg, network card, modem, etc.) that enables the computer system/server 012 to communicate with one or more other computing devices communication. Such communication may take place through input/output (I/O) interface 022 . Also, computer system/server 012 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network such as the Internet) through a network adapter 020 . As shown in FIG. 4 , network adapter 020 communicates with other modules of computer system/server 012 via bus 018 . It should be understood that, although not shown in Figure 4, other hardware and/or software modules may be used in conjunction with computer system/server 012, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems , tape drives, and data backup storage systems.

处理单元016通过运行存储在系统存储器028中的程序,从而执行本发明所描述的实施例中的功能和/或方法。The processing unit 016 executes the functions and/or methods in the described embodiments of the present invention by running programs stored in the system memory 028 .

上述的计算机程序可以设置于计算机存储介质中,即该计算机存储介质被编码有计算机程序,该程序在被一个或多个计算机执行时,使得一个或多个计算机执行本发明上述实施例中所示的方法流程和/或装置操作。The above-mentioned computer program may be provided in a computer storage medium, that is, the computer storage medium is encoded with a computer program, which, when executed by one or more computers, causes one or more computers to execute the programs shown in the foregoing embodiments of the present invention. The method flow and/or device operation.

随着时间、技术的发展,介质含义越来越广泛,计算机程序的传播途径不再受限于有形介质,还可以直接从网络下载等。可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。With the development of time and technology, the meaning of media has become more and more extensive, and the dissemination of computer programs is no longer limited to tangible media, and can also be downloaded directly from the network. Any combination of one or more computer-readable media may be employed. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .

计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as the "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).

最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present application.

Claims (12)

1.一种寄宿应用间的即时通讯方法,应用于宿主应用,所述宿主应用包括多个用于运行寄宿应用的运行栈;其特征在于,包括:1. an instant messaging method between boarding applications, applied to a host application, the host application comprising a plurality of running stacks for running the boarding application; it is characterized in that, comprising: 通过即时通讯API接口接收运行在默认运行栈上的第一寄宿应用发送的调用指令,所述调用指令包括第二寄宿应用标识信息;Receive a call instruction sent by the first host application running on the default running stack through the instant messaging API interface, where the call instruction includes the identification information of the second host application; 根据所述调用指令,在辅助运行栈上运行所述第二寄宿应用;According to the calling instruction, run the second host application on the auxiliary running stack; 通过即时通讯API接口转发所述第一寄宿应用与所述第二寄宿应用间的通讯消息。The communication message between the first hosting application and the second hosting application is forwarded through the instant messaging API interface. 2.根据权利要求1所述的方法,其特征在于,所述根据所述调用指令,在辅助运行栈上运行第二寄宿应用包括:2. The method according to claim 1, wherein, according to the calling instruction, running the second boarding application on the auxiliary running stack comprises: 根据所述调用指令,启动辅助运行栈,在所述辅助运行栈上运行所述第二寄宿应用。According to the calling instruction, an auxiliary running stack is started, and the second hosting application is run on the auxiliary running stack. 3.根据权利要求2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 2, wherein the method further comprises: 根据所述第二寄宿应用标识信息,检查是否在辅助运行栈上运行有对应的第二寄宿应用;若未在辅助运行栈上运行对应的第二寄宿应用,则启动辅助运行栈,在所述辅助运行栈上运行所述第二寄宿应用。According to the second boarding application identification information, it is checked whether there is a corresponding second boarding application running on the auxiliary running stack; if the corresponding second boarding application is not running on the auxiliary running stack, the auxiliary running The second host application is run on the auxiliary run stack. 4.根据权利要求1所述的方法,其特征在于,所述通过即时通讯API接口转发所述第一寄宿应用与所述第二寄宿应用间的通讯消息包括:4. The method according to claim 1, wherein the forwarding of the communication message between the first hosting application and the second hosting application through an instant messaging API interface comprises: 通过即时通讯API接口将所述调用指令转发给所述第二寄宿应用,以便所述第二寄宿应用执行所述调用指令;forwarding the calling instruction to the second hosting application through the instant messaging API interface, so that the second hosting application executes the calling instruction; 通过即时通讯API接口接收所述第二寄宿应用执行所述调用指令后返回的执行结果;将所述执行结果返回给所述第一寄宿应用。Receive the execution result returned by the second hosting application after executing the calling instruction through the instant messaging API interface; and return the execution result to the first hosting application. 5.根据权利要求1所述的方法,其特征在于,所述方法还包括:5. The method according to claim 1, wherein the method further comprises: 通过即时通讯API接口接收所述第二寄宿应用执行所述调用指令后返回的执行结果,或,接收所述第一寄宿应用发送的调用结束指令;退出所述第二寄宿应用。Receive the execution result returned by the second host application after executing the call instruction through the instant messaging API interface, or receive the call end instruction sent by the first host application; and exit the second host application. 6.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, wherein the method further comprises: 清空所述辅助运行栈。The auxiliary run stack is emptied. 7.一种寄宿应用间的即时通讯方法,应用于第一寄宿应用,所述第一寄宿应用运行于宿主应用的默认运行栈上;其特征在于,包括:7. An instant messaging method between host applications, applied to a first host application, the first host application running on the default running stack of the host application; it is characterized in that, comprising: 通过即时通讯API接口发送调用指令,所述调用指令包括第二寄宿应用标识信息;以便所述宿主应用根据所述调用指令在辅助运行栈上运行所述第二寄宿应用;其中,所述宿主应用包括多个用于运行寄宿应用的运行栈;Send a call instruction through the instant messaging API interface, where the call instruction includes the identification information of the second host application; so that the host application runs the second host application on the auxiliary operating stack according to the call instruction; wherein, the host application Includes multiple runtime stacks for running hosted applications; 通过即时通讯API接口接收由所述宿主应用转发的所述第二寄宿应用发送的执行所述调用指令后返回的执行结果。The execution result returned after executing the calling instruction and sent by the second host application forwarded by the host application is received through the instant messaging API interface. 8.根据权利要求7所述的方法,其特征在于,所述方法还包括:8. The method according to claim 7, wherein the method further comprises: 通过即时通讯API接口发送调用结束指令,以便所述宿主应用停止所述第二寄宿应用,清空所述辅助运行栈。Send a call end instruction through the instant messaging API interface, so that the host application stops the second host application and clears the auxiliary running stack. 9.一种寄宿应用间的即时通讯方法,应用于第二寄宿应用,所述第二寄宿应用运行于宿主应用的辅助运行栈上;其特征在于,包括:9. An instant messaging method between host applications, applied to a second host application, the second host application running on an auxiliary running stack of the host application; it is characterized in that, comprising: 通过即时通讯API接口接收并执行由宿主应用转发的运行于默认运行栈的第一寄宿应用发送的调用指令;其中,所述宿主应用包括多个用于运行寄宿应用的运行栈;Receive and execute the call instruction sent by the first host application running on the default running stack and forwarded by the host application through the instant messaging API interface; wherein, the host application includes a plurality of running stacks for running the host application; 通过即时通讯API接口返回执行结果,以便所述宿主应用将所述执行结果返回给所述第一寄宿应用。The execution result is returned through the instant messaging API interface, so that the host application returns the execution result to the first host application. 10.根据权利要求9所述的方法,其特征在于,10. The method of claim 9, wherein: 所述第二寄宿应用由所述宿主应用根据第一寄宿应用发送的调用指令在辅助运行栈上运行。The second host application is executed by the host application on the auxiliary running stack according to the calling instruction sent by the first host application. 11.一种设备,其特征在于,所述设备包括:11. A device, characterized in that the device comprises: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-10中任一所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10. 12.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-10中任一所述的方法。12. A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-10 is implemented.
CN201910172844.7A 2019-03-07 2019-03-07 An instant communication method between boarding applications Pending CN109933444A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910172844.7A CN109933444A (en) 2019-03-07 2019-03-07 An instant communication method between boarding applications
PCT/CN2020/077897 WO2020177731A1 (en) 2019-03-07 2020-03-05 Real-time communication method between hosted applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910172844.7A CN109933444A (en) 2019-03-07 2019-03-07 An instant communication method between boarding applications

Publications (1)

Publication Number Publication Date
CN109933444A true CN109933444A (en) 2019-06-25

Family

ID=66986634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910172844.7A Pending CN109933444A (en) 2019-03-07 2019-03-07 An instant communication method between boarding applications

Country Status (2)

Country Link
CN (1) CN109933444A (en)
WO (1) WO2020177731A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020177731A1 (en) * 2019-03-07 2020-09-10 上海连尚网络科技有限公司 Real-time communication method between hosted applications
CN112565466A (en) * 2021-02-20 2021-03-26 支付宝(杭州)信息技术有限公司 Method and device for cross-application association of users

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011146857A3 (en) * 2010-05-21 2012-04-05 Intel Corporation Method and apparatus for secure scan of data storage device from remote server
CN106598655A (en) * 2016-12-05 2017-04-26 腾讯科技(深圳)有限公司 Application page processing method and apparatus
CN108196930A (en) * 2018-01-18 2018-06-22 腾讯科技(深圳)有限公司 Applied program processing method, device, storage medium and computer equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170337094A1 (en) * 2016-04-08 2017-11-23 Efilecabinet, Inc. Systems, methods, and devices for integrated program interfaces and operation
CN108683700A (en) * 2018-04-03 2018-10-19 四川新网银行股份有限公司 A kind of financial ability output mode based on wechat small routine and finance opening platform
CN109933444A (en) * 2019-03-07 2019-06-25 上海连尚网络科技有限公司 An instant communication method between boarding applications
CN110083465B (en) * 2019-04-26 2021-08-17 上海连尚网络科技有限公司 Data transmission method between boarded applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011146857A3 (en) * 2010-05-21 2012-04-05 Intel Corporation Method and apparatus for secure scan of data storage device from remote server
CN106598655A (en) * 2016-12-05 2017-04-26 腾讯科技(深圳)有限公司 Application page processing method and apparatus
CN108196930A (en) * 2018-01-18 2018-06-22 腾讯科技(深圳)有限公司 Applied program processing method, device, storage medium and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GITZZP: "仿微信小程序多任务栈效果", 《HTTPS://BLOG.CSDN.NET/GITZZP/ARTICLE/DETAILS/54579375》 *
LUCKY_AIMEE: "微信小程序--两个小程序之间携带数据跳转", 《HTTPS://BLOG.CSDN.NET/QQ_39364032/ARTICLE/DETAILS/79820562》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020177731A1 (en) * 2019-03-07 2020-09-10 上海连尚网络科技有限公司 Real-time communication method between hosted applications
CN112565466A (en) * 2021-02-20 2021-03-26 支付宝(杭州)信息技术有限公司 Method and device for cross-application association of users
CN112565466B (en) * 2021-02-20 2021-04-27 支付宝(杭州)信息技术有限公司 Method and device for cross-application association of users

Also Published As

Publication number Publication date
WO2020177731A1 (en) 2020-09-10

Similar Documents

Publication Publication Date Title
WO2021036228A1 (en) File upload method and apparatus, terminal, server, system, and storage medium
WO2020177698A1 (en) Inter-mini program platform communication method and device, and computer storage medium
CN110580244A (en) A file processing method, device, server and storage medium
US20190140982A1 (en) Communication Methods and Systems, Electronic Devices, and Computer Clusters
CN110389936A (en) Method, device and computer storage medium for starting applet
CN114035863B (en) Method, device and apparatus for operating Android applications in Linux system
CN110049118A (en) Information push method, device, equipment and storage medium
CN110377369A (en) A kind of method, equipment and computer storage medium running small routine
WO2020177697A1 (en) Method for discovery between mini program platforms, device, and computer storage medium
CN110287146A (en) Application downloading method, device and computer storage medium
CN112835632B (en) A terminal capability calling method, device and computer storage medium
WO2020177731A1 (en) Real-time communication method between hosted applications
WO2019136685A1 (en) Method and apparatus for network selection by terminal, and computer device and storage medium
CN110083467B (en) Method and device for processing applet message and computer storage medium
CN114020529B (en) Backup method and device for flow table data, network equipment and storage medium
CN107733781B (en) An instant messaging processing method, device and computer storage medium
CN107888478B (en) Voice information forwarding method, device and storage medium during instant messaging
CN110515749B (en) Method, device, server and storage medium for queue scheduling of information transmission
CN114723191A (en) Operation and maintenance method and device and electronic equipment
CN113765972A (en) Data request response method, apparatus, system, server and storage medium
CN117194068A (en) Cross-process data transmission method, system, equipment and storage medium
CN116561013A (en) Test method, device, electronic equipment and medium based on target service framework
US20150134747A1 (en) Managing a messaging queue in an asynchronous messaging system
CN116418829A (en) System processing method, device, equipment and storage medium
CN114490104A (en) Information forwarding method, device, equipment and medium in Android system module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Country or region after: China

Address after: 200120 2, building 979, Yun Han Road, mud town, Pudong New Area, Shanghai

Applicant after: Shanghai Lianshang Network Technology Group Co.,Ltd.

Address before: 200120 2, building 979, Yun Han Road, mud town, Pudong New Area, Shanghai

Applicant before: SHANGHAI LIANSHANG NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20190625

RJ01 Rejection of invention patent application after publication