Communication method, device, equipment and vehicle
By acquiring and transmitting IPC information at the time of system startup, the target application can directly communicate with the system service program using the pre-established IPC channel, solving the problem of low IPC communication reliability in the prior art, and improving the IPC communication reliability of the application with system service programs such as RS and VFS.
Patent Information
- Application Number
- CN202311430503.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, when an inter-process communication (IPC) channel between an application program and a system service program such as a root server (RS) and a virtual file system (VFS), communication reliability may be low due to the small remaining IPC resources in the system.
When the system starts the target application, it obtains the IPC information corresponding to the target application, including IPC handle information and IPC resources, and passes the IPC handle information to the target application, controlling it to use the pre-established IPC channel for IPC communication.
By obtaining and transmitting IPC information in advance, the target application can directly communicate with the system service program using the pre-established IPC channel, which improves the reliability of the application to establish IPC communication with system service programs such as RS and VFS.
Smart Images

Figure CN119917310A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a communication method, device, equipment and vehicle. Background Art
[0002] In the prior art, there are two types of system service programs in the system. One type is a system service program that needs to perform inter-process communication (IPC) with an application (APP) all the time, such as a root server (RS) and a virtual file system (VFS). The other type is other system service programs that can dynamically choose whether to perform IPC communication with an application.
[0003] After the application is started, the application needs to dynamically create IPC resources and use the above IPC resources to establish an IPC channel between the application and the system service program through the IPC handle to achieve IPC communication between the application and the system service program. However, in the case where the applications opened by the system occupy a large number of IPC resources, when a new application is opened, the application needs to obtain the corresponding IPC resources to achieve IPC communication between the application and the above RS, VFS and other system service programs. However, due to the small number of IPC communication resources remaining in the system, it will be impossible to establish an IPC channel between the application and the above RS, VFS and other system service programs, which may lead to low reliability of IPC communication between the application and the above RS, VFS and other system service programs. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a communication method, device, equipment and vehicle, which improves the reliability of establishing IPC communication between the application and the above-mentioned RS, VFS and other system service programs.
[0005] In a first aspect, an embodiment of the present application provides a communication method, the method comprising:
[0006] In the process of starting the target application by the system, obtaining inter-process communication IPC information corresponding to the target application, the IPC information including information for establishing an IPC channel between the target application and the target system service program when starting the target system service program, the IPC information including IPC handle information and IPC resources;
[0007] Passing the IPC handle information to the target application;
[0008] The target application is controlled to use an IPC channel between the target application and the target system service program so that the target application and the target system service program perform IPC communication, wherein the IPC channel is created based on the IPC handle information and the IPC resource.
[0009] In an optional implementation of the first aspect, obtaining inter-process communication IPC information corresponding to the target application includes:
[0010] From the multiple IPC handle information stored in the system internal variables, obtain the IPC handle information corresponding to the target application.
[0011] In an optional implementation of the first aspect, before acquiring the IPC handle information corresponding to the target application from the multiple IPC handle information stored in the system internal variables, the method further includes:
[0012] In the process of starting the target system service program, IPC information corresponding to the multiple application programs is created;
[0013] The IPC handle information corresponding to the multiple applications is stored in the system internal variables.
[0014] In an optional implementation of the first aspect, the transmitting the IPC handle information to the target application includes:
[0015] Based on the preset transmission method, the IPC handle information is transmitted to the target application through the preset interface.
[0016] In an optional implementation of the first aspect, based on a preset transmission mode, transmitting the IPC handle information to the target application through a preset interface includes:
[0017] Add the IPC handle information to the auxiliary vector list corresponding to the target application;
[0018] In the process of running the target application, the IPC handle information is obtained by parsing the auxiliary vector list corresponding to the target application, and the IPC handle information is transmitted to the target application through the first preset interface.
[0019] In an optional implementation of the first aspect, based on a preset transmission mode, transmitting the IPC handle information to the target application through a preset interface includes:
[0020] Parse the IPC handle information and obtain the IPC handle string;
[0021] Add the storage address corresponding to the IPC handle string to the IPC handle address table corresponding to the target application;
[0022] During the process of running the target application, the storage address corresponding to the IPC handle string is obtained by parsing the IPC handle address table corresponding to the target application, and the IPC handle information is obtained based on the storage address corresponding to the IPC handle string, and the IPC handle information is passed to the target application through a second preset interface.
[0023] In an optional implementation of the first aspect, the IPC handle information includes an IPC handle name and an IPC handle value;
[0024] Parse the IPC handle information and obtain the IPC handle string, including:
[0025] The IPC handle string is obtained by concatenating the IPC handle name and the IPC handle value.
[0026] In a second aspect, an embodiment of the present application provides a communication device, the device comprising:
[0027] An acquisition module, used for acquiring inter-process communication IPC information corresponding to the target application during the process of the system starting the target application, the IPC information including information for establishing an IPC channel between the target application and the target system service program when starting the target system service program, the IPC information including IPC handle information and IPC resources;
[0028] The control module is used to control the target application to use the IPC channel between the target application and the target system service program so that the target application and the target system service program perform IPC communication, and the IPC channel is created based on the IPC handle information and the IPC resource.
[0029] In a third aspect, an electronic device is provided, comprising a memory for storing computer program instructions; and a processor for reading and running the computer program instructions stored in the memory to execute the communication method provided in any optional implementation manner in the first aspect.
[0030] In a fourth aspect, a computer storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the communication method provided by any optional implementation in the first aspect is implemented.
[0031] In a fifth aspect, a vehicle is provided, comprising at least one of the above-mentioned communication device, electronic device and computer storage medium.
[0032] In the embodiment of the present application, since the IPC information obtained during the process of the system starting the target application includes the information for establishing the IPC channel between the target application and the target system service program when the target system service program is started, the above-mentioned IPC information can be subsequently transmitted to the target application to control the target application to directly use the IPC channel between the target application and the target system service program, thereby enabling the target application and the target system service program to perform IPC communication. In this way, the IPC communication between the target application and the target system service program is realized, and the reliability of the IPC communication between the application and the system service programs such as RS and VFS is also improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0034] Figure 1 It is a flow chart of a communication method provided in an embodiment of the present application;
[0035] Figure 2 This is one of the scenario schematic diagrams of a communication method provided in an embodiment of the present application;
[0036] Figure 3 This is a second scenario schematic diagram of a communication method provided in an embodiment of the present application;
[0037] Figure 4 is a structural diagram of a communication device provided in an embodiment of the present application;
[0038] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0041] In order to solve the problem in the prior art that the reliability of IPC communication between an application and a system service program such as RS and VFS that needs to communicate with the application all the time is low, the embodiments of the present application provide a communication method, device, equipment and vehicle. Since the IPC information obtained during the process of the system starting the target application includes the information created when the target system service program is started to establish an IPC channel between the target application and the target system service program, the above-mentioned IPC information can be subsequently transmitted to the target application to control the target application to directly use the IPC channel between the target application and the target system service program, thereby enabling the target application and the target system service program to communicate with each other through IPC. In this way, the IPC communication between the target application and the target system service program is realized, and the reliability of establishing IPC communication between the application and system service programs such as RS and VFS is also improved.
[0042] The communication method provided in the embodiment of the present application can be executed by a communication device or a control module in the communication device for executing the communication method. The communication method provided in the embodiment of the present application is described in detail by taking the communication device executing the communication method as an example.
[0043] The communication method provided in the embodiment of the present application is described in detail below through specific embodiments in conjunction with the accompanying drawings.
[0044] Figure 1 It is a flow chart of a communication method provided in an embodiment of the present application.
[0045] like Figure 1 As shown, the execution subject of the communication method may be a communication device, and the method may include the following steps:
[0046] S110, in the process of the system starting the target application, obtaining the inter-process communication IPC information corresponding to the target application.
[0047] In some embodiments, the IPC information involved above may include information created when the target system service program is started and used to establish an IPC channel between the target application and the target system service program. Specifically, the IPC information involved above may include IPC handle information and IPC resources. It should be noted that the IPC resources involved above may be related resources pre-allocated for starting the target application and required for the target application to communicate with the target system service program through IPC. In addition, the IPC resources involved above may be understood as IPC objects, and the IPC handle information involved above is used to access the related information of the IPC object.
[0048] The target system service program may be a related system service program that needs to perform IPC communication with the application program all the time, for example, the target system service program may be a system service program such as RS, VFS, etc., which is not limited here. In addition, the target application program mentioned above may be at least one application program among multiple applications running in the electronic device or system, which is not limited here.
[0049] Specifically, the communication device can obtain IPC information corresponding to the target application during the process of the system starting the target application, so that the target application can be controlled to use the IPC channel between the target application and the target system service program to enable the target application to perform IPC communication with the target system service program.
[0050] S120: delivering the IPC handle information to the target application.
[0051] Specifically, after acquiring the IPC information corresponding to the target application, since the IPC information includes the IPC handle information, based on this, the communication device can transmit the above IPC handle information to the target application.
[0052] S130, controlling the target application to use the IPC channel between the target application and the target system service program, so that the target application and the target system service program perform IPC communication.
[0053] In some embodiments, the IPC channels mentioned above are created based on IPC handle information and IPC resources.
[0054] Specifically, after the communication device passes the above-mentioned IPC handle information to the target application, since the IPC handle information can be relevant information for accessing IPC resources, and the IPC channel is created based on the IPC handle information and IPC resources, the communication device can control the target application to directly use the IPC channel between the target application and the target system service program, so that the target application and the target system service program can perform IPC communication.
[0055] In the embodiment of the present application, since the IPC information obtained during the process of the system starting the target application includes the information for establishing the IPC channel between the target application and the target system service program when the target system service program is started, the above-mentioned IPC information can be subsequently transmitted to the target application to control the target application to directly use the IPC channel between the target application and the target system service program, thereby enabling the target application and the target system service program to perform IPC communication. In this way, the IPC communication between the target application and the target system service program is realized, and the reliability of the IPC communication between the application and the system service programs such as RS and VFS is also improved.
[0056] In order to describe the communication method provided by the embodiment of the present application in more detail, in one embodiment, the above-mentioned steps of obtaining the IPC information between processes corresponding to the target application may specifically include the following steps:
[0057] From the multiple IPC handle information stored in the system internal variables, obtain the IPC handle information corresponding to the target application.
[0058] Specifically, the communication device can obtain the IPC handle information corresponding to the target application from the multiple IPC handle information stored in the system internal variables. The system internal variables can be data storage locations defined by the operating system. The multiple IPC handle information involved above corresponds one-to-one to multiple applications in the system.
[0059] In this embodiment, the communication device can obtain the IPC handle information corresponding to the target application from multiple IPC handle information stored in the system internal variables during the process of starting the target application, so that the IPC resources corresponding to the IPC handle information can be accessed by passing the IPC handle information to the target application, thereby facilitating the subsequent IPC communication between the target application and the target system service program.
[0060] Based on this, in order to more comprehensively describe the communication method provided by the embodiment of the present application, in one embodiment, before the above step of obtaining the IPC handle information corresponding to the target application from the multiple IPC handle information stored in the system internal variables, the above communication method may include the following steps:
[0061] In the process of starting the target system service program, IPC information corresponding to the multiple application programs is created;
[0062] The IPC handle information corresponding to the multiple applications is stored in the system internal variables.
[0063] Specifically, in the process of starting the target system service program, the communication device can create IPC information corresponding to multiple applications respectively. Since the IPC information can include IPC handle information, the communication device can store the IPC handle information corresponding to multiple applications respectively in the system internal variables, so that when a certain application is started later, the corresponding IPC handle information can be obtained from the system internal variables, thereby facilitating the subsequent realization of IPC communication between the target application and the target system service program. In this embodiment, it is possible to create IPC information corresponding to multiple applications in advance in the process of starting the target system service program, that is, to pre-establish IPC channels between multiple applications and the target system service program respectively, and store the above-created IPC information in the system internal variables. In this way, it is convenient to directly control the target application based on the corresponding IPC information in the process of starting the target application, and use the pre-established IPC channel between the target application and the target system service program to realize the IPC communication between the target application and the target system service program, thereby improving the reliability of the application and the system service programs such as RS and VFS to establish IPC communication.
[0064] In order to more accurately describe the communication method provided by the embodiment of the present application, in one embodiment, the above-mentioned step of transmitting the IPC handle information to the target application may specifically include the following steps:
[0065] Based on the preset delivery method, the IPC handle information is delivered to the target application through the preset interface. The preset delivery method may be a delivery method preset based on actual experience or circumstances, and is not limited here. The preset interface involved above may be a preset interface for delivering the IPC handle information to the target application.
[0066] Specifically, the communication device can transmit IPC handle information to the target application through a preset interface based on a preset transmission method. In this way, since the IPC handle information can be used to access the IPC resources corresponding to the IPC handle information, and the IPC channel is created based on the IPC handle information and the IPC resources, the target application can be controlled to use the IPC channel between the target application and the target system service program to realize IPC communication between the target application and the target system service program.
[0067] In this embodiment, the communication device can transmit IPC handle information to the target application through a preset transmission method and a preset interface, so that the target application can be subsequently controlled to use the IPC channel between the target application and the target system service program to establish IPC communication between the two, thereby improving the reliability of IPC communication between the application and system service programs such as RS and VFS that need to communicate with the application through IPC all the time.
[0068] Based on this, in one embodiment, the above-mentioned step of transmitting the IPC handle information to the target application through the preset interface based on the preset transmission method may specifically include the following steps:
[0069] Add the IPC handle information to the auxiliary vector list corresponding to the target application;
[0070] In the process of running the target application, the IPC handle information is obtained by parsing the auxiliary vector list corresponding to the target application, and the IPC handle information is transmitted to the target application through the first preset interface.
[0071] Specifically, the communication device may add the acquired IPC handle information to the auxiliary vector list corresponding to the target application, and parse the auxiliary vector list corresponding to the target application during the running phase of the target application to obtain the IPC handle information, and then transmit the IPC handle information through the first preset interface. Figure 2 As shown, taking RS and VFS system service programs as an example, IPC handle information is transmitted to the application program through the transmission method of the auxiliary vector list.
[0072] The auxiliary vector list is implemented by storing specially formatted structures on the process stack. These structures are stored in the form of key-value pairs and terminated by a zero-terminated end marker. Each key-value pair consists of an integer key (indicating the type of specific information) and an unsigned long integer value (indicating the data associated with the information). In an example, the auxiliary vector list involved above can be shown in Table 1:
[0073] Table 1 Auxiliary vector list
[0074] parameter Parameter meaning AT_NULL Used to indicate the end of the auxiliary vector list AT_PHDR Points to the address of the program header table in the process's executable file AT_ENTRY Points to the address of the process's entry point function AT_EXECFD File descriptor pointing to the process executable file AT_UID The user ID of the process AT_EUID The effective user ID of the process AT_GID The group ID of the process AT_EGID The effective group ID of the process AT_PLATFORM A string pointing to the name of the operating system or hardware platform AT_SECURE If set to a non-zero value, it means that the process is running in a secure environment.
[0075] It should also be noted that, in one example, the first preset interface involved above can be the interface task_append_aux(), in which the user APP Task handle, the user APP AUXV data type and the user APP AUXV data value are defined. Among them, the user APP Task handle is the task handle of the user APP in RS (used to manage user APP tasks and corresponding resources); the user APP AUXV data type is the user APP AUXV data type, and the corresponding AUXV data type needs to be used when passing RS and VFS communication IPC handles; the user APP AUXV data value is used to pass the RS and VFS communication IPC handles, and the handle value mapped to the user APP memory space needs to be passed.
[0076] In this embodiment, the IPC handle information can be delivered to the target application through the internal delivery mechanism corresponding to the target application, avoiding the situation where the delivered IPC handle information cannot be used, thereby facilitating the subsequent communication between the target application and the target system service program, and improving the reliability of IPC communication between the application and the system service programs such as RS and VFS that need to always communicate with the application through IPC. In addition, the auxiliary vector list involved above can be allocated when the process is loaded, and its storage area is fixed and does not change during the process operation, which can reduce the complexity of IPC handle information management and use a simple interface to obtain the corresponding IPC handle information.
[0077] In another embodiment, the above-mentioned step of transmitting the IPC handle information to the target application through the preset interface based on the preset transmission mode may include the following steps:
[0078] Parse the IPC handle information and obtain the IPC handle string;
[0079] Add the storage address corresponding to the IPC handle string to the IPC handle address table corresponding to the target application;
[0080] During the process of running the target application, the storage address corresponding to the IPC handle string is obtained by parsing the IPC handle address table corresponding to the target application, and the IPC handle information is obtained based on the storage address corresponding to the IPC handle string, and the IPC handle information is passed to the target application through the second interface.
[0081] Specifically, after the communication device obtains the IPC information corresponding to the target application, since the IPC information may include IPC handle information, based on this, the communication device can parse the IPC handle information to obtain the IPC handle string corresponding to the IPC handle information, and then add the storage address corresponding to the IPC handle string to the IPC handle address table corresponding to the target application. In this way, in the process of running the target application, the storage address corresponding to the IPC handle string can be obtained by parsing the IPC handle address table corresponding to the target application, and then the IPC handle string can be obtained by querying the storage address corresponding to the IPC handle string, and then the IPC handle information can be obtained based on the IPC handle string. Based on this, the communication device can pass the IPC handle information to the target application through the second preset interface. For example, if Figure 3 As shown, taking RS and VFS system service programs as an example, IPC handle information is transmitted to the application program through the transmission method of IPC handle character string.
[0082] The second preset interface mentioned above may be the interface task_append_ipc_hdl_str(task, name, val), where task is the task handle of the user APP in RS (used to manage the user APP tasks and corresponding resources); name corresponds to the IPC handle name in string format; and val is the corresponding IPC handle value.
[0083] In this embodiment, the IPC handle information can be delivered to the target application through an internal delivery mechanism corresponding to the target application, thereby avoiding the situation where the delivered IPC handle information cannot be used, thereby facilitating the subsequent communication between the target application and the target system service program, and improving the reliability of IPC communication between the application and system service programs such as RS and VFS that need to conduct IPC communication with the application all the time.
[0084] In order to more accurately and comprehensively describe the communication method provided by the embodiment of the present application, in one embodiment, the above-mentioned IPC handle information may include an IPC handle name and an IPC handle value;
[0085] The above-mentioned steps of parsing the IPC handle information and obtaining the IPC handle string may specifically include the following steps:
[0086] The IPC handle string is obtained by concatenating the IPC handle name and the IPC handle value.
[0087] In one example, the IPC handle string may be "RS_IPC_HANDLE=0xXXXX", "VFS_IPC_HANDLE=0xXXXX", where "RS_IPC_HANDLE" is the IPC handle name corresponding to RS, "VFS_IPC_HANDLE" is the IPC handle name corresponding to VFS, and "0xXXXX" is the string of the corresponding handle in hexadecimal.
[0088] In this embodiment, the communication device can obtain an IPC handle string based on the IPC handle name and IPC handle value included in the IPC handle information, so that the IPC handle information can be subsequently delivered to the target application through an internal delivery mechanism corresponding to the target application, thereby avoiding the situation where the delivered IPC handle information cannot be used.
[0089] In addition, it should be noted that after the communication device passes the IPC handle information to the target application through the above-mentioned first preset interface or the second preset interface, the target application can obtain the corresponding IPC handle information based on the calling interface get_ep_rs() and get_ep_vfs(). It should also be noted that if the target application receives unsigned longget_ep_rs(void) and the feedback return value is the RS IPC handle value, it indicates that the IPC handle information is successfully obtained. If the feedback return value is (unsigned long)-1, it indicates that the IPC handle information fails to be obtained. If the target application receives unsigned long get_ep_vfs(void) through the interface and the feedback return value is the VFS IPC handle value, it indicates that the IPC handle information is successfully obtained. If the feedback return value is (unsigned long)-1, it indicates that the IPC handle information fails to be obtained.
[0090] Based on the same inventive concept, the present application embodiment also provides a communication device, which can be specifically combined with Figure 4 The communication device provided in the embodiment of the present application is described in detail.
[0091] Figure 4 It is a structural diagram of a communication device provided in an embodiment of the present application.
[0092] like Figure 4 As shown, the communication device 400 may include: an acquisition module 410 , a transmission module 420 and a control module 430 .
[0093] The acquisition module 410 is used to acquire the inter-process communication IPC information corresponding to the target application during the process of the system starting the target application, the IPC information includes the information for establishing the IPC channel between the target application and the target system service program when starting the target system service program, and the IPC information includes the IPC handle information and the IPC resource;
[0094] A transfer module 420, used for transferring IPC handle information to a target application;
[0095] The control module 430 is used to control the target application to use the IPC channel between the target application and the target system service program so that the target application and the target system service program perform IPC communication. The IPC channel is created based on the IPC handle information and the IPC resources.
[0096] In one embodiment,
[0097] The acquisition module mentioned above is used to acquire the IPC handle information corresponding to the target application from the multiple IPC handle information stored in the system internal variables.
[0098] In one embodiment, the above-mentioned communication device may further include a creation module and a storage module.
[0099] A creation module, used for creating IPC information corresponding to a plurality of applications respectively in the process of starting the target system service program before acquiring the IPC handle information corresponding to the target application from the plurality of IPC handle information stored in the system internal variables;
[0100] The storage module is used to store the IPC handle information corresponding to multiple application programs into system internal variables.
[0101] In one embodiment, the transfer module mentioned above is used to transfer the IPC handle information to the target application through a preset interface based on a preset transfer method.
[0102] In one embodiment, the above-mentioned transfer module is specifically used for:
[0103] Add the IPC handle information to the auxiliary vector list corresponding to the target application;
[0104] In the process of running the target application, the IPC handle information is obtained by parsing the auxiliary vector list corresponding to the target application, and the IPC handle information is transmitted to the target application through the first preset interface.
[0105] In one embodiment, the above-mentioned transmission module is specifically used for:
[0106] Parse the IPC handle information and obtain the IPC handle string;
[0107] Add the storage address corresponding to the IPC handle string to the IPC handle address table corresponding to the target application;
[0108] During the process of running the target application, the storage address corresponding to the IPC handle string is obtained by parsing the IPC handle address table corresponding to the target application, and the IPC handle information is obtained based on the storage address corresponding to the IPC handle string, and the IPC handle information is passed to the target application through a second preset interface.
[0109] In one embodiment, the IPC handle information includes an IPC handle name and an IPC handle value; the above-mentioned communication device may also include a splicing module.
[0110] The splicing module is used to obtain an IPC handle string by splicing the IPC handle name and the IPC handle value.
[0111] In the embodiment of the present application, since the IPC information obtained during the process of the system starting the target application includes the information for establishing the IPC channel between the target application and the target system service program when the target system service program is started, the above-mentioned IPC information can be subsequently transmitted to the target application to control the target application to directly use the IPC channel between the target application and the target system service program, thereby enabling the target application and the target system service program to perform IPC communication. In this way, the IPC communication between the target application and the target system service program is realized, and the reliability of the IPC communication between the application and the system service programs such as RS and VFS is also improved.
[0112] Each module in the communication device provided in the embodiment of the present application can be used to implement Figure 1 The method steps of the illustrated embodiment can achieve the corresponding technical effects, and for the sake of brevity, they will not be repeated here.
[0113] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0114] The electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0115] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0116] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 502 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.
[0117] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0118] The processor 501 implements any one of the communication methods in the above embodiments by reading and executing computer program instructions stored in the memory 502 .
[0119] In one example, the electronic device may further include a communication interface 503 and a bus 510. Figure 5 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.
[0120] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0121] Bus 510 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 510 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0122] In addition, in combination with the communication method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the communication method provided in the embodiment of the present application is implemented.
[0123] An embodiment of the present application also provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a communication method as provided in the embodiment of the present application.
[0124] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0125] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0126] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0127] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable communication device to produce a machine so that these instructions executed by the processor of the computer or other programmable communication device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0128] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
[0129] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A communication method, characterized in that: The method comprises: In the process of starting the target application by the system, obtaining inter-process communication IPC information corresponding to the target application, wherein the IPC information includes information for establishing an IPC channel between the target application and the target system service program when starting the target system service program, and the IPC information includes IPC handle information and IPC resources; Passing the IPC handle information to the target application; The target application is controlled to use an IPC channel between the target application and the target system service program so that the target application and the target system service program perform IPC communication, wherein the IPC channel is created based on the IPC handle information and the IPC resource.
2. The method according to claim 1, characterized in that The obtaining of inter-process communication (IPC) information corresponding to the target application comprises: The IPC handle information corresponding to the target application is obtained from the multiple IPC handle information stored in the system internal variables.
3. The method according to claim 2, characterized in that Before acquiring the IPC handle information corresponding to the target application from the plurality of IPC handle information stored in the internal variables of the slave system, the method further comprises: In the process of starting the target system service program, creating IPC information corresponding to the plurality of application programs respectively; The IPC handle information corresponding to the multiple applications is stored in the system internal variables.
4. The method according to claim 1, characterized in that: The transmitting the IPC handle information to the target application comprises: Based on a preset transfer mode, the IPC handle information is transferred to the target application through a preset interface.
5. The method according to claim 4, characterized in that The delivering the IPC handle information to the target application through the preset interface based on the preset delivery mode includes: Adding the IPC handle information to an auxiliary vector list corresponding to the target application; In the process of running the target application, the IPC handle information is obtained by parsing the auxiliary vector list corresponding to the target application, and the IPC handle information is transmitted to the target application through a first preset interface.
6. The method according to claim 4, characterized in that The delivering the IPC handle information to the target application through the preset interface based on the preset delivery mode includes: Parse the IPC handle information to obtain an IPC handle character string; Adding the storage address corresponding to the IPC handle string to the IPC handle address table corresponding to the target application; During the process of running the target application, the storage address corresponding to the IPC handle string is obtained by parsing the IPC handle address table corresponding to the target application, and the IPC handle information is obtained based on the storage address corresponding to the IPC handle string, and the IPC handle information is passed to the target application through a second preset interface.
7. The method according to claim 6, characterized in that The IPC handle information includes an IPC handle name and an IPC handle value; The parsing of the IPC handle information to obtain an IPC handle string includes: The IPC handle character string is obtained by concatenating the IPC handle name and the IPC handle value.
8. A communication device, characterized in that: The device comprises: an acquisition module, used to acquire inter-process communication IPC information corresponding to the target application during the process of the system starting the target application, wherein the IPC information includes information for establishing an IPC channel between the target application and the target system service program when the target system service program is started, and the IPC information includes IPC handle information and IPC resources; A transfer module, used for transferring the IPC handle information to the target application; The control module is used to control the target application to use the IPC channel between the target application and the target system service program so that the target application and the target system service program perform IPC communication, and the IPC channel is created based on the IPC handle information and the IPC resource.
9. An electronic device, characterized in that: The apparatus comprises a processor and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the communication method according to any one of claims 1 to 7.
10. A vehicle, characterized in that: Include at least one of the following: The communication device as claimed in claim 8; The electronic device as claimed in claim 9.