Service calling method based on distributed soft bus, soft bus, medium and equipment

By designing a service call method based on a distributed soft bus in the Android system, using the cross-process communication module and decision-making module combined with a variety of cross-end connection protocols, the problem of insufficient remote cross-device call capability of the Android system is solved, and the distributed method is significantly improved Calling capability.

CN119025296APending Publication Date: 2024-11-26SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411018496.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Android systems have weaknesses in distributed calling capabilities, especially the poor remote cross-device calling capabilities, which leads to insufficient distributed calling capabilities.

Method used

Design a service call method based on distributed soft bus, including cross-process communication module, decision-making module, service management module and preset cross-process call interfaces for multiple cross-end connection protocols, and obtain the call request from client applications. Service information of the target service, determine the service type, and select the matching cross-end connection protocol for remote cross-device calls.

Benefits of technology

It effectively improves the remote cross-device call capability and distributed call capability of the Android system, realizes cross-protocol call across devices, and enhances the communication flexibility and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025296A_ABST
    Figure CN119025296A_ABST
Patent Text Reader

Abstract

The invention discloses a service calling method based on a distributed soft bus, the soft bus, a medium and equipment, and relates to the technical field of operating systems, the method comprises the following steps: receiving a calling request of a client application for a target service through a cross-process communication module, and sending the calling request to a decision module; and adopting the decision module to obtain service information of the target service from a service management module according to the calling request, determining a service type of the target service according to the service information, and if the service type is a remote calling type, sending the remote calling type to the service management module. If yes, selecting the target service from the multiple cross-end connection protocols to match a target cross-end connection protocol; and through the cross-process communication module, the target service is remotely called in a cross-device manner based on a preset cross-process calling interface corresponding to the target cross-end connection protocol. According to the method and the device, the remote cross-device calling capability of the Android system for the service can be improved, and the distributed calling capability of the Android system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of operating systems, and in particular to a service calling method, a soft bus, a medium and a device based on a distributed soft bus. Background Art

[0002] The Android system has an inherent weakness in distributed calling capabilities. Considering that the Android system is still the mobile operating system with the highest market share in the industry, it is very important to supplement the distributed calling capabilities in this area.

[0003] The original design of the Android system did not take into account cross-device calls. Its communication base was mainly based on cross-process calls to services within the device, or, based on the launched Remote Procedure Call (RPC) which was limited to cross-device calls to services over the TCP / IP protocol.

[0004] Therefore, the current Android system has poor ability to remotely call services across devices, resulting in weak distributed calling capabilities of the Android system. Summary of the invention

[0005] The embodiment of the present application provides a solution that can effectively improve the Android system's ability to remotely call services across devices and improve the Android system's distributed calling capabilities.

[0006] The embodiments of the present application provide the following technical solutions:

[0007] According to one embodiment of the present application, a service calling method based on a distributed soft bus is provided, wherein the distributed soft bus includes a cross-process communication module, a decision module, a service management module, and preset cross-process calling interfaces corresponding to multiple cross-end connection protocols. The method includes: receiving a call request for a target service from a client application through the cross-process communication module, and sending the call request to the decision module; using the decision module to obtain service information of the target service from the service management module according to the call request, and determining a service type of the target service according to the service information, and, if the service type is a remote call type, selecting the target service from the multiple cross-end connection protocols to match the target cross-end connection protocol; and remotely calling the target service across devices based on the preset cross-process calling interface corresponding to the target cross-end connection protocol.

[0008] In some embodiments of the present application, the distributed soft bus also includes a connection management module; the selecting the target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols includes: querying the locally supported remote connection protocols from the connection management module to obtain local support protocol information; obtaining service support protocol information of the protocols supported by the target service from the service information; and selecting the target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information.

[0009] In some embodiments of the present application, selecting a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information includes: obtaining the load of remotely calling the target service; selecting a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information, the service support protocol information and the load.

[0010] In some embodiments of the present application, selecting a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information, the service support protocol information and the load volume includes: obtaining at least one cross-end connection protocol supported by the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information; and selecting a cross-end connection protocol that matches the load volume from at least one cross-end connection protocol supported by the target service to obtain the target cross-end connection protocol.

[0011] In some embodiments of the present application, before obtaining the service information of the target service from the service management module according to the call request, the method also includes: obtaining the publishing information of the target service; registering the target service to the service management module according to the publishing information, and saving the service information of the target service in the service management module.

[0012] In some embodiments of the present application, the distributed soft bus also includes a local cross-process calling interface; after determining the service type of the target service according to the service information, the method also includes: if the service type is a local call type, calling the target service locally across processes based on the local cross-process calling interface.

[0013] In some embodiments of the present application, the remote cross-device calling of the target service based on the preset cross-process calling interface corresponding to the target cross-end connection protocol includes: obtaining the communication connection information required to establish a connection with the target service from the service information; defining the client object of the target cross-end connection protocol according to the communication connection information based on the preset cross-process calling interface corresponding to the target cross-end connection protocol; establishing a connection with the server object of the target server based on the client object, and remotely calling the target service across devices.

[0014] According to one embodiment of the present application, a distributed soft bus in an Android system includes a cross-process communication module, a decision module, a service management module, and preset cross-process calling interfaces corresponding to multiple cross-end connection protocols; the cross-process communication module is used to: receive a call request for a target service from a client application, and send the call request to the decision module; the decision module is used to: obtain service information of the target service from the service management module according to the call request, and determine the service type of the target service according to the service information, and, if the service type is a remote call type, select the target service from the multiple cross-end connection protocols to match the target cross-end connection protocol; the preset cross-process calling interface corresponding to the target cross-end connection protocol is used to: remotely call the target service across devices.

[0015] In some embodiments of the present application, the distributed soft bus also includes a connection management module; the decision module is used to: query the locally supported remote connection protocol from the connection management module to obtain local support protocol information; obtain service support protocol information of the protocol supported by the target service from the service information; and select a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information.

[0016] In some embodiments of the present application, the decision module is used to: obtain the load of remotely calling the target service; and select a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information, the service support protocol information and the load.

[0017] In some embodiments of the present application, the decision module is used to: obtain at least one cross-end connection protocol supported by the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information; select a cross-end connection protocol that matches the load from the at least one cross-end connection protocol supported by the target service to obtain the target cross-end connection protocol.

[0018] In some embodiments of the present application, before obtaining the service information of the target service from the service management module according to the calling request, the service management module is used to: obtain the publishing information of the target service; register the target service to the service management module according to the publishing information, and save the service information of the target service in the service management module.

[0019] In some embodiments of the present application, the distributed soft bus also includes a local cross-process calling interface; after determining the service type of the target service according to the service information, the local cross-process calling interface is used to: if the service type is a local call type, then based on the local cross-process calling interface, call the target service locally across processes.

[0020] In some embodiments of the present application, the remote cross-device calling of the target service based on the preset cross-process calling interface corresponding to the target cross-end connection protocol includes: obtaining the communication connection information required to establish a connection with the target service from the service information; defining the client object of the target cross-end connection protocol according to the communication connection information based on the preset cross-process calling interface corresponding to the target cross-end connection protocol; establishing a connection with the server object of the target server based on the client object, and remotely calling the target service across devices.

[0021] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer executes the method described in the embodiment of the present application.

[0022] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.

[0023] According to another embodiment of the present application, a computer program product or a computer program includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.

[0024] An embodiment of the present application provides a service calling method based on a distributed soft bus, wherein the distributed soft bus includes a cross-process communication module, a decision module, a service management module, and preset cross-process calling interfaces corresponding to multiple cross-end connection protocols. The method includes: receiving a call request for a target service from a client application through the cross-process communication module, and sending the call request to the decision module; using the decision module to obtain service information of the target service from the service management module according to the call request, and determining a service type of the target service according to the service information, and, if the service type is a remote call type, selecting the target service from the multiple cross-end connection protocols to match the target cross-end connection protocol; and remotely calling the target service across devices based on the preset cross-process calling interface corresponding to the target cross-end connection protocol through the cross-process communication module.

[0025] In this way, a distributed soft bus is composed of a cross-process communication module, a decision-making module, a service management module and preset cross-process calling interfaces corresponding to a variety of cross-end connection protocols. The distributed soft bus design is implemented based on the cross-process communication mechanism (Binder) of the Android system. The cross-process communication module receives a call request for a target service. The decision-making module can obtain the service information of the target service from the service management module to determine whether the target service is a remote call type. If so, the target service can be further selected from a variety of cross-end connection protocols to match the target cross-end connection protocol. Then, the cross-process communication module remotely calls the target service across devices based on the preset cross-process calling interface corresponding to the target cross-end connection protocol. Various cross-device and cross-protocol calls can be implemented based on the cross-process communication mechanism (Binder), effectively improving the Android system's remote cross-device calling capability for services and improving the Android system's distributed calling capability. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 The framework diagram of a distributed soft bus according to an embodiment of the present application is schematically shown.

[0028] Figure 2 A flow chart of a service calling method based on a distributed soft bus according to an embodiment of the present application is shown.

[0029] Figure 3A flow chart of a service calling method based on a distributed soft bus according to an embodiment of the present application is shown.

[0030] Figure 4 A protocol selection flow chart according to an embodiment of the present application is shown.

[0031] Figure 5 A block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are partial embodiments for implementing the present disclosure, rather than providing all embodiments for implementing the present disclosure. In the absence of conflict, the technical solutions recorded in the embodiments of the present disclosure can be implemented in any combination.

[0033] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements in the method or apparatus including the element (such as a step in the method or a unit in the apparatus, for example, a unit may be a part of a circuit, a part of a processor, a part of a program or software, etc.).

[0034] For example, the service calling method based on the distributed soft bus provided in the embodiment of the present disclosure includes a series of steps, but the service calling method based on the distributed soft bus provided in the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the service calling device based on the distributed soft bus provided in the embodiment of the present disclosure includes a series of units, but the device provided in the embodiment of the present disclosure is not limited to including the units explicitly recorded, and can also include units required to obtain relevant information or perform processing based on information.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0036] It is understandable that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0037] Figure 1 The following schematically shows a framework diagram of a distributed soft bus according to an embodiment of the present application. Figure 1 As shown, the distributed soft bus 100 in the embodiment of the present application may include a cross-process communication module 110, a decision module 120, a service management module 130, and a preset cross-process call interface 140 corresponding to a plurality of cross-end connection protocols, a connection management module 150, and a local cross-process call interface 160. A distributed soft bus refers to a bus design on the software, which abstracts various protocols into an interface. When the upper layer calls a service, it does not need to care about the specific protocol of the underlying layer, and the system decides which protocol to use for communication.

[0038] Figure 2 The flowchart of the service calling method based on the distributed soft bus according to an embodiment of the present application is schematically shown. The execution subject of the service calling method based on the distributed soft bus can be any device with processing capabilities, such as a TV, a computer, a mobile phone, a smart watch, and a home appliance. Figure 2 As shown, the process calling method based on the distributed soft bus may include steps S210 to S230.

[0039] Step S210, receiving a call request for a target service from a client application through the cross-process communication module, and sending the call request to the decision module; Step S220, using the decision module, obtaining service information of the target service from the service management module according to the call request, and determining the service type of the target service according to the service information, and, if the service type is a remote call type, selecting the target service to match the target cross-end connection protocol from the multiple cross-end connection protocols; Step S230, remotely calling the target service across devices based on a preset cross-process call interface corresponding to the target cross-end connection protocol.

[0040] In this way, a distributed soft bus is composed of a cross-process communication module, a decision-making module, a service management module and preset cross-process calling interfaces corresponding to multiple cross-end connection protocols. The distributed soft bus design can be implemented based on the cross-process communication mechanism (Binder) of the Android system. The cross-process communication module receives a call request for the target service, and the decision-making module can obtain the service information of the target service from the service management module to determine whether the target service is a remote call type. If so, the target service can be further selected from multiple cross-end connection protocols to match the target cross-end connection protocol. Then, the target service can be remotely called across devices based on the preset cross-process calling interface corresponding to the target cross-end connection protocol. Various cross-device and cross-protocol calls can be implemented based on the cross-process communication mechanism (Binder), effectively improving the Android system's remote cross-device calling capabilities for services and improving the Android system's distributed calling capabilities.

[0041] Described below Figure 1 When a process is called under the embodiment, the steps performed and further optional specific embodiments are described.

[0042] Step S110: receiving a call request for a target service from a client application through the cross-process communication module, and sending the call request to the decision module.

[0043] The service described in the embodiments of the present application may be an application, an API (application programming interface), a database service, a Web service, a file transfer service, etc. The target service is a service that the client application needs to call, see Figure 3 , a client application 310 can send a call request for a target service that it needs to call to the cross-process communication module.

[0044] The cross-process communication module can be a processing module that reuses the cross-process communication (Binder) mechanism in the Android system. The cross-process communication module can receive a call request from a client application for a target service and send the call request to a decision module in the distributed soft bus. Under the distributed soft bus of the embodiment of the present application, the client application as the calling end does not need to care about the specific call protocol, but only needs to send a call request to the cross-process communication module.

[0045] Step S120, using the decision module, obtains the service information of the target service from the service management module according to the call request, and determines the service type of the target service according to the service information, and, if the service type is a remote call type, selects the target service to match the target cross-end connection protocol from the multiple cross-end connection protocols.

[0046] The service management module in the distributed soft bus can record the service information of the published service, so that for the called target service, the decision module can obtain the service information of the target service from the service management module and make relevant decisions. The decision module is a module in the distributed soft bus used for decision processing when the service is called. The decision module can be used to determine the service type, match the target cross-end connection protocol, and other processing.

[0047] See also Figure 3 The decision module can obtain the service information of the target service from the service management module according to the call request. The service information may include the type information of the target service. The type information may include a local call type or a remote call type. The local call type means that the target service is locally, and the remote call type means that the target service is in other remote devices.

[0048] The decision module determines the service type of the target service based on the type information in the service information. If the service type is a remote call type, the target service can be further selected from a variety of cross-end connection protocols to match the target cross-end connection protocol. Then, the target service can be called by remotely connecting to the target service across devices based on the target service matching the target cross-end connection protocol.

[0049] A cross-end connection protocol is a protocol for establishing connections across devices. The various cross-end connection protocols can be TCP / IP protocol, Bluetooth protocol (BLE protocol), USB interconnection protocol, and Star Flash protocol, etc. Any cross-end connection protocol can be abstracted into a corresponding preset cross-process call interface based on cross-process communication.

[0050] In one embodiment, before obtaining the service information of the target service from the service management module according to the call request, the method may also include: obtaining the publishing information of the target service; registering the target service to the service management module according to the publishing information, and saving the service information of the target service in the service management module.

[0051] When a target service is published as a distributed service, the service information of the target service can be declared in the publishing information. The service information can include type information, service support protocol information, communication connection information required to establish a connection with the target service, etc.

[0052] The target service can be registered in the service management module in the distributed soft bus according to the published information, and the service information of the target service can be stored in the service management module. Furthermore, the decision module can obtain the service information of the target service from the service management module according to the call request.

[0053] In one embodiment, see Figure 4The distributed soft bus further includes a connection management module; the selecting the target service matching the target cross-end connection protocol from the multiple cross-end connection protocols may include:

[0054] Step S410, query the locally supported remote connection protocols from the connection management module to obtain local support protocol information; step S420, obtain the service support protocol information of the protocols supported by the target service from the service information; step S430, select the target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information.

[0055] The distributed soft bus also includes a connection management module, which can record the information of the protocols supported locally (i.e., the local supported protocol information). Figure 3 The decision module can obtain the local support protocol information from the connection management module. The decision module can obtain the service support protocol information of the protocol supported by the target service from the service information.

[0056] Furthermore, based on the local support protocol information, multiple cross-end connection protocols supported locally can be determined, and then, based on the service support protocol information, a cross-end connection protocol supported by the target service can be further selected from the multiple cross-end connection protocols. From the cross-end connection protocols supported by the target service, a target cross-end connection protocol matching the target service can be further selected, and based on the target cross-end connection protocol, a connection can be successfully established with the server-side object of the target service.

[0057] In one embodiment, selecting a target cross-end connection protocol matching the target service from the multiple cross-end connection protocols according to the local support protocol information and the service support protocol information includes:

[0058] Acquire the load of remotely calling the target service; and select a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information, the service support protocol information and the load.

[0059] The load capacity may specifically be the amount of data. According to the local support protocol information, the service support protocol information and the load capacity, a target cross-end connection protocol matching the target service is selected from a variety of cross-end connection protocols to further improve the reliability of service calls.

[0060] In one embodiment, selecting a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information, the service support protocol information and the load volume includes: obtaining at least one cross-end connection protocol supported by the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information; and selecting a cross-end connection protocol that matches the load volume from at least one cross-end connection protocol supported by the target service to obtain the target cross-end connection protocol.

[0061] According to the local support protocol information, multiple cross-end connection protocols supported locally can be determined, and then, according to the service support protocol information, a cross-end connection protocol supported by the target service can be further selected from the multiple cross-end connection protocols.

[0062] Furthermore, a cross-end connection protocol that matches the load volume is selected from at least one cross-end connection protocol supported by the target service as the target cross-end connection protocol. When the amount of data calling the target service is too large, a cross-end connection protocol corresponding to a network connection method with a larger bandwidth can be selected as the target cross-end connection protocol. This can further improve the reliability of service calls.

[0063] Step S130: remotely calling the target service across devices based on a preset cross-process calling interface corresponding to the target cross-end connection protocol.

[0064] Based on the preset cross-process calling interface corresponding to the target cross-end connection protocol, the target service can be remotely connected across devices and further called. The data obtained by calling the target service can be transmitted to the client application through the cross-process communication module.

[0065] In one embodiment, the remote cross-device calling of the target service based on the preset cross-process calling interface corresponding to the target cross-end connection protocol may include: obtaining the communication connection information required to establish a connection with the target service from the service information; defining the client object of the target cross-end connection protocol according to the communication connection information based on the preset cross-process calling interface corresponding to the target cross-end connection protocol; establishing a connection with the server object of the target server based on the client object, and remotely calling the target service across devices.

[0066] The communication connection information required to establish a connection with the target service is obtained from the service information, and then a client object of the target cross-end connection protocol is defined, and the client object contains the communication connection information required to establish a connection with the target service. Figure 3 The client object (Session) 320 is shown.

[0067] Furthermore, based on the client object, a connection can be established with the server object of the target server using the communication connection information, and the target service can be further called remotely across devices, wherein the server object of the target server is the server object of the target cross-end connection protocol defined in the target service end. Figure 3 The server object (Server) 330 is shown.

[0068] Furthermore, in one embodiment, the distributed soft bus also includes a local cross-process call interface; after determining the service type of the target service according to the service information, the method further includes: if the service type is a local call type, calling the target service locally across processes based on the local cross-process call interface. If the decision module determines that the service type of the target service is a local call type, the distributed soft bus directly calls the target service across processes based on the local cross-process call interface locally based on the Android cross-process communication (Binder) mechanism.

[0069] In order to better implement the process calling method provided in the embodiment of the present application, the embodiment of the present application also provides a distributed soft bus in the Android system based on the above process calling method. The meanings of the terms are the same as those in the above process calling method, and the specific implementation details can refer to the description in the method embodiment.

[0070] The distributed soft bus 100 may include a cross-process communication module 110, a decision module 120, a service management module 130, and a preset cross-process call interface 140 corresponding to multiple cross-end connection protocols, a connection management module 150, and a local cross-process call interface 160.

[0071] like Figure 1 As shown, the distributed soft bus 100 in the Android system includes a cross-process communication module 110, a decision module 120, a service management module 130 and a preset cross-process calling interface 140 corresponding to a plurality of cross-end connection protocols; the cross-process communication module can be used to: receive a call request for a target service from a client application, and send the call request to the decision module; the decision module can be used to: obtain service information of the target service from the service management module according to the call request, and determine the service type of the target service according to the service information, and, if the service type is a remote call type, select the target service from the plurality of cross-end connection protocols to match the target cross-end connection protocol; the preset cross-process calling interface corresponding to the target cross-end connection protocol can be used to: remotely call the target service across devices.

[0072] In some embodiments of the present application, the distributed soft bus also includes a connection management module; the decision module is used to: query the locally supported remote connection protocol from the connection management module to obtain local support protocol information; obtain service support protocol information of the protocol supported by the target service from the service information; and select a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information.

[0073] In some embodiments of the present application, the decision module is used to: obtain the load of remotely calling the target service; and select a target cross-end connection protocol that matches the target service from the multiple cross-end connection protocols based on the local support protocol information, the service support protocol information and the load.

[0074] In some embodiments of the present application, the decision module is used to: obtain at least one cross-end connection protocol supported by the target service from the multiple cross-end connection protocols based on the local support protocol information and the service support protocol information; select a cross-end connection protocol that matches the load from the at least one cross-end connection protocol supported by the target service to obtain the target cross-end connection protocol.

[0075] In some embodiments of the present application, before obtaining the service information of the target service from the service management module according to the calling request, the service management module is used to: obtain the publishing information of the target service; register the target service to the service management module according to the publishing information, and save the service information of the target service in the service management module.

[0076] In some embodiments of the present application, the distributed soft bus also includes a local cross-process calling interface; after determining the service type of the target service according to the service information, the local cross-process calling interface is used to: if the service type is a local call type, then based on the local cross-process calling interface, call the target service locally across processes.

[0077] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0078] In addition, the present application also provides an electronic device, such as Figure 5 As shown, Figure 5A block diagram of an electronic device according to an embodiment of the present application is shown, specifically:

[0079] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0080] in:

[0081] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0082] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0083] The electronic device also includes a power supply 503 for supplying power to each component. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0084] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0085] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 502 according to the following instructions, and the processor 501 will run the computer program stored in the memory 502, thereby realizing various functions in the aforementioned embodiments of the present application, such as the processor 501 may perform the following steps:

[0086] Through the cross-process communication module, a call request for a target service from a client application is received, and the call request is sent to the decision module; the decision module is used to obtain service information of the target service from the service management module according to the call request, and determine the service type of the target service according to the service information, and, if the service type is a remote call type, select the target service to match the target cross-end connection protocol from the multiple cross-end connection protocols; and remotely call the target service across devices based on a preset cross-process call interface corresponding to the target cross-end connection protocol.

[0087] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0088] To this end, an embodiment of the present application further provides a storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any method provided in the embodiment of the present application.

[0089] The storage medium may be a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0090] Since the computer program stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0091] Those skilled in the art will readily come up with other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0092] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.

Claims

1. A service calling method based on a distributed soft bus, characterized in that: The distributed soft bus includes a cross-process communication module, a decision module, a service management module, and preset cross-process calling interfaces corresponding to multiple cross-end connection protocols. The method includes: Receiving a call request for a target service from a client application through the cross-process communication module, and sending the call request to the decision module; Using the decision module, obtaining service information of the target service from the service management module according to the call request, and determining the service type of the target service according to the service information, and, If the service type is a remote call type, selecting the target service to match the target cross-end connection protocol from the multiple cross-end connection protocols; The target service is remotely called across devices based on a preset cross-process calling interface corresponding to the target cross-end connection protocol.

2. The method according to claim 1, characterized in that The distributed soft bus further includes a connection management module; the step of selecting the target service to match the target cross-end connection protocol from the multiple cross-end connection protocols includes: Querying the remote connection protocol supported locally from the connection management module to obtain the locally supported protocol information; Acquire service support protocol information of the protocol supported by the target service from the service information; A target cross-end connection protocol matching the target service is selected from the multiple cross-end connection protocols according to the local support protocol information and the service support protocol information.

3. The method according to claim 2, characterized in that The selecting, according to the local support protocol information and the service support protocol information, a target cross-end connection protocol matching the target service from the multiple cross-end connection protocols comprises: Obtain the load of remotely calling the target service; A target cross-end connection protocol matching the target service is selected from the multiple cross-end connection protocols according to the local support protocol information, the service support protocol information and the load.

4. The method according to claim 3, characterized in that The selecting, according to the local support protocol information, the service support protocol information and the load, a target cross-end connection protocol matching the target service from the multiple cross-end connection protocols comprises: Obtaining at least one cross-end connection protocol supported by the target service from among the multiple cross-end connection protocols according to the local support protocol information and the service support protocol information; A cross-end connection protocol matching the load is selected from at least one cross-end connection protocol supported by the target service to obtain the target cross-end connection protocol.

5. The method according to claim 1, characterized in that Before acquiring the service information of the target service from the service management module according to the calling request, the method further includes: Obtaining the publishing information of the target service; According to the publishing information, the target service is registered to the service management module, and the service information of the target service is stored in the service management module.

6. The method according to claim 1, characterized in that The distributed soft bus also includes a local cross-process calling interface; After determining the service type of the target service according to the service information, the method further includes: If the service type is a local call type, the target service is called locally across processes based on the local cross-process call interface.

7. The method according to claim 1, characterized in that The remote cross-device calling of the target service based on a preset cross-process calling interface corresponding to the target cross-end connection protocol includes: Acquire communication connection information required to establish a connection with the target service from the service information; Based on a preset cross-process calling interface corresponding to the target cross-end connection protocol, defining a client object of the target cross-end connection protocol according to the communication connection information; A connection is established between the client object and the server object of the target server, and the target service is remotely called across devices.

8. A distributed soft bus in an Android system, characterized in that: The distributed soft bus includes a cross-process communication module, a decision module, a service management module, and preset cross-process calling interfaces corresponding to multiple cross-end connection protocols; The cross-process communication module is used to: receive a call request from a client application for a target service, and send the call request to the decision module; The decision module is used to: obtain the service information of the target service from the service management module according to the call request, determine the service type of the target service according to the service information, and, if the service type is a remote call type, select the target service to match the target cross-end connection protocol from the multiple cross-end connection protocols; The preset cross-process calling interface corresponding to the target cross-end connection protocol is used for: remotely calling the target service across devices.

9. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: a memory storing a computer program; A processor reads a computer program stored in a memory to execute the method according to any one of claims 1 to 7.