Inter-process communication method, application server, terminal device, and storage medium
By deploying inter-process communication devices in cloud servers and terminal devices, and utilizing streaming protocols and IPC channels to achieve cross-terminal and same-terminal inter-process communication, the data interaction problem between cloud servers and terminal devices is solved, improving the data transmission security and efficiency of cloud applications and cloud desktops.
Patent Information
- Application Number
- CN202310602642.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-05-24
AI Technical Summary
In the existing technology, there is a lack of effective communication mechanism between the application server of cloud services and third-party applications on terminal devices, which affects the cross-end data interaction capabilities of cloud applications and cloud desktop scenarios.
Inter-process communication devices are deployed in application server and terminal devices. Streaming protocol channels and IPC channels are used to realize cross-terminal and same-terminal inter-process communication. Registration and data transmission are performed through service management module and channel management module, and streaming protocol channels and IPC channels are established as inter-process communication links.
It enables cross-platform data interaction between cloud applications and cloud desktops, with high data transmission security, low resource consumption, and low cost, and provides a unified inter-process communication solution.
Smart Images

Figure CN116610463B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an inter-process communication method, an application server, a terminal device, and a storage medium. Background Art
[0002] For cloud applications and cloud desktops, cloud service functionality requires collaboration between the application server deployed in the cloud and the application client deployed on the terminal device. For example, in a cloud desktop scenario, the cloud desktop client is responsible for receiving and forwarding user input control commands, rendering and displaying images, and other tasks, while the cloud desktop server is responsible for responding to control commands, etc.
[0003] In practice, terminal devices that deploy application clients also deploy several third-party applications. Currently, communication between the cloud service application server and third-party applications on terminal devices is not supported, which affects the cross-terminal data interaction capabilities of cloud applications, cloud desktops, and other scenarios. Summary of the Invention
[0004] Multiple aspects of the present application provide an inter-process communication method, an application server, a terminal device, and a storage medium to meet the needs of cross-terminal data interaction capabilities in scenarios such as cloud applications and cloud desktops.
[0005] An embodiment of the present application provides an inter-process communication method, which is applied to a first inter-process communication device deployed in an application server, the first inter-process communication device including a first service management module and a first channel management module, a streaming protocol channel is established between the application server and an application client deployed in a terminal device, and the application server and the terminal device are also respectively deployed with multiple applications; the method includes: the first service management module forwards a first data transmission request sent by a first application to the first channel management module, the first data transmission request includes first data to be transmitted and an application identifier of a second application, and the first application is one of multiple applications deployed on the application server; the first channel management module queries the registration information in the first service management module based on the application identifier of the second application to obtain an attribution identifier of the second application, the registration information includes an application identifier and an attribution identifier of at least one registered application, and the attribution identifier indicates the deployment location of the corresponding registered application; if the attribution identifier of the second application indicates that the second application is deployed in the terminal device, the first channel management module sends the first data to be transmitted to the second application in the terminal device through the streaming protocol channel.
[0006] An embodiment of the present application also provides an inter-process communication method, which is applied to a second inter-process communication device in a terminal device, the second inter-process communication device includes a second service management module and a second channel management module, and a streaming protocol channel is established between the application server and the application client deployed in the terminal device, and the application server and the terminal device are also respectively deployed with multiple applications; the method includes: the second service management module forwards a second data transmission request sent by a fourth application to the second channel management module, the second data transmission request includes the second data to be transmitted and the application identifier of a fifth application, and the fourth application is one of the multiple applications deployed on the terminal device; the second channel management module queries the registration information in the second service management module according to the application identifier of the fifth application to obtain the attribution identifier of the fifth application; if the attribution identifier of the fifth application indicates that the fifth application is deployed in the application server, the second channel management module sends the second data to be transmitted to the fifth application in the application server through the streaming protocol channel.
[0007] An embodiment of the present application also provides an application server, comprising: a memory and a processor; the memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program to perform the steps in the inter-process communication method.
[0008] An embodiment of the present application also provides a terminal device, comprising: a memory and a processor; the memory is used to store a computer program; the processor is coupled to the memory, and is used to execute the computer program to perform the steps in the inter-process communication method.
[0009] An embodiment of the present application also provides an inter-process communication system, including: an application server and a terminal device, a streaming protocol channel is established between the application server and an application client deployed in the terminal device, the application server and the terminal device are respectively deployed with multiple application programs, the application server is also deployed with a first inter-process communication device, and the terminal device is also deployed with a second inter-process communication device, the first inter-process communication device is used to execute the steps in the inter-process communication method, and the second inter-process communication device is used to execute the steps in the inter-process communication method. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0011] Figure 1 An application scenario diagram provided for an embodiment of the present application;
[0012] Figure 2 A signaling interaction diagram of an inter-process communication method provided in an embodiment of the present application;
[0013] Figure 3 A signaling interaction diagram of another inter-process communication method provided in an embodiment of the present application;
[0014] Figure 4 A schematic diagram of the structure of an inter-process communication device provided in an embodiment of the present application;
[0015] Figure 5 A schematic diagram of the structure of an application server provided in an embodiment of the present application;
[0016] Figure 6 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0018] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the access relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of the present application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship. In addition, in the embodiments of the present application, "first", "second", "third", etc. are only used to distinguish the contents of different objects and have no other special meanings.
[0019] The following are some of the terms involved in the embodiments of this application:
[0020] IPC (Inter Process Communication) refers to the transmission or exchange of information between different processes.
[0021] Cloud applications transform the traditional "local installation and local computing" model of software into a "drop-in, ready-to-use" service. These applications connect to and control remote service clusters via the internet to complete technical logic or computational tasks. Cloud applications do not require installation on local devices; they are installed on cloud devices, significantly reducing the computing power and storage pressure on local devices. Examples of cloud applications include, but are not limited to, cloud gaming applications, cloud rendering applications, live streaming applications, and video playback applications.
[0022] Cloud desktop, also known as cloud computing, is a comprehensive service solution that includes cloud resources, transmission protocols, and cloud terminals. Using open cloud terminals and transmission protocols, desktops, applications, hardware, and other resources are provided to users on an on-demand, flexibly allocated basis.
[0023] Streaming protocol: A communication protocol that provides data interaction between the cloud and the terminal for streaming services. Examples of streaming protocols include, but are not limited to, ASP (Adaptive Streaming Protocol). The ASP protocol runs on the TCP (Transmission Control Protocol) / UDP (User Datagram Protocol) network protocol. Leveraging current efficient encoding and decoding technologies, it encodes the graphical interactive interface on the cloud and streams it to the client. The client then decodes and displays the graphical interface. The ASP protocol uses virtual transmission channel technology to redirect client-side peripheral events such as the mouse and keyboard to the server, thereby enabling interactive event input between the terminal and the cloud.
[0024] Streaming protocol channel: refers to the transmission channel established based on the streaming protocol.
[0025] Streaming service: A technology that uses streaming technology to bring cloud computing and interactive capabilities to devices. Users can use streaming services on their devices to operate and use cloud desktops and applications, expanding local computing capabilities and software ecosystems.
[0026] Application Server: refers to the server that provides application services. Application services include, but are not limited to, cloud gaming services, cloud desktop services, cloud editing services, and cloud rendering services.
[0027] Application client: refers to the client corresponding to the application service, responsible for interacting with the user and requesting access to the application server, etc.
[0028] Third-party application: refers to an application program (Application, App) provided by a third-party service provider. In this embodiment, the third-party service provider refers to a service provider other than the service provider that provides the application service of the application server.
[0029] In practice, the terminal devices where the application client is deployed also have several third-party applications installed. Currently, communication between the cloud service application server and the third-party applications on the terminal devices is not supported, which affects the cross-terminal data interaction capabilities of cloud applications, cloud desktops, and other scenarios.
[0030] Based on this, an embodiment of the present application provides an inter-process communication method, an application server, a terminal device, and a storage medium. In an embodiment of the present application, the application server, with the assistance of an inter-process communication device, uses a streaming protocol channel between the application server and the application client in the terminal device as a cross-end inter-process communication link, so that the application in the application server can communicate with the application in the terminal device, providing cross-end data interaction capabilities for cloud applications, cloud desktops, and other scenarios, with better security of data transmission, less resource consumption, and lower cost. Further optionally, the application server, with the assistance of an inter-process communication device, uses an IPC channel as a same-end inter-process communication link to achieve communication between applications in the application server, providing same-end data interaction capabilities for cloud applications, cloud desktops, and other scenarios, with better security of data transmission, less resource consumption, and lower cost.
[0031] Figure 1 This is an application scenario diagram provided by the embodiment of this application. Figure 1 Both the terminal device and the application server are equipped with an inter-process communication device. An inter-process communication device refers to a device that provides inter-process communication capabilities and can be composed of software and / or hardware. In the embodiment of the present application, the inter-process communication device includes a service management module and a channel management module. The service management module is used for registration management, security protection, permission management, and providing a data transmission and reception interface; the channel management module is used for data transmission and reception and channel management.
[0032] In an embodiment of the present application, an application can request the service management module in the environment in which it is deployed (terminal device or application server) to register it. The registered application has the authority to communicate with other applications using the inter-process communication device. In addition, the service management module provides a data transceiver interface (also understood as a communication interface) for the registered application, and receives and sends data related to the registered application through the transceiver interface. The service management module can also provide security protection for the registered application, for example, encrypting the relevant data of the registered application received through the transceiver interface, etc.
[0033] In the embodiment of the present application, the channel management module has the ability to send and receive data, and determines whether to use the streaming protocol channel or the IPC channel for data transmission through the channel management capability.
[0034] For example, two third-party applications, App1 and App2, are deployed on the terminal device. The service management module of the terminal device registers App1 and App2 and saves the registration information of App1 and App2 locally. The registration information of the application registered on the terminal device includes the application identifier and the attribution identifier of the registered application. If the application is registered by the service management module on the terminal device side, the attribution identifier of the application indicates that the application is deployed on the terminal device. For example, the attribution identifier of App1 indicates that App1 is deployed on the terminal device; the attribution identifier of App2 indicates that App2 is deployed on the terminal device. In addition, the terminal device also forwards the registration information of App1 and App2 to the application server through the streaming channel between the application client and the application server; the service management module on the application server saves the registration information of App1 and App2 that have been registered on the terminal device.
[0035] For example, two third-party applications, App3 and App4, are deployed on the application server. The service management module of the application server registers App3 and App4 and saves the registration information of App3 and App4 locally. The registration information of the application registered on the application server includes the application identifier and the attribution identifier of the registered application. If the application is registered by the service management module of the application server, the attribution identifier of the application indicates that the application is deployed on the application server. For example, the attribution identifier of App3 indicates that App3 is deployed on the terminal device; the attribution identifier of App4 indicates that App4 is deployed on the terminal device. In addition, the application server also forwards the registration information of App3 and App4 to the terminal device through the streaming channel between the application client and the application server; the service management module of the terminal device saves the registration information of App3 and App4 that have been registered on the application server.
[0036] For example, the application server is a cloud desktop server, the application client is a cloud desktop client, a streaming protocol channel is established between the cloud desktop client and the cloud desktop server, the terminal device that deploys the cloud desktop client also deploys two third-party applications, App1 and App2, and two third-party applications, App3 and App4, are deployed on the application server. If App1 of the terminal device wants to transmit data to App2 of the terminal device, the service management module of the terminal device receives the data to be transmitted and the application identifier of App2 sent by App1 through the transceiver interface, and the service management module of the terminal device sends the data to be transmitted and the application identifier of App2 sent by App1 to the channel management module of the terminal device. The channel management module of the terminal device queries the registration information saved by the service management module of the terminal device based on the application identifier of App2, and determines that App2 is deployed on the terminal device. Then, the channel management module of the terminal device sends the data to be transmitted sent by App1 to App2 in the terminal device through the IPC channel between App2.
[0037] If App1 on a terminal device wants to transmit data to App3 on an application server, the terminal device's service management module receives the data to be transmitted and the application identifier of App2 via the transceiver interface. The service management module then sends the data to be transmitted and the application identifier of App3 to the terminal device's channel management module. Based on App3's application identifier, the channel management module queries the registration information stored in the terminal device's service management module and determines that App3 is deployed on the application server. The channel management module then transmits the data to be transmitted from App1 to the application server via a streaming channel, allowing the application server to send the data to be transmitted from App1 to App3 on the application server.
[0038] By analogy, the inter-process communication device of the terminal device can use the IPC channel to realize communication between applications in the terminal device; the inter-process communication device of the application server can use the IPC channel to realize communication between applications in the application server; the inter-process communication device of the terminal device can use the streaming protocol channel to realize communication between the application of the terminal device and the application in the application server; the inter-process communication device of the application server can use the streaming protocol channel to realize communication between the application in the application server and the application of the terminal device.
[0039] In this embodiment, the inter-process communication device provides cross-end inter-process communication capabilities and same-end inter-process communication capabilities. With the support of cross-end inter-process communication capabilities, the streaming protocol channel between the application server and the application client in the terminal device is used as the cross-end inter-process communication link to enable communication between the application in the application server and the application in the terminal device. With the support of the same-end inter-process communication capabilities, the IPC channel is used as the same-end inter-process communication link to enable communication between applications in the application server and between applications in the terminal device. The inter-process communication device integrates the streaming protocol and the traditional IPC technology, which can not only take into account the traditional IPC communication of the application in the deployment environment, but also provide cross-end inter-process communication capabilities, providing a unified inter-process communication solution for cloud desktops, cloud applications and cloud-native applications.
[0040] It should be noted that Figure 1 The application scenario shown is only an exemplary application scenario, and the present application embodiment does not limit the application scenario. Figure 1 The equipment included in the Figure 1 The positional relationship between the devices is limited.
[0041] In the embodiments of the present application, the terminal device can interact with the application server through a wired network or a wireless network. For example, the wired network can include coaxial cables, twisted pairs, and optical fibers, and the wireless network can be a 2G (2nd Generation, 2nd Generation) network, a 3G (3rd Generation, 3rd Generation) network, a 4G (4th Generation, 4th Generation) network, or a 5G (5th Generation, 5th Generation) network, a Wireless Fidelity (WIFI) network, etc. The present application does not limit the specific type or form of interaction, as long as it can realize the functions of the terminal device and the application server.
[0042] Among them, terminal devices include, for example, mobile phones, tablet computers, desktop computers, wearable smart devices, smart home devices, etc. The application server can be hardware or software. When the application server is hardware, the application server can be a single server, a distributed server cluster consisting of multiple servers, or a cloud server. When the application server is software, it can be multiple software modules or a single software module, etc., and the embodiments of the present application are not limited thereto.
[0043] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.
[0044] In embodiments of the present application, an inter-process communication device can be deployed on the application server. This device can provide cross-end inter-process communication capabilities. With the support of this cross-end inter-process communication capability, a streaming protocol channel between the application server and the application client on the terminal device can be used as a cross-end inter-process communication link to enable communication between applications on the application server and applications on the terminal device. For example, third-party applications such as cloud gaming applications deployed on the cloud desktop server can transmit data to social applications deployed on the terminal device.
[0045] Based on this, an embodiment of the present application provides an inter-process communication method, which can be executed by an inter-process communication device deployed in an application server. For ease of understanding and distinction, the inter-process communication device deployed in the application server is referred to as a first inter-process communication device, the service management module included in the first inter-process communication device is referred to as a first service management module, and the channel management module included in the first inter-process communication device is referred to as a first channel management module. A streaming protocol channel is established between the application server and the application client deployed in the terminal device, and the application server and the terminal device are also respectively deployed with multiple applications. The service provider of the application can be a service provider that provides application services on the application server, or it can be other service providers (i.e., third-party service providers), and there is no restriction on this.
[0046] In this embodiment, any application among the multiple applications deployed on the application server needs to first register with the inter-process communication device on the application server before it has the authority to communicate with other applications using the inter-process communication device. For ease of understanding and distinction, any application among the multiple applications deployed on the application server is referred to as a first application. As an example, the first application sends a registration request to the first inter-process communication device on the application server. The first service management module in the first inter-process communication device receives the registration request of the first application, registers the first application, and saves the registration information of the first application. The registration information of the first application includes the application identifier of the first application and the attribution identifier indicating that the first application is deployed in the application server.
[0047] In actual applications, applications registered with the first inter-process communication device can be considered applications deployed by the application server. Applications not registered with the first inter-process communication device can be considered unregistered applications deployed by the application server, or applications deployed on the terminal device, without limitation.
[0048] Further optionally, to accurately distinguish the deployment environment to which an application belongs and improve the reliability of inter-process communication, the first service management module in the first inter-process communication device receives the application identifier of a registered third application sent by the terminal device through a streaming protocol channel between the application server and the application client in the terminal device, and saves the registration information of the third application. The registration information of the third application includes the application identifier of the third application and an identifier indicating the deployment of the third application in the terminal device. The third application refers to any application deployed in the terminal device and registered with the inter-process communication device on the terminal device.
[0049] In actual applications, the terminal device can send registration notification information to the application server, and the registration notification information includes the application identifier of the application that has been registered by the inter-process communication device on the terminal device. The first service management module in the application server locally saves the application identifier of the application that has been registered by the inter-process communication device on the terminal device and the attribution identifier indicating that the application is deployed in the terminal device based on the registration notification information.
[0050] In actual applications, the terminal device can also directly send the registration information of the application that has been registered with the inter-process communication device on the terminal device to the application server. The first service management module in the application server locally saves the registration information of the application that has been registered with the inter-process communication device on the terminal device, and there is no restriction on this.
[0051] In this embodiment, after the application deployed on the application server registers with the inter-process communication device on the application server, the application deployed on the application server has the authority to communicate with other applications using the inter-process communication device. Figure 2 The signaling interaction diagram shown in the figure describes the process of communication between applications deployed on the application server and other applications.
[0052] Figure 2 This is a signaling interaction diagram of an inter-process communication method provided in an embodiment of the present application. Figure 2 , the method may include the following steps:
[0053] 201. A first application sends a first data transmission request to a first service management module. The first data transmission request includes first data to be transmitted and an application identifier of a second application.
[0054] Specifically, for any first application among multiple applications deployed on the application server, the first application sends a data transmission request to a first service management module in a first inter-process communication device on the application server. The data transmission request indicates the data to be transmitted by the first application and the application identifier of the application to receive the data to be transmitted. Herein, the data transmission request sent by the first application is referred to as the first data transmission request, the data to be transmitted by the first application is referred to as the first data to be transmitted, and the application to receive the data to be transmitted by the first application is referred to as the second application.
[0055] 202. The first service management module sends a first data transmission request to the first channel management module.
[0056] 203. The first channel management module queries the registration information in the first service management module according to the application identifier of the second application to obtain the attribution identifier of the second application.
[0057] In this embodiment, after receiving the first data transmission request from the first application, the first service management module forwards the first data transmission request to the first channel management module. The first channel management module queries the registration information in the first service management module based on the application identifier of the second application to obtain the attribution identifier of the second application.
[0058] In this embodiment, the registration information saved by the first service management module includes the application identifier and the attribution identifier of at least one registered application. The attribution identifier indicates the deployment location of the corresponding registered application, that is, indicates whether the corresponding registered application is deployed on the application server or the terminal device.
[0059] 204. If the attribution identifier of the second application indicates that the second application is deployed in the terminal device, the first channel management module sends the first data to be transmitted to the second application in the terminal device through the streaming protocol channel.
[0060] Optionally, the inter-process communication device can also provide the inter-process communication capability of the same end. With the support of the inter-process communication capability of the same end, the IPC channel is used as the inter-process communication link of the same end to realize the communication between the applications in the application server. Based on this, see Figure 2 , the above method may further include:
[0061] Step 205: If the attribution identifier of the second application indicates that the second application is deployed in the application server, the first channel management module sends the first data to be transmitted to the second application in the application server through the IPC channel between the first channel management module and the second application.
[0062] In the inter-process communication method provided in the embodiment of the present application, the application server, with the assistance of the inter-process communication device, uses the streaming protocol channel between the application server and the application client in the terminal device as a cross-end inter-process communication link, so that the application in the application server can communicate with the application in the terminal device, providing cross-end data interaction capabilities for cloud applications, cloud desktops, and other scenarios, with better data transmission security, less resource consumption, and lower cost. Further optionally, the application server, with the assistance of the inter-process communication device, uses the IPC channel as the same-end inter-process communication link to achieve communication between applications in the application server, providing same-end data interaction capabilities for cloud applications, cloud desktops, and other scenarios, with better data transmission security, less resource consumption, and lower cost.
[0063] In practice, the same application may be deployed only on the terminal device, only on the application server, or on both the terminal device and the application server. For example, the same social networking application may be deployed on both the cloud desktop server and the terminal device. Thus, the first channel management module may retrieve one or two attribution identifiers for the second application. Herein, the attribution identifier indicating that the second application is deployed on the terminal device is referred to as the first attribution identifier, and the attribution identifier indicating that the second application is deployed on the application server is referred to as the second attribution identifier.
[0064] Further optionally, to improve the reliability of inter-process communication and reduce resource consumption caused by cross-terminal communication, after the first channel management module queries the attribution identifier of the second application, it determines whether the number of attribution identifiers of the second application is one or two; if the attribution identifier of the second application is one, and the attribution identifier of the second application is the first attribution identifier, and the first attribution identifier indicates that the second application is deployed in the terminal device, then the first data to be transmitted is sent to the second application in the terminal device. If the attribution identifier of the second application is one, and the attribution identifier of the second application is the second attribution identifier, and the second attribution identifier indicates that the second application is deployed in the application server, then the first channel management module sends the first data to be transmitted to the second application in the application server via the inter-process communication (IPC) channel between the first channel management module and the second application. If the attribution identifier of the second application is two, and the attribution identifiers of the second application include the first attribution identifier and the second attribution identifier, then the first channel management module selects the second attribution identifier from the first attribution identifier and the second attribution identifier; and based on the second attribution identifier, the first channel management module sends the first data to be transmitted to the second application in the application server via the IPC channel between the first channel management module and the second application.
[0065] It is understandable that, in the case where both the application server and the terminal device deploy the second application, the first application gives priority to communicating with the second application on the same end to reduce the resource consumption caused by cross-end communication. Of course, the first application can also give priority to communicating with the second application across ends, and there is no restriction on this. Further optionally, it is also possible to support the first application to give priority to communicating with the second application on the same end, and in the case of confirming that the transmission of the first data to be transmitted to the second application on the same end fails, the first data to be transmitted can also be transmitted to the second application across ends to ensure the reliability of the application performance of the first application. Based on this, if the first channel management module confirms that the transmission of the first data to be transmitted fails, the first channel management module sends the first data to be transmitted to the second application in the terminal device through the streaming protocol channel according to the first attribution identifier.
[0066] In actual applications, after the first channel management module sends the first data to be transmitted to the second application on the application server through the IPC channel between the first channel management module and the second application based on the second attribution identifier, if the first channel management module receives a response message returned by the second application on the application server within a specified time, the first channel management module confirms that the first data to be transmitted has been successfully transmitted. If the first channel management module does not receive a response message returned by the second application on the application server within the specified time, the first channel management module confirms that the first data to be transmitted has failed.
[0067] In some optional embodiments, an inter-process communication device may be deployed in the terminal device. This inter-process communication device can provide cross-end inter-process communication capabilities. With the support of this cross-end inter-process communication capability, a streaming protocol channel between the application server and the application client in the terminal device can be used as a cross-end inter-process communication link to enable communication between applications in the terminal device and applications in the application server. For example, a social networking application deployed in the terminal device can transmit data to a third-party application, such as a cloud gaming application, deployed in the cloud desktop server.
[0068] Based on this, an embodiment of the present application provides an inter-process communication method, which can be executed by an inter-process communication device deployed in a terminal device. For ease of understanding and distinction, the inter-process communication device deployed in the terminal device is referred to as a second inter-process communication device, the service management module included in the second inter-process communication device is referred to as a second service management module, and the channel management module included in the second inter-process communication device is referred to as a second channel management module. A streaming protocol channel is established between an application server and an application client deployed in the terminal device, and the application server and the terminal device are also each deployed with multiple applications.
[0069] In this embodiment, any application among the multiple applications deployed on a terminal device must first register with the inter-process communication device on the terminal device before it is authorized to communicate with other applications using the inter-process communication device. For ease of understanding and distinction, any application among the multiple applications deployed on the terminal device is referred to herein as a fourth application. As an example, the fourth application sends a registration request to the second inter-process communication device of the terminal device. The second service management module in the second inter-process communication device receives the registration request from the fourth application, registers the fourth application, and saves the registration information of the fourth application. The registration information of the fourth application includes the application identifier of the fourth application and an attribution identifier indicating that the fourth application is deployed on the terminal device.
[0070] In actual applications, applications registered with the second inter-process communication device can be considered as applications deployed by the terminal device. Applications not registered with the second inter-process communication device can be considered as unregistered applications deployed by the terminal device, or as applications deployed on the application server, without limitation.
[0071] Further optionally, to accurately distinguish the deployment environment to which an application belongs and improve the reliability of inter-process communication, the second service management module in the second inter-process communication device receives the application identifier of a registered sixth application sent by the application server through a streaming protocol channel between the application server and the application client in the terminal device, and saves the registration information of the sixth application. The registration information of the sixth application includes the application identifier of the sixth application and an identifier indicating that the sixth application is deployed on the application server. The sixth application refers to any application deployed on the application server and registered with the inter-process communication device on the application server.
[0072] In actual applications, the application server can send registration notification information to the terminal device. The registration notification information includes the application identifier of the application that has been registered by the inter-process communication device on the application server. The second service management module in the terminal device locally saves the application identifier of the application that has been registered by the inter-process communication device on the application server and the attribution identifier indicating that the application is deployed in the application server based on the registration notification information.
[0073] In actual applications, the application server can also directly send the registration information of the application that has been registered with the inter-process communication device on the application server to the terminal device. The second service management module in the terminal device locally saves the registration information of the application that has been registered with the inter-process communication device on the application server. There is no restriction on this.
[0074] In this embodiment, after the application deployed on the terminal device has registered with the inter-process communication device on the terminal device, the application deployed on the terminal device has the authority to communicate with other applications using the inter-process communication device. Figure 3 The signaling interaction diagram shown introduces the process of communication between applications deployed on a terminal device and other applications.
[0075] Figure 3 This is a signaling interaction diagram of another inter-process communication method provided in an embodiment of the present application. Figure 3 , the method may include the following steps:
[0076] 301. A fourth application sends a second data transmission request to a second service management module. The second data transmission request includes second data to be transmitted and an application identifier of a fifth application.
[0077] Specifically, for any fourth application among the multiple applications deployed on the terminal device, the fourth application sends a data transmission request to the second service management module in the second inter-process communication device of the terminal device. The data transmission request indicates the data to be transmitted by the fourth application and the application identifier of the application to receive the data to be transmitted. Herein, the data transmission request sent by the fourth application is referred to as a second data transmission request, the data to be transmitted by the fourth application is referred to as second data to be transmitted, and the application receiving the data to be transmitted by the second application is referred to as a fifth application.
[0078] 302. The second service management module sends a second data transmission request to the second channel management module.
[0079] 303. The second channel management module queries the registration information in the second service management module according to the application identifier of the fifth application to obtain the attribution identifier of the fifth application.
[0080] In this embodiment, after receiving the second data transmission request from the fourth application, the second service management module forwards the second data transmission request to the second channel management module. The second channel management module queries the registration information in the second service management module based on the application identifier of the fifth application to obtain the attribution identifier of the fifth application.
[0081] In this embodiment, the registration information stored by the second service management module includes an application identifier and an attribution identifier of at least one registered application program. The attribution identifier indicates whether the corresponding registered application program is deployed in an application server or a terminal device.
[0082] 304. If the attribution identifier of the fifth application program indicates that the fifth application program is deployed in the application server, the second channel management module sends the second data to be transmitted to the fifth application program in the application server through the streaming protocol channel.
[0083] Optionally, the inter-process communication device can also provide the same-end inter-process communication capability. With the support of the same-end inter-process communication capability, the IPC channel is used as the same-end inter-process communication link to realize the communication between applications in the terminal device. Figure 3 , the above method may further include:
[0084] 305. If the attribution identifier of the fifth application indicates that the fifth application is deployed in the terminal device, the second channel management module sends the second data to be transmitted to the fifth application in the terminal device through the IPC channel between the second channel management module and the fifth application.
[0085] In the inter-process communication method provided in the embodiment of the present application, the terminal device, with the assistance of the inter-process communication device, uses the streaming protocol channel between the application server and the application client in the terminal device as a cross-end inter-process communication link, so that the application in the terminal device can communicate with the application in the application server, providing cross-end data interaction capabilities for cloud applications, cloud desktops, and other scenarios, with good data transmission security, low resource consumption, and low cost. Further optionally, the terminal device, with the assistance of the inter-process communication device, uses the IPC channel as the same-end inter-process communication link to achieve communication between applications in the terminal device, providing same-end data interaction capabilities for cloud applications, cloud desktops, and other scenarios, with good data transmission security, low resource consumption, and low cost.
[0086] In practice, the same application may be deployed only on the terminal device, only on the application server, or on both the terminal device and the application server. For example, the same social networking application may be deployed on both the cloud desktop server and the terminal device. Thus, the attribution identifier for the fifth application retrieved by the second channel management module may be one or two. Here, the attribution identifier indicating that the second application is deployed on the application server is referred to as the third attribution identifier, and the attribution identifier indicating that the fifth application is deployed on the terminal device is referred to as the fourth attribution identifier.
[0087] Further optionally, to improve the reliability of inter-process communication and reduce resource consumption caused by cross-terminal communication, after querying the affiliation identifier of the fifth application, the second channel management module determines whether the fifth application has one or two affiliation identifiers. If the fifth application has one affiliation identifier and the affiliation identifier is the third affiliation identifier, indicating that the fifth application is deployed on the application server, the second channel management module executes a step of sending the second data to be transmitted to the fifth application on the application server via a streaming protocol channel. If the fifth application has one affiliation identifier and the affiliation identifier is the fourth affiliation identifier, the second channel management module executes a step of sending the second data to be transmitted to the fifth application on the terminal device via an IPC channel between the second channel management module and the fifth application. If the fifth application has two affiliation identifiers and the affiliation identifiers include the third and fourth affiliations, the second channel management module selects a fourth affiliation identifier from the third and fourth affiliations, indicating that the fifth application is deployed on the terminal device. The second channel management module sends the second data to be transmitted to the fifth application on the terminal device via the IPC channel between the second channel management module and the fifth application based on the fourth affiliation identifier.
[0088] It is understandable that, when the fifth application is deployed on both the application server and the terminal device, the fourth application gives priority to communicating with the fifth application on the same end to reduce the resource consumption caused by cross-end communication. Of course, the fourth application can also give priority to communicating with the fifth application across ends, and there is no restriction on this. Further optionally, it is also possible to support the fourth application to give priority to communicating with the fifth application on the same end, and in the case of confirming that the transmission of the first data to be transmitted to the fifth application on the same end fails, the second data to be transmitted can also be transmitted to the fifth application across ends to ensure the reliability of the application performance of the fourth application. Based on this, if the second channel management module confirms that the transmission of the second data to be transmitted has failed, the second channel management module sends the second data to be transmitted to the fifth application in the application server through the streaming protocol channel according to the third attribution identifier.
[0089] In actual applications, after the second channel management module sends the second data to be transmitted to the fifth application on the application server side through the IPC channel between the second channel management module and the fifth application based on the fourth attribution identifier, if the second channel management module receives a response message returned by the fifth application on the application server side within a specified time, the second channel management module confirms that the second data to be transmitted has been successfully transmitted. If the second channel management module does not receive a response message returned by the fifth application on the application server side within the specified time, the second channel management module confirms that the second data to be transmitted has failed.
[0090] In actual applications, the utilization rate of the central processing unit (CPU) of the terminal device may be high, the utilization rate of the graphics processing unit (GPU) may be high, or the available memory capacity may be small, resulting in a small amount of current remaining resources of the terminal device, that is, the current remaining resources of the central processing unit, the current remaining resources of the graphics processing unit, or the current remaining resources of the memory. When the current remaining resources of the terminal device are small, the fifth application on the terminal device may not be able to process the data to be transmitted of the fourth application on the terminal device in a timely manner, which may affect the application performance of the fourth application. Considering that the hardware configuration of the application server is usually high, at this time, the fifth application on the application server can be used to process the data to be transmitted of the fourth application on the terminal device in a timely manner, thereby ensuring the reliability of the application performance of the fourth application.
[0091] Therefore, further optionally, when the second channel management module selects the fourth attribution identifier from the third attribution identifier and the fourth attribution identifier, the second channel management module determines whether the current remaining resource amount of the terminal device meets the preset condition; if the current remaining resource amount of the terminal device meets the preset condition, the second channel management module selects the fourth attribution identifier from the third attribution identifier and the fourth attribution identifier. If the current remaining resource amount of the terminal device does not meet the preset condition, the second channel management module selects the third attribution identifier from the third attribution identifier and the fourth attribution identifier; and the second channel management module sends the second data to be transmitted to the fifth application in the application server through the streaming protocol channel based on the third attribution identifier.
[0092] In this embodiment, flexible preset conditions can be set as needed. If the current remaining resources of the terminal device meet the preset conditions, it means that the current remaining resources of the terminal device are relatively sufficient. If the current remaining resources of the terminal device do not meet the preset conditions, it means that the current remaining resources of the terminal device are relatively tight.
[0093] It is worth noting that the inter-process communication device can be deployed in the application server, the terminal device, or both the application server and the terminal device. The inter-process communication device can be deployed in the application, or as an application in the operating system of the application server or the terminal device, or as a software module of the operating system, without limitation.
[0094] The embodiment of the present application also provides an inter-process communication system, including: an application server and a terminal device, wherein a streaming protocol channel is established between the application server and an application client deployed in the terminal device, wherein the application server and the terminal device are respectively deployed with multiple application programs, the application server is further deployed with a first inter-process communication device, and the terminal device is further deployed with a second inter-process communication device, wherein the first inter-process communication device is used to execute the steps in the inter-process communication method, and the second inter-process communication device is used to execute the steps in the inter-process communication method. For a detailed description of the execution of the steps in the inter-process communication method by the first inter-process communication device in the application server, please refer to the aforementioned content, and for a detailed description of the execution of the steps in the inter-process communication method by the second inter-process communication device in the terminal device, please refer to the aforementioned content.
[0095] Figure 4 This is a schematic diagram of the structure of an inter-process communication device provided in an embodiment of the present application. The inter-process communication device may include a service management module 41 and a channel management module 42. When the inter-process communication device is deployed in an application server, the device may be referred to as a first inter-process communication device. The service management module 41 in the first inter-process communication device is referred to as a first service management module, and the channel management module 42 in the first inter-process communication device is referred to as a first channel management module.
[0096] Specifically, a streaming protocol channel is established between the application server and the application client deployed in the terminal device, and the application server and the terminal device are also respectively deployed with multiple applications;
[0097] a first service management module, configured to forward a first data transmission request sent by a first application to the first channel management module, wherein the first data transmission request includes first data to be transmitted and an application identifier of a second application, where the first application is one of multiple applications deployed on the application server;
[0098] a first channel management module, configured to query registration information in the first service management module based on an application identifier of the second application to obtain an attribution identifier of the second application, the registration information including an application identifier and an attribution identifier of at least one registered application, the attribution identifier indicating a deployment location of the corresponding registered application;
[0099] If the attribution identifier of the second application indicates that the second application is deployed in the terminal device, the first channel management module is configured to send the first data to be transmitted to the second application in the terminal device through the streaming protocol channel.
[0100] Further optionally, if the attribution identifier of the second application indicates that the second application is deployed in the application server, the first channel management module is used to send the first data to be transmitted to the second application in the application server through the inter-process communication IPC channel between the second application.
[0101] Further optionally, if the attribution identifier of the second application indicates that the second application is deployed in the terminal device, then before the first channel management module sends the first data to be transmitted to the second application in the terminal device through the streaming protocol channel, it is also used to: determine whether the number of attribution identifiers of the second application is 1 or 2; if the attribution identifier of the second application is 1, and the attribution identifier of the second application is the first attribution identifier, and the first attribution identifier indicates that the second application is deployed in the terminal device, then the step of the first channel management module sending the first data to be transmitted to the second application in the terminal device through the streaming protocol channel is executed.
[0102] Further optionally, if the second application has two attribution identifiers, and the attribution identifiers of the second application include a first attribution identifier and a second attribution identifier, the first channel management module is also used to: select the second attribution identifier from the first attribution identifier and the second attribution identifier, the second attribution identifier indicating that the second application is deployed in the application server; and send the first data to be transmitted to the second application in the application server through the IPC channel between the second application according to the second attribution identifier.
[0103] Further optionally, after the first channel management module sends the first data to be transmitted to the second application in the application server through the IPC channel between the first channel management module and the second application according to the second affiliation identifier, it is also used to: if the first channel management module confirms that the transmission of the first data to be transmitted has failed, the first channel management module sends the first data to be transmitted to the second application in the terminal device through the streaming protocol channel according to the first affiliation identifier.
[0104] Further optionally, before the first service management module receives the first data transmission request sent by the first application, the first service management module is also used to: register the first application according to the registration request of the first application, and save the registration information of the first application, the registration information of the first application includes the application identifier of the first application and the attribution identifier indicating that the first application is installed in the application server; also receive the application identifier of the registered third application sent by the terminal device, and save the registration information of the third application, the registration information of the third application includes the application identifier of the third application and the attribution identifier indicating that the third application is deployed in the terminal device.
[0105] In some optional embodiments, Figure 4The inter-process communication device shown is deployed in a terminal device, which can be referred to as a second inter-process communication device. The service management module 41 in the second inter-process communication device is referred to as a second service management module, and the channel management module 42 in the second inter-process communication device is referred to as a second channel management module.
[0106] Specifically, a streaming protocol channel is established between the application server and the application client deployed in the terminal device, and the application server and the terminal device are also respectively deployed with multiple application programs.
[0107] a second service management module, configured to forward a second data transmission request sent by a fourth application to the second channel management module, the second data transmission request including second data to be transmitted and an application identifier of a fifth application, the fourth application being one of multiple applications deployed on the terminal device;
[0108] The second channel management module is configured to query the registration information in the second service management module according to the application identifier of the fifth application to obtain the attribution identifier of the fifth application;
[0109] If the attribution identifier of the fifth application program indicates that the fifth application program is deployed in the application server, the second channel management module is configured to send the second data to be transmitted to the fifth application program in the application server through the streaming protocol channel.
[0110] Further optionally, if the attribution identifier of the fifth application indicates that the fifth application is deployed in the terminal device, the second channel management module is used to: send the second data to be transmitted to the fifth application in the terminal device through the IPC channel between the fifth application.
[0111] Further optionally, if the attribution identifier of the fifth application indicates that the fifth application is deployed in the application server, then before the second channel management module sends the second data to be transmitted to the fifth application in the application server through the streaming protocol channel, it is also used to: determine whether the number of attribution identifiers of the fifth application is 1 or 2; if the number of attribution identifiers of the fifth application is 1, and the attribution identifier of the fifth application is the third attribution identifier, and the third attribution identifier indicates that the fifth application is deployed in the application server, then the step of the second channel management module sending the second data to be transmitted to the fifth application in the application server through the streaming protocol channel is executed.
[0112] Further optionally, if the number of attribution identifiers of the fifth application is 2, and the attribution identifiers of the fifth application include a third attribution identifier and a fourth attribution identifier, the second channel management module selects the fourth attribution identifier from the third attribution identifier and the fourth attribution identifier, and the fourth attribution identifier indicates that the fifth application is deployed in the terminal device; the second channel management module sends the second data to be transmitted to the fifth application in the terminal device through the IPC channel between the fifth application and the fourth attribution identifier.
[0113] Further optionally, when the second channel management module selects the fourth affiliation identifier from the third affiliation identifier and the fourth affiliation identifier, it is specifically used to: the second channel management module determines whether the current remaining resource amount of the terminal device meets the preset conditions; if the current remaining resource amount of the terminal device meets the preset conditions, the second channel management module selects the fourth affiliation identifier from the third affiliation identifier and the fourth affiliation identifier.
[0114] Further optionally, the second channel management module is also used to: if the current remaining resource amount of the terminal device does not meet the preset conditions, the second channel management module selects the third affiliation identifier from the third affiliation identifier and the fourth affiliation identifier; the second channel management module sends the second data to be transmitted to the fifth application in the application server through the streaming protocol channel according to the third affiliation identifier.
[0115] For the above embodiment Figure 4 The specific manner in which each module and unit of the device performs operations has been described in detail in the embodiment of the method and will not be elaborated here.
[0116] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. In addition, in some processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or in parallel. They are only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.
[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0118] Figure 5 This is a schematic diagram of the structure of an application server provided in an embodiment of the present application. Figure 5 As shown, the application server includes: a memory 51 and a processor 52;
[0119] The memory 51 is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.
[0120] The memory 51 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0121] The processor 52 is coupled to the memory 51 and is configured to execute the computer program in the memory 51 to perform the steps in the inter-process communication method.
[0122] Further optional, such as Figure 5 As shown, the application server also includes: a communication component 53, a display 54, a power component 55, an audio component 56 and other components. Figure 5 Only some components are shown schematically, which does not mean that the application server only includes Figure 5 In addition, Figure 5 The components in the dotted box are optional components, not mandatory components, and the specific components depend on the product form of the application server.
[0123] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 6 As shown, the application server includes: a memory 61 and a processor 62;
[0124] The memory 61 is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc.
[0125] The memory 61 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0126] The processor 62 is coupled to the memory 61 and is configured to execute the computer program in the memory 61 to perform the steps in the inter-process communication method.
[0127] Further optional, such as Figure 6 As shown, the terminal device also includes: a communication component 63, a display 64, a power component 65, an audio component 66 and other components. Figure 6 Only some components are shown schematically, which does not mean that the terminal device only includes Figure 6 In addition, Figure 6 The components in the dotted box are optional components, not mandatory components, and the specific components may depend on the product form of the terminal device.
[0128] The detailed implementation process of the processor executing each action can be found in the relevant description in the aforementioned method embodiment or device embodiment, and will not be repeated here.
[0129] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps in the above method embodiment that can be executed by the application server or terminal device.
[0130] Accordingly, an embodiment of the present application also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the processor is enabled to implement the steps in the above method embodiment that can be executed by the application server or terminal device.
[0131] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi (Wireless Fidelity), 2G (2 Generation, 2 Generation), 3G (3 Generation, 3 Generation), 4G (4 Generation, 4 Generation) / LTE (Long Term Evolution), 5G (5 Generation, 5 Generation) and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies.
[0132] The above-mentioned display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundary of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0133] The power supply assembly provides power to various components of the device in which the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly is located.
[0134] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as call mode, recording mode, and voice recognition mode, the microphone is configured to receive external audio signals. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0135] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0136] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0137] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0139] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.
[0140] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0141] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, Phase Change RAM (PRAM), Static Random-Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), flash memory or other memory technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0142] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0143] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. An inter-process communication method, characterized in that: The method is applied to a first inter-process communication device deployed in an application server, the first inter-process communication device including a first service management module and a first channel management module, wherein a streaming protocol channel is established between the application server and an application client deployed in a terminal device, wherein the application server and the terminal device are respectively deployed with multiple application programs; and the method includes: The first service management module forwards a first data transmission request sent by a first application to the first channel management module, where the first data transmission request includes first data to be transmitted and an application identifier of a second application, where the first application is one of multiple applications deployed on the application server; The first channel management module queries the registration information in the first service management module based on the application identifier of the second application to obtain the attribution identifier of the second application, the registration information including the application identifier and attribution identifier of at least one registered application, the attribution identifier indicating a deployment location of the corresponding registered application; determining whether the number of attribution identifiers of the second application is one or two; if the attribution identifier of the second application is one, and the attribution identifier of the second application is the first attribution identifier, and the first attribution identifier indicates that the second application is deployed in the terminal device, then sending the first to-be-transmitted data to the second application in the terminal device through the streaming protocol channel by the first channel management module; If the attribution identifier of the second application indicates that the second application is deployed in the application server, the first channel management module sends the first data to be transmitted to the second application in the application server through the inter-process communication IPC channel between the first channel management module and the second application.
2. The method according to claim 1, characterized in that Also includes: If the second application has two attribution identifiers, and the attribution identifiers of the second application include the first attribution identifier and the second attribution identifier, the first channel management module selects the second attribution identifier from the first attribution identifier and the second attribution identifier, and the second attribution identifier indicates that the second application is deployed in the application server; The first channel management module sends the first data to be transmitted to the second application in the application server through the IPC channel between the first channel management module and the second application according to the second attribution identifier.
3. The method according to claim 2, characterized in that After the first channel management module sends the first data to be transmitted to the second application in the application server through the IPC channel between the first channel management module and the second application according to the second attribution identifier, the method further includes: If the first channel management module determines that the transmission of the first data to be transmitted fails, the first channel management module sends the first data to be transmitted to the second application in the terminal device through the streaming protocol channel according to the first attribution identifier.
4. The method according to claim 1, wherein Before the first service management module receives the first data transmission request sent by the first application, the following further comprises: The first service management module registers the first application according to the registration request of the first application and saves the registration information of the first application, where the registration information of the first application includes an application identifier of the first application and an attribution identifier indicating that the first application is installed in the application server; The first service management module also receives the application identifier of the registered third application sent by the terminal device and saves the registration information of the third application. The registration information of the third application includes the application identifier of the third application and the attribution identifier indicating that the third application is deployed in the terminal device.
5. An inter-process communication method, characterized in that: A second inter-process communication device is applied to a terminal device, the second inter-process communication device includes a second service management module and a second channel management module, a streaming protocol channel is established between an application server and an application client deployed in the terminal device, and the application server and the terminal device are respectively deployed with multiple applications; the method includes: The second service management module forwards a second data transmission request sent by a fourth application to the second channel management module, where the second data transmission request includes second data to be transmitted and an application identifier of a fifth application, where the fourth application is one of multiple applications deployed on the terminal device; The second channel management module queries the registration information in the second service management module according to the application identifier of the fifth application to obtain the attribution identifier of the fifth application; determining whether the number of attribution identifiers of the fifth application is one or two; if the number of attribution identifiers of the fifth application is one, and the attribution identifier of the fifth application is a third attribution identifier, and the third attribution identifier indicates that the fifth application is deployed in the application server, sending the second to-be-transmitted data to the fifth application in the application server through the streaming protocol channel by the second channel management module; If the attribution identifier of the fifth application indicates that the fifth application is deployed in the terminal device, the second channel management module sends the second data to be transmitted to the fifth application in the terminal device through the IPC channel between the second channel management module and the fifth application.
6. The method according to claim 5, characterized in that Also includes: If the number of the attribution identifiers of the fifth application is two, and the attribution identifiers of the fifth application include the third attribution identifier and the fourth attribution identifier, the second channel management module selects the fourth attribution identifier from the third attribution identifier and the fourth attribution identifier, and the fourth attribution identifier indicates that the fifth application is deployed in the terminal device; The second channel management module sends the second data to be transmitted to the fifth application in the terminal device through the IPC channel between the second channel management module and the fifth application according to the fourth attribution identifier.
7. An application server, characterized in that: include: memory and processor; The memory is used to store computer programs; The processor is coupled to the memory and configured to execute the computer program to perform the steps of the method according to any one of claims 1 to 4.
8. A terminal device, characterized in that: include: memory and processor; The memory is used to store computer programs; The processor is coupled to the memory and configured to execute the computer program to perform the steps of the method according to any one of claims 5 to 6.
9. An inter-process communication system, characterized in that: include: An application server and a terminal device, wherein a streaming protocol channel is established between the application server and an application client deployed in the terminal device, wherein the application server and the terminal device are respectively deployed with multiple application programs, the application server is further deployed with a first inter-process communication device, and the terminal device is further deployed with a second inter-process communication device, wherein the first inter-process communication device is used to execute the steps in the method described in any one of claims 1-4, and the second inter-process communication device is used to execute the steps in the method described in any one of claims 5-6.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is enabled to implement the steps of the method according to any one of claims 1 to 4 or 5 to 6.
Citation Information
Patent Citations
Inter-process communication method and device in browser and browser
CN103559097A
Interprocess communication method and system, and server
CN104268025A