In-device communication method, in-device distributed system and electronic device

By building an IP network and remote procedure calling solution in an intelligent terminal, the problem of complexity of interaction between AP and CP in multi-processor systems is solved, more efficient data communication and service calling are achieved, and the flexibility between processors is improved. ity and scalability.

CN114625690BActive Publication Date: 2024-09-20GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210249121.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2024-09-20
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

In smart terminals, private message interactions between APs and CPs in multi-processor systems increase software complexity, making it difficult to meet the flexibility and scalability of processing power requirements.

Method used

By building an IP network within the device, using IP addresses to achieve data communication between different processors, and using a remote procedure call scheme to perform service calls, the information exchange process between modules is simplified.

Benefits of technology

It significantly improves the deployment flexibility and expansion convenience of functional modules on multi-processor devices, and reduces the software complexity on each processor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625690B
    Figure CN114625690B
Patent Text Reader

Abstract

The disclosed embodiments provide a method for communication within a device, a distributed system within a device, and an electronic device. The method for communication within a device includes: a first application module on a first processor within the device communicates with a first service module on a second processor within the device according to a second IP address; wherein the first processor sets a first IP address, and the second processor sets a second IP address. The disclosed embodiments provide a distributed system solution within a device, construct an IP network within the device, standardize and simplify the process of data interaction between different processors, and significantly improve the flexibility of in-device service and application deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to, but is not limited to, the field of distributed processing, and in particular to an intra-device communication method, an intra-device distributed system, and an electronic device. Background Art

[0002] With the promotion of various intelligent applications, the applications or services that need to be processed on intelligent terminals are becoming increasingly complex, and the requirements for the processing capabilities of intelligent terminals are constantly increasing. In order to meet the processing power requirements of terminals, many terminal systems have introduced multi-processor architectures, where different processors provide different business capabilities and collaborate to realize terminal functions. For example, the relevant solutions for mobile intelligent terminals use a dual-processor system architecture, which includes two processors, AP and CP. AP serves as the operating system and application software processing unit, and CP serves as the communication processing unit responsible for air interface-related communication. AP and CP communicate through the AP-CP interface, and the data interaction between AP and CP is implemented using private messages. With the expansion of various messages, the interface between AP and CP also needs to be expanded and adapted, which greatly increases the software complexity of both AP and CP. Summary of the invention

[0003] The embodiments of the present disclosure provide an intra-device communication method, an intra-device distributed system and an electronic device. The processor in the device builds an IP network to realize data communication between different processors based on the IP network, and can realize flexible deployment and standardized calling of application modules and service modules, which greatly improves the deployment flexibility and expansion convenience of each functional module on a multi-processor device.

[0004] The present disclosure provides an intra-device communication method, including:

[0005] The first application module on the first processor in the device communicates with the first service module on the second processor in the device according to the second IP address;

[0006] The first processor sets a first IP address, and the second processor sets a second IP address.

[0007] The present disclosure also provides an intra-device distributed system, including:

[0008] A first processor and a second processor, the first processor is set to a first IP address, and the second processor is set to a second IP address;

[0009] The first application module deployed on the first processor communicates with the first service module deployed on the second processor according to the second IP address.

[0010] An embodiment of the present disclosure further provides an electronic device, which includes the in-device distributed system as described in any embodiment of the present disclosure.

[0011] Other aspects will be apparent upon reading and understanding the drawings and detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the solutions of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0013] Figure 1 A schematic diagram of a dual-processor service call in an implementable solution;

[0014] Figure 2 This is a flow chart of a method for communication within a device according to an embodiment of the present disclosure;

[0015] Figure 3 This is a flow chart of another method for communicating within a device according to an embodiment of the present disclosure;

[0016] Figure 4 This is a flow chart of another method for communicating within a device according to an embodiment of the present disclosure;

[0017] Figure 5 A schematic diagram of a service call in a dual-processor distributed system in an embodiment of the present disclosure;

[0018] Figure 6 A schematic diagram of another service call in a dual-processor distributed system in an embodiment of the present disclosure;

[0019] Figure 7 is a schematic diagram of a distributed system in a device according to an embodiment of the present disclosure;

[0020] Figure 8 is a schematic diagram of another distributed system in a device according to an embodiment of the present disclosure;

[0021] Fig. 9 is a schematic diagram of another distributed system in a device according to an embodiment of the present disclosure;

[0022] Fig.10 is a schematic diagram of another distributed system in a device according to an embodiment of the present disclosure;

[0023] Fig.11 is a schematic diagram of another distributed system in a device according to an embodiment of the present disclosure;

[0024] Fig.12 is a schematic diagram of another distributed system in a device according to an embodiment of the present disclosure;

[0025] Fig.13 Schematic diagram of another distributed system within a device in an embodiment of the present disclosure.

[0026] The realization of the purpose, functional features and advantages of the present application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] It should be noted that all directional indications in the embodiments of the present disclosure (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0029] In addition, in the present disclosure, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0030] In the present disclosure, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present application scheme can be understood according to specific circumstances.

[0031] In addition, the technical solutions between the various embodiments of the present disclosure can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0032] Before describing the specific embodiments, the abbreviations of the relevant terms involved in the present disclosure are explained as follows:

[0033]

[0034]

[0035] With the continuous improvement of terminal performance requirements, the use of multi-processor solutions is becoming more and more widespread. Taking mobile communication intelligent terminals as an example, some achievable intelligent terminals use dual-processor solutions, such as Figure 1 As shown, it includes two processors, AP and CP, and AP and CP communicate through an AP-CP interface. The AP-CP interface includes two types of interfaces, namely Data-IF and Ctrl-IF.

[0036] (1) Data-IF workflow

[0037] Data-IF is responsible for forwarding Internet service-related IP packets between AP and CP. The IP address on the AP side (for example, 202.1.5.8) is the external IP assigned by the wireless network when the terminal attaches to the wireless network. The DataApp on the AP side uses this IP address to use Internet services.

[0038] After receiving the IP data from the Internet, the Air Interface on the CP side directly forwards it to the AP. The IP data packets generated by the Data App on the AP side are forwarded to the CP and then sent to the external Internet via the Air Interface. Since the AP and CP do not have dedicated IPs, Data-IF is only responsible for forwarding the IP data generated when the DataApp uses Internet services between the AP and CP.

[0039] (2) Ctrl-IF workflow

[0040] Ctrl-IF is responsible for forwarding data packets related to control messages between modules in the AP and CP.

[0041] For example, module A in the AP configures the Name attribute of module B in the CP through Ctrl-IF. The specific message transmission path is as follows:

[0042] Module A sends a private message MSG'setName' to Middleware AP;

[0043] Then the Middleware AP sends a private message MSG'setName' to the Ctrl-IF interface;

[0044] Ctrl-IF sends private message MSG'setName' to Middleware CP;

[0045] Middleware CP sends private message MSG'setName' to module B;

[0046] All interactive messages (MSG'setName') on the message transmission path are private messages between adjacent modules.

[0047] The analysis found that the control-related interaction messages between AP-side module A (Module A) and CP-side module B (Module B) are forwarded through Ctrl-IF, and all middleware modules (Middleware AP / CP) need to implement corresponding private messages to transmit the interaction information between module A and module B. With each new interaction message added in the message path between module A and module B, the middleware module needs to adapt to more new private messages, which increases the complexity of AP and CP software.

[0048] The present disclosure proposes an in-device distributed system, which constructs an IP network between multiple processors in the device, and the processors communicate based on the IP network. In some exemplary implementations, service calls are made across processors through remote procedure calls, and a universal in-device distributed system based on IP networks and remote procedure calls is constructed. IP addresses are used to implement the routing of IP data packets between multiple processors in the device, and a standardized remote procedure call scheme is used to provide and call services, which standardizes the process of data interaction between different processors, and significantly improves the flexibility of in-device service and application deployment.

[0049] The present disclosure provides a method for communication within a device. Figure 2 As shown, including:

[0050] Step 230, the first application module on the first processor in the device communicates with the first service module on the second processor in the device according to the second IP address;

[0051] The first processor sets a first IP address, and the second processor sets a second IP address.

[0052] In some exemplary embodiments, step 230 includes:

[0053] According to the second IP address, the first application module on the first processor calls the first service module on the second processor through the first remote procedure call local proxy module deployed on the first processor to achieve communication.

[0054] It should be noted that the application module and service module recorded in the embodiments of the present disclosure are relative concepts, representing the two parties of communication. The application module sends a service request, and the service module returns a request response. It can be understood that in different business processes, the roles of the application module and the service module may change. In some exemplary embodiments, the application module (module A) sends a service request to the service module (module B) through the IP network. When processing the service request, the service module (module B) may need to further call the services / functions provided by other service modules (module C). At this time, the service module (module B) plays the role of the application module relative to the other service modules (module C).

[0055] In some exemplary embodiments, Figure 3 As shown, the method also includes:

[0056] Step 210: After the first remote procedure call local proxy module deployed on the first processor is started, it is bound to the first IP address;

[0057] Step 220: After the remote procedure call server module deployed on the second processor is started, it is bound to the second IP address.

[0058] In some exemplary embodiments, the method further comprises:

[0059] Step 240: After the remote procedure call server module deployed on the second processor is started, the first service module on the second processor registers the service provided by itself with the remote procedure call server module.

[0060] In some exemplary embodiments, the first IP address and the second IP address are both loopback addresses in a loopback address family that are not used by a loopback interface.

[0061] In some exemplary embodiments, the first remote procedure call local proxy module is a remote procedure call local proxy module based on extensible markup language;

[0062] The remote procedure call server module is a remote procedure call server module based on extensible markup language.

[0063] The present disclosure also provides a method for communication within a device. Figure 4 As shown, including:

[0064] Step 410: According to the second IP address, the first application module on the first processor calls the service provided by the first service module on the second processor through the first remote procedure call local proxy module (RPC Proxy) deployed on the first processor;

[0065] Wherein, the first processor sets a first IP address, and the second processor sets a second IP address;

[0066] After the first remote procedure call local proxy module (RPC Proxy) deployed on the first processor is started, it is bound to the first IP address;

[0067] After the remote procedure call server (RPC Server) module deployed on the second processor is started, it is bound to the second IP address.

[0068] It can be seen that the intra-device communication method can be used to implement distributed service calls within the device.

[0069] In some exemplary embodiments, the first IP address and the second IP address are loopback addresses in the loopback address family that are not used by the loopback interface, and are respectively referred to as the first loopback address and the second loopback address. In some exemplary embodiments, the method further includes:

[0070] Step 400: After the remote procedure call server (RPC Server) module deployed on the second processor is started, the first service module on the second processor registers the service provided by itself with the remote procedure call server (RPC Server) module.

[0071] The present disclosure also provides a method for intra-device communication, including:

[0072] According to the second IP address, the first application module A on the second processor calls the service provided by the first service module on the second processor through the second remote procedure call local proxy module (RPC Proxy) deployed on the second processor;

[0073] wherein, the second processor sets the second IP address;

[0074] After the remote procedure call server (RPC Server) module deployed on the second processor is started, the second IP address is bound; after the second remote procedure call local proxy module (RPC Proxy) deployed on the second processor is started, the second IP address is bound.

[0075] In some exemplary embodiments, the second IP address is a loopback address in a loopback address family that is not used by a loopback interface.

[0076] The present disclosure also provides a method for communicating within a device, which is applied to Figure 5 In the dual-processor device shown, the dual-processor device includes: a first processor AP, a second processor CP and a data interface module Data-IF.

[0077] The XML-RPC local proxy (XML-RPC Proxy) is deployed on the AP, the first application module A, the IP protocol stack, and the IP address of the AP is 127.0.1.1; the XML-RPC server (XML-RPC Sever) is deployed on the CP, the first service module B, the IP protocol stack, and the IP address of the CP is 127.0.2.1.

[0078] The intra-device communication method comprises:

[0079] (1) AP starts the XML-RPC local proxy and binds the AP's IP address 127.0.1.1. CP starts the XML-RPC server and binds the CP's IP address 127.0.2.1. Module B registers the XML-RPC function "setName" with the XML-RPC server. The function of the remote procedure call function setName is to configure the Name attribute of module B.

[0080] (2) Module A on the AP side establishes an XML-RPC client (XML-RPC Client) and connects to the XML-RPC server on the CP side (IP address is 127.0.2.1).

[0081] (3) Module A calls the remote procedure call function "setName" of module B through the XML-RPC local proxy, thereby realizing information interaction between module A and module B and setting the Name attribute of module B.

[0082] It can be seen that this method can realize distributed service calls within the device. When modules A and B exchange messages through the XML-RPC interface, since the interaction information between the IP protocol stack and Data_IF is a standard IP protocol data packet, the IP protocol stack and Data-IF do not need to make any adaptation or changes to a certain XML-RPC interface function.

[0083] In some embodiments, in the XML-RPC distributed environment built in the dual-processor terminal, the XML-RPC Server and XML-RPC Proxy can be deployed on both the AP and CP sides. Accordingly, the two modules (application module and service module) that communicate using the distributed system can be deployed on different processors or on the same processor.

[0084] The present disclosure also provides a method for communicating within a device, which is applied to Figure 6 In the dual-processor device shown, the dual-processor device includes: a first processor AP, a second processor CP and a data interface module Data-IF.

[0085] Compared to Figure 5 , Figure 6 In the distributed system shown, the first application module A is moved from the AP to the CP. The XML-RPC server (XML-RPC Sever) and the XML-RPC local proxy (XML-RPC Proxy) are deployed in the CP. To distinguish, the XML-RPC local proxy (XML-RPC Proxy) deployed on the AP is called the first XML-RPC Proxy, and the XML-RPC local proxy (XML-RPC Proxy) deployed on the CP is called the second XML-RPC Proxy.

[0086] The intra-device communication method comprises:

[0087] (1) CP starts the XML-RPC local proxy and binds to the CP's IP address 127.0.2.1. CP starts the XML-RPC server and binds to the CP's IP address 127.0.2.1. Module B registers the XML-RPC function "setName" with the XML-RPC server. The function of the remote procedure call function setName is to configure the Name attribute of module B.

[0088] (2) Module A on the CP side establishes an XML-RPC client and connects to the XML-RPC server on the CP side (IP address is 127.0.2.1).

[0089] (3) Module A calls the remote procedure call "setName" through the XML-RPC proxy to achieve information exchange between modules A and B and set the Name attribute of module B.

[0090] The present disclosure provides a distributed system 70 in a device, such as Figure 7 As shown, including:

[0091] A first processor 7100 and a second processor 7200, wherein the first processor is set to a first IP address, and the second processor is set to a second IP address;

[0092] The first application module deployed on the first processor communicates with the first service module deployed on the second processor according to the second IP address.

[0093] In some exemplary embodiments, the first application module deployed on the first processor is configured to call the service provided by the first service module through the first remote procedure call local proxy module according to the second IP address.

[0094] In some exemplary embodiments, Figure 8 As shown, the system further includes: a data interface module 7300;

[0095] A first IP protocol stack module 7120 is further deployed on the first processor 7100, and a second IP protocol stack module 7230 is further deployed on the second processor 7200;

[0096] The data interface module 7300 is configured to connect the first IP protocol stack module 7120 and the second IP protocol stack module 7230 to implement IP data packet communication between the first processor 7100 and the second processor 7200.

[0097] The present disclosure also provides a distributed system 70 within a device, such as Fig. 9 As shown, including:

[0098] A first processor 7100 and a second processor 7200, wherein the first processor is set to a first IP address, and the second processor is set to a second IP address;

[0099] After the first remote procedure call local proxy module 7110 (RPC Proxy) deployed on the first processor 7100 is started, it is bound to the first IP address;

[0100] After the remote procedure call server (RPC Server) module 7210 deployed on the second processor 7200 is started, it is bound to the second IP address.

[0101] It can be seen that the processors in the device build an IP network inside the device. The IP protocol stack of the second processor can route IP data packets with the destination address being the first IP address to the first processor; the IP protocol stack of the first processor can route IP data packets with the destination address being the second IP address to the second processor.

[0102] The IP addresses set for the processors inside these devices can be IP addresses within a set range, as long as these IP addresses do not conflict with other IP addresses in the network environment where the devices are located.

[0103] It can be known that Internet devices all support loopback interfaces to allow client programs (Client) and server programs (Server) running on the same host to communicate through TCP / IP. The system usually assigns the IP address 127.0.0.1 to this interface and names it localhost. An IP datagram transmitted to the loopback interface cannot appear on any network. The loopback address family is 127.0.0.1 to 127.255.255.254, and the address mask is 255.0.0.0. In the loopback address family, 127.0.0.2 to 127.255.255.254 are not used by the loopback interface. Therefore, in some exemplary embodiments provided in the embodiments of the present disclosure, in order to avoid conflicts between the IP addresses on each processor and other used addresses in the network environment, other IP addresses in 127.0.0.2 to 127.255.255.254 that are not used by the loopback interface are used to build a distributed system for internal networking of multi-processor devices.

[0104] In some exemplary embodiments, the first IP address and the second IP address are both loopback addresses in the loopback address family that are not used by the loopback interface. When the loopback address is used, the first IP address is also called the first loopback address, and the second IP address is also called the second loopback address.

[0105] It can be seen that according to its loopback address, the IP protocol stack of the second processor can route IP data packets with the destination address of the first loopback address to the first processor; the IP protocol stack of the first processor can route IP data packets with the destination address of the second loopback address to the second processor. An internal IP network is formed between at least two processors inside the device. The IP addresses of the internal networks of the first processor and the second processor both belong to the loopback address family. Therefore, IP data packets with the internal network address as the destination address between the two processors will not be routed to the external network. The device can still be regarded as a network device with a single external IP address.

[0106] It should be noted that the device may further include a third processor or more processors. Different IP addresses may be set for each processor. Software modules on different processors each provide services or call services provided by other processors. According to the dual-processor solution exemplified in the embodiment of the present disclosure, relevant implementation plans of other processor solutions can be known, which will not be described one by one here.

[0107] In some exemplary embodiments, Fig.10 As shown, the first application module A is deployed on the first processor 7100; the first service module B is deployed on the second processor 7200;

[0108] The first application module A is configured to call the service provided by the first service module B through the first remote procedure call local proxy module 7110 according to the second IP address.

[0109] In some exemplary embodiments, Fig.11 As shown, after the second remote procedure call local proxy module 7220 (RPC Proxy) deployed on the second processor 7200 is started, the second IP address is bound;

[0110] The first application module A and the first service module B are deployed on the second processor 7200;

[0111] The first application module A is configured to call the service provided by the first service module B through the second remote procedure call local proxy module 7220 according to the second IP address.

[0112] In some exemplary embodiments, Fig.12 As shown, the first application module A is deployed on the first processor 7100; the first service module B is deployed on the second processor 7200;

[0113] After the second remote procedure call local proxy module 7220 (RPC Proxy) deployed on the second processor 7200 is started, it is bound to the second IP address;

[0114] A second application module C is also deployed on the second processor 7200;

[0115] The first application module A is configured to call the service provided by the first service module B through the first remote procedure call local proxy module 7110 according to the second IP address;

[0116] The second application module C is configured to call the service provided by the first service module B through the second remote procedure call local proxy module 7220 according to the second IP address.

[0117] It should be noted that the first and second application modules here represent independently deployed application modules, which may be the same functional modules or different functional modules, and are not limited to specific functional modules. In other words, an application module can be deployed on a selected processor or multiple processors according to actual needs, and is not limited to the examples in the embodiments of the present disclosure. Similarly, it can be understood that a service module can also be deployed on one processor or multiple processors.

[0118] It should also be noted that the application module and service module described in the embodiments of the present disclosure are relative concepts. The application module refers to a module that needs to remotely call services provided by other modules to implement application functions, while the service module refers to a functional module that provides service implementation, also known as a service function. Taking remote procedure call as an example, the application module refers to a module that needs to call function A1 to implement application functions, and the service module refers to a module that provides the function implementation of the called function B1 and can return the called result.

[0119] In some exemplary embodiments, the device includes two processors, the first processor 7100 is an AP, and the second processor 7200 is a CP. AP is an application processor, which generally refers to a processing unit for installing an operating system and application software; CP is a communication processor, which generally refers to a processing unit in a smart terminal that provides communication capabilities.

[0120] In some exemplary embodiments, the device includes two processors, the first processor 7100 is a CP, and the second processor 7200 is an AP.

[0121] In some exemplary embodiments, the device includes three processors, the first processor 7100 is a CP, the second processor 7200 is an AP, and the third processor 7400 is a GP (graphics processor); or, the third processor 7400 is an NP (neural network processor). Alternatively, each processor may also be a processor of other types, not limited to the aspects illustrated in the embodiments of the present disclosure.

[0122] In some exemplary embodiments, the device may further include more processors. In some exemplary embodiments, the device may also include two processors of the same type, for example, two APs, namely, the first processor is AP1 and the second processor is AP2. More combination examples are not described one by one here.

[0123] In some exemplary embodiments, the first loopback address is 127.0.1.1, and the second loopback address is 127.0.2.1. That is, the IP address of the AP is 127.0.1.1, and the IP address of the CP is 127.0.2.1.

[0124] Optionally, other IP addresses may be selected from 127.0.0.2 to 127.255.255.254 as IP addresses of different processors.

[0125] In some exemplary embodiments, the first service module B is configured to register the services provided by itself with the remote procedure call server (RPC Server) module 7210 after the remote procedure call server (RPC Server) module 7210 is started.

[0126] It can be seen that the service module on the processor registers the service after its remote procedure call server (RPC Server) module 7210 is started. In this way, the remote procedure call server (RPC Server) module 7210 can provide services to the outside.

[0127] In some exemplary embodiments, the first application module A is configured to establish a remote procedure call client Client process;

[0128] The remote procedure call client Client process calls the service provided by the first service module B through the first remote procedure call local proxy module (RPC Proxy) 7110 or the second remote procedure call local proxy module (RPCProxy) 7220 according to the second IP address.

[0129] It can be understood that when the first application module A is deployed on the first processor, the remote procedure call client Client process created by the first application module A calls the service provided by the first service module B through the first remote procedure call local proxy module (RPC Proxy) 7110 according to the second IP address; when the first application module A is deployed on the second processor, the remote procedure call client Client process created by the first application module A calls the service provided by the first service module B through the second remote procedure call local proxy module (RPC Proxy) 2220 according to the second IP address. In other words, the application module creates a remote procedure call client Client locally according to the remote procedure call specification, and calls the services provided by other processors through the local proxy.

[0130] Among them, the calling process of remote procedure call client Client->local proxy Proxy->remote procedure call server Server->service function Func is implemented according to the remote procedure call related scheme, and the specific implementation details are not discussed in detail in the embodiment of this disclosure.

[0131] In some exemplary embodiments, Fig.13 As shown, the system further includes: a data interface module 7300 (Data-IF);

[0132] A first IP protocol stack module (IP Stack) 7120 is further deployed on the first processor 7100, and a second IP protocol stack module (IP Stack) 7230 is further deployed on the second processor 7200;

[0133] The data interface module 7300 (Data-IF) is configured to connect the first IP protocol stack module 7120 and the second IP protocol stack module 7230 to implement IP data packet communication between the first processor and the second processor.

[0134] In some exemplary embodiments, the first remote procedure call local proxy module 7110 is a remote procedure call local proxy module based on extensible markup language (XML-RPC Proxy);

[0135] The remote procedure call server module 7210 is a remote procedure call server module based on extensible markup language (XML-RPC Server).

[0136] In some exemplary embodiments, the second remote procedure call local proxy module 7220 is a remote procedure call local proxy module based on extensible markup language (XML-RPC Proxy).

[0137] It should be noted that other specific implementation schemes may be selected for the remote procedure call local proxy (RPC Proxy) and the remote procedure call server (RPCServer), such as bRPC (baidu-RPC, Baidu RPC), gRPC (google-RPC, Google RPC), Corba (Common Object Request Broker Architecture, common object request broker architecture), JavaRMI (Remote Method Invocation, remote method invocation), etc., and are not limited to the XML-RPC implementation scheme of the disclosed example.

[0138] An embodiment of the present disclosure further provides an electronic device, comprising: an in-device distributed system as described in any embodiment of the present disclosure.

[0139] In the distributed system within a device provided by the embodiments of the present disclosure, different processors within the device use different IP addresses to construct an IP network within the device, and the functional modules (application / service modules) on different processors communicate based on the constructed IP network within the device to achieve data interaction. In some exemplary embodiments, when the functional modules use a remote procedure call scheme to interact with each other, a standard IP protocol data packet is used between the IP protocol stack and the data interface between the processors, so that the data interface between the IP protocol stack and the processor does not need to be adapted or modified for a specific remote procedure call interface function. This distributed system constructed between multiple processors within a device based on the IP network within the device and remote procedure calls simplifies the information interaction process between modules on different processors and reduces the complexity of the software functional modules on each processor.

[0140] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0141] The above description is only a preferred embodiment of the present application scheme, and does not limit the patent scope of the present application. All equivalent structural changes made based on the concept of the present application scheme and the contents of the present application specification and drawings, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for communication within a device, characterized in that: include: The first application module on the first processor in the device communicates with the first service module on the second processor in the device according to the second IP address; Wherein, the first processor sets a first IP address, and the second processor sets a second IP address; The first application module on the first processor in the device communicates with the first service module on the second processor in the device according to the second IP address, including: According to the second IP address, the first application module on the first processor calls the first service module on the second processor through the first remote procedure call local proxy module deployed on the first processor to achieve communication.

2. The method according to claim 1, characterized in that The method further comprises: After the first remote procedure call local proxy module deployed on the first processor is started, the first IP address is bound; After the remote procedure call server module deployed on the second processor is started, it is bound to the second IP address.

3. The method according to claim 1, characterized in that The method further comprises: After the remote procedure call server module deployed on the second processor is started, the first service module on the second processor registers the service provided by itself with the remote procedure call server module.

4. The method according to any one of claims 1 to 3, characterized in that: The first IP address and the second IP address are both loopback addresses in the loopback address family that are not used by the loopback interface.

5. The method according to any one of claims 1 to 3, characterized in that: The first remote procedure call local proxy module is a remote procedure call local proxy module based on extensible markup language; The remote procedure call server module is a remote procedure call server module based on extensible markup language.

6. A distributed system within a device, characterized in that: include: A first processor and a second processor, the first processor is set to a first IP address, and the second processor is set to a second IP address; The first application module deployed on the first processor communicates with the first service module deployed on the second processor according to the second IP address; The first application module deployed on the first processor is configured to call the service provided by the first service module through the first remote procedure call local proxy module deployed on the first processor according to the second IP address.

7. The system according to claim 6, characterized in that The system further comprises: a data interface module; A first IP protocol stack module is also deployed on the first processor, and a second IP protocol stack module is also deployed on the second processor; The data interface module is configured to connect the first IP protocol stack module and the second IP protocol stack module to implement IP data packet communication between the first processor and the second processor.

8. An electronic device, characterized in that: The electronic device comprises an in-device distributed system as described in any one of claims 6-7.